Jspice3
cktparam.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 Wayne A. Christopher
5  1993 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 
9 #include "spice.h"
10 #include <stdio.h>
11 #include "devdefs.h"
12 #include "sperror.h"
13 #include "util.h"
14 #include "cktext.h"
15 
16 extern SPICEdev *DEVices[];
17 
18 
19 int
20 CKTparam(ckt,fast,param,val,selector)
21 
22 /*
23  * attach the given parameter to the specified device in the given circuit
24  */
25 GENERIC *ckt;
26 GENERIC *fast;
27 int param;
28 IFvalue *val;
29 IFvalue *selector;
30 {
31  int type;
32  GENinstance *myfast = (GENinstance *)fast;
33 
34  type = myfast->GENmodPtr->GENmodType;
35 
36  if (DEVices[type]->DEVparam) {
37  return ( (*DEVices[type]->DEVparam)
38  (ckt,param,val,myfast,selector) );
39  }
40  else {
41  return (E_BADPARM);
42  }
43 }
int CKTparam(GENERIC *ckt, GENERIC *fast, int param, IFvalue *val, IFvalue *selector)
Definition: cktparam.c:20
#define E_BADPARM
Definition: iferrmsg.h:26
int GENmodType
Definition: gendefs.h:40
int type
Definition: cktdefs.h:56
struct sGENmodel * GENmodPtr
Definition: gendefs.h:25
SPICEdev * DEVices[]
Definition: sconfig.c:109
char GENERIC
Definition: ifsim.h:27