Jspice3
urcask.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  1993 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 /*
9  * This routine gives access to the internal device parameters
10  * of Uniform distributed RC lines
11  */
12 
13 #include "spice.h"
14 #include <stdio.h>
15 #include "urcdefs.h"
16 #include "sperror.h"
17 
18 
19 /* ARGSUSED */
20 int
21 URCask(ckt,inst,which,value,select)
22 
23 CKTcircuit *ckt;
24 GENinstance *inst;
25 int which;
26 IFvalue *value;
27 IFvalue *select;
28 {
29  URCinstance *here = (URCinstance *)inst;
30 
31  switch (which) {
32  case URC_POS_NODE:
33  value->iValue = here->URCposNode;
34  break;
35  case URC_NEG_NODE:
36  value->iValue = here->URCnegNode;
37  break;
38  case URC_GND_NODE:
39  value->iValue = here->URCgndNode;
40  break;
41  case URC_LEN:
42  value->rValue = here->URClength;
43  break;
44  case URC_LUMPS:
45  value->iValue = here->URClumps;
46  break;
47  default:
48  return (E_BADPARM);
49  }
50  return (OK);
51 }
int URCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select)
Definition: urcask.c:21
#define URC_LUMPS
Definition: urcdefs.h:64
int URClumps
Definition: urcdefs.h:31
int URCnegNode
Definition: urcdefs.h:27
#define E_BADPARM
Definition: iferrmsg.h:26
int iValue
Definition: ifsim.h:232
double rValue
Definition: ifsim.h:233
#define OK
Definition: iferrmsg.h:17
int URCgndNode
Definition: urcdefs.h:28
#define URC_GND_NODE
Definition: urcdefs.h:67
#define URC_NEG_NODE
Definition: urcdefs.h:66
double URClength
Definition: urcdefs.h:30
int URCposNode
Definition: urcdefs.h:26
#define URC_POS_NODE
Definition: urcdefs.h:65
#define URC_LEN
Definition: urcdefs.h:63