Jspice3
indparam.c File Reference
#include "spice.h"
#include <stdio.h>
#include "inddefs.h"
#include "util.h"
#include "sperror.h"
Include dependency graph for indparam.c:

Go to the source code of this file.

Functions

int INDparam (CKTcircuit *ckt, int param, IFvalue *value, GENinstance *inst, IFvalue *select)
 

Function Documentation

int INDparam ( CKTcircuit ckt,
int  param,
IFvalue value,
GENinstance inst,
IFvalue select 
)

Definition at line 17 of file indparam.c.

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
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