Jspice3
indparam.c
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3f2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: 1985 Thomas L. Quarles
5  1992 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 #include "spice.h"
9 #include <stdio.h>
10 #include "inddefs.h"
11 #include "util.h"
12 #include "sperror.h"
13 
14 
15 /* ARGSUSED */
16 int
17 INDparam(ckt,param,value,inst,select)
18 
19 CKTcircuit *ckt;
20 int param;
21 IFvalue *value;
22 GENinstance *inst;
23 IFvalue *select;
24 {
25  INDinstance *here = (INDinstance*)inst;
26 
27  switch (param) {
28  case IND_IND:
29  here->INDinduct = value->rValue;
30  here->INDindGiven = TRUE;
31  break;
32  case IND_IC:
33  here->INDinitCond = value->rValue;
34  here->INDicGiven = TRUE;
35  break;
36  default:
37  return (E_BADPARM);
38  }
39  return (OK);
40 }
#define IND_IND
Definition: inddefs.h:112
#define E_BADPARM
Definition: iferrmsg.h:26
#define TRUE
Definition: util.h:27
unsigned INDindGiven
Definition: inddefs.h:81
double rValue
Definition: ifsim.h:233
#define OK
Definition: iferrmsg.h:17
int INDparam(CKTcircuit *ckt, int param, IFvalue *value, GENinstance *inst, IFvalue *select)
Definition: indparam.c:17
unsigned INDicGiven
Definition: inddefs.h:82
#define IND_IC
Definition: inddefs.h:113
double INDinitCond
Definition: inddefs.h:54
double INDinduct
Definition: inddefs.h:51