Jspice3
cktask.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  /* CKTask
9  * Ask questions about a specified device.
10  */
11 
12 #include "spice.h"
13 #include <stdio.h>
14 #include "devdefs.h"
15 #include "sperror.h"
16 #include "util.h"
17 #include "cktext.h"
18 
19 
20 extern SPICEdev *DEVices[];
21 
22 int
23 CKTask(ckt,fast,which,value,selector)
24 
25 GENERIC *ckt;
26 GENERIC *fast;
27 int which;
28 IFvalue *value;
29 IFvalue *selector;
30 {
31  int type = ((GENinstance *)fast)->GENmodPtr->GENmodType;
32 
33  if (DEVices[type]->DEVask) {
34  return( (*DEVices[type]->DEVask)((CKTcircuit *)ckt,
35  (GENinstance *)fast,which,value,selector) );
36  }
37  return (E_BADPARM);
38 }
SPICEdev * DEVices[]
Definition: sconfig.c:109
#define E_BADPARM
Definition: iferrmsg.h:26
Definition: types.c:18
int CKTask(GENERIC *ckt, GENERIC *fast, int which, IFvalue *value, IFvalue *selector)
Definition: cktask.c:23
char GENERIC
Definition: ifsim.h:27