Jspice3
Main Page
Data Structures
Files
File List
Globals
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
}
CKTparam
int CKTparam(GENERIC *ckt, GENERIC *fast, int param, IFvalue *val, IFvalue *selector)
Definition:
cktparam.c:20
E_BADPARM
#define E_BADPARM
Definition:
iferrmsg.h:26
sperror.h
util.h
spice.h
sGENmodel::GENmodType
int GENmodType
Definition:
gendefs.h:40
cktext.h
SPICEdev
Definition:
devdefs.h:43
sCKTmodHead::type
int type
Definition:
cktdefs.h:56
uIFvalue
Definition:
ifsim.h:231
sGENinstance::GENmodPtr
struct sGENmodel * GENmodPtr
Definition:
gendefs.h:25
DEVices
SPICEdev * DEVices[]
Definition:
sconfig.c:109
sGENinstance
Definition:
gendefs.h:24
devdefs.h
GENERIC
char GENERIC
Definition:
ifsim.h:27
src
lib
ckt
cktparam.c
Generated by
1.8.11