Jspice3
mutask.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 <math.h>
11 #include "inddefs.h"
12 #include "sperror.h"
13 
14 
15 #ifdef MUTUAL
16 
17 /*ARGSUSED*/
18 int
19 MUTask(ckt,inst,which,value,select)
20 
21 CKTcircuit *ckt;
22 GENinstance *inst;
23 int which;
24 IFvalue *value;
25 IFvalue *select;
26 {
27  MUTinstance *here = (MUTinstance*)inst;
28 
29  switch (which) {
30  case MUT_COEFF:
31  value->rValue = here->MUTfactor;
32  break;
33  case MUT_IND1:
34  value->uValue = here->MUTindName1;
35  break;
36  case MUT_IND2:
37  value->uValue = here->MUTindName2;
38  break;
39  default:
40  return (E_BADPARM);
41  }
42  return (OK);
43 }
44 #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
double rValue
Definition: ifsim.h:233
#define OK
Definition: iferrmsg.h:17
IFuid MUTindName2
Definition: inddefs.h:174
double MUTfactor
Definition: inddefs.h:168
#define MUT_COEFF
Definition: inddefs.h:211
IFuid uValue
Definition: ifsim.h:236
int MUTask()