Jspice3
mutparam.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 #ifdef MUTUAL
16 
17 /* ARGSUSED */
18 int
19 MUTparam(ckt,param,value,inst,select)
20 
21 CKTcircuit *ckt;
22 int param;
23 IFvalue *value;
24 GENinstance *inst;
25 IFvalue *select;
26 {
27  MUTinstance *here = (MUTinstance*)inst;
28 
29  switch (param) {
30  case MUT_COEFF:
31  here->MUTcoupling = value->rValue;
32  here->MUTindGiven = TRUE;
33  break;
34  case MUT_IND1:
35  here->MUTindName1 = value->uValue;
36  break;
37  case MUT_IND2:
38  here->MUTindName2 = value->uValue;
39  break;
40  default:
41  return (E_BADPARM);
42  }
43  return (OK);
44 }
45 
46 #endif /* MUTUAL */
#define MUT_IND1
Definition: inddefs.h:212
IFuid MUTindName1
Definition: inddefs.h:171
#define MUT_IND2
Definition: inddefs.h:213
#define E_BADPARM
Definition: iferrmsg.h:26
#define TRUE
Definition: util.h:27
double rValue
Definition: ifsim.h:233
#define OK
Definition: iferrmsg.h:17
int MUTparam()
IFuid MUTindName2
Definition: inddefs.h:174
double MUTcoupling
Definition: inddefs.h:165
#define MUT_COEFF
Definition: inddefs.h:211
unsigned MUTindGiven
Definition: inddefs.h:186
IFuid uValue
Definition: ifsim.h:236