Jspice3
tfsetp.c File Reference
#include "spice.h"
#include <stdio.h>
#include "cktdefs.h"
#include "tfdefs.h"
#include "jobdefs.h"
#include "iferrmsg.h"
#include "util.h"
#include "cktext.h"
Include dependency graph for tfsetp.c:

Go to the source code of this file.

Functions

int TFsetParm (GENERIC *cktp, GENERIC *anal, int which, IFvalue *value)
 

Variables

static IFparm TFparms []
 
SPICEanalysis TFinfo
 

Function Documentation

int TFsetParm ( GENERIC cktp,
GENERIC anal,
int  which,
IFvalue value 
)

Definition at line 20 of file tfsetp.c.

26 {
27  TFAN *job = (TFAN *) anal;
28 
29  switch (which) {
30 
31  case TF_OUTPOS:
32  job->TFoutPos = (CKTnode *)value->nValue;
33  job->TFoutIsV = TRUE;
34  job->TFoutIsI = FALSE;
35  break;
36 
37  case TF_OUTNEG:
38  job->TFoutNeg = (CKTnode *)value->nValue;
39  job->TFoutIsV = TRUE;
40  job->TFoutIsI = FALSE;
41  break;
42 
43  case TF_OUTNAME:
44  job->TFoutName = value->sValue;
45  break;
46 
47  case TF_OUTSRC:
48  job->TFoutSrc = value->uValue;
49  job->TFoutIsV = FALSE;
50  job->TFoutIsI = TRUE;
51  break;
52 
53  case TF_INSRC:
54  job->TFinSrc = value->uValue;
55  break;
56 
57  default:
58  if (ACsetp(&job->AC,which,value) == OK)
59  return (OK);
60  if (DCTsetp(&job->DC,which,value) == OK)
61  return (OK);
62  return (E_BADPARM);
63  }
64  return (OK);
65 }
CKTnode * TFoutPos
Definition: tfdefs.h:19
Definition: tfdefs.h:15
#define FALSE
Definition: mfb.h:23
unsigned int TFoutIsI
Definition: tfdefs.h:28
#define TF_OUTNEG
Definition: tfdefs.h:36
struct sACprms AC
Definition: tfdefs.h:31
#define E_BADPARM
Definition: iferrmsg.h:26
#define TRUE
Definition: util.h:27
#define TF_OUTNAME
Definition: tfdefs.h:39
IFuid TFoutSrc
Definition: tfdefs.h:21
char * TFoutName
Definition: tfdefs.h:26
#define OK
Definition: iferrmsg.h:17
#define TF_OUTPOS
Definition: tfdefs.h:35
#define TF_INSRC
Definition: tfdefs.h:38
struct sDCTprms DC
Definition: tfdefs.h:32
IFnode nValue
Definition: ifsim.h:237
int ACsetp()
CKTnode * TFoutNeg
Definition: tfdefs.h:20
#define TF_OUTSRC
Definition: tfdefs.h:37
IFuid TFinSrc
Definition: tfdefs.h:22
char * sValue
Definition: ifsim.h:235
unsigned int TFoutIsV
Definition: tfdefs.h:27
IFuid uValue
Definition: ifsim.h:236
int DCTsetp()

Variable Documentation

SPICEanalysis TFinfo
Initial value:
= {
{
"TF",
"transfer function analysis",
sizeof(TFparms)/sizeof(IFparm),
},
sizeof(TFAN),
}
Definition: tfdefs.h:15
static IFparm TFparms[]
Definition: tfsetp.c:68
#define NODOMAIN
Definition: jobdefs.h:32
int TFparse()
int TFaskQuest()
int TFan()
Definition: ifsim.h:54
int TFsetParm(GENERIC *cktp, GENERIC *anal, int which, IFvalue *value)
Definition: tfsetp.c:20

Definition at line 90 of file tfsetp.c.

IFparm TFparms[]
static
Initial value:
= {
{ "outpos", TF_OUTPOS, IFP|IF_NODE, "Positive output node" },
{ "outneg", TF_OUTNEG, IFP|IF_NODE, "Negative output node" },
{ "outname", TF_OUTNAME, IFP|IF_STRING, "Name of output variable"},
{ "outsrc", TF_OUTSRC, IFP|IF_INSTANCE, "Output source" },
{ "insrc", TF_INSRC, IFP|IF_INSTANCE, "Input source" },
{ "start", AC_START, IFP|IF_REAL, "starting frequency" },
{ "stop", AC_STOP, IFP|IF_REAL, "ending frequency" },
{ "numsteps", AC_STEPS, IFP|IF_INTEGER, "number of frequencies"},
{ "dec", AC_DEC, IFP|IF_FLAG, "step by decades" },
{ "oct", AC_OCT, IFP|IF_FLAG, "step by octaves" },
{ "lin", AC_LIN, IFP|IF_FLAG, "step linearly" },
{ "name1", DC_NAME1, IFP|IF_INSTANCE, "name of source to step" },
{ "start1", DC_START1, IFP|IF_REAL, "starting voltage/current"},
{ "stop1", DC_STOP1, IFP|IF_REAL, "ending voltage/current" },
{ "step1", DC_STEP1, IFP|IF_REAL, "voltage/current step" },
{ "name2", DC_NAME2, IFP|IF_INSTANCE, "name of source to step" },
{ "start2", DC_START2, IFP|IF_REAL, "starting voltage/current"},
{ "stop2", DC_STOP2, IFP|IF_REAL, "ending voltage/current" },
{ "step2", DC_STEP2, IFP|IF_REAL, "voltage/current step" }
}
#define AC_STOP
Definition: analysis.h:56
#define TF_OUTNEG
Definition: tfdefs.h:36
#define AC_START
Definition: analysis.h:55
#define DC_STOP1
Definition: analysis.h:19
#define DC_START1
Definition: analysis.h:18
#define AC_OCT
Definition: analysis.h:53
#define IF_INSTANCE
Definition: ifsim.h:112
#define TF_OUTNAME
Definition: tfdefs.h:39
#define AC_LIN
Definition: analysis.h:54
#define DC_NAME2
Definition: analysis.h:21
#define TF_OUTPOS
Definition: tfdefs.h:35
#define AC_STEPS
Definition: analysis.h:57
#define TF_INSRC
Definition: tfdefs.h:38
#define IFP
Definition: analysis.h:10
#define DC_STEP1
Definition: analysis.h:20
#define IF_INTEGER
Definition: ifsim.h:107
#define DC_NAME1
Definition: analysis.h:17
#define IF_REAL
Definition: ifsim.h:108
#define IF_FLAG
Definition: ifsim.h:106
#define AC_DEC
Definition: analysis.h:52
#define TF_OUTSRC
Definition: tfdefs.h:37
#define DC_START2
Definition: analysis.h:22
#define DC_STOP2
Definition: analysis.h:23
#define IF_STRING
Definition: ifsim.h:111
#define DC_STEP2
Definition: analysis.h:24
#define IF_NODE
Definition: ifsim.h:110

Definition at line 68 of file tfsetp.c.