Jspice3
dctaskq.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 #include "spice.h"
9 #include <stdio.h>
10 #include "cktdefs.h"
11 #include "dctdefs.h"
12 #include "iferrmsg.h"
13 
14 
15 /* ARGSUSED */
16 int
17 DCTaskQuest(cktp,anal,which,value)
18 
19 GENERIC *cktp;
20 GENERIC *anal;
21 int which;
22 IFvalue *value;
23 {
24  DCTAN *job = (DCTAN *) anal;
25 
26  if (DCTquery(&job->DC,which,value) == OK)
27  return (OK);
28  return (E_BADPARM);
29 }
30 
31 
32 int
33 DCTquery(dc,which,value)
34 
35 struct sDCTprms *dc;
36 int which;
37 IFvalue *value;
38 {
39  switch (which) {
40 
41  case DC_NAME1:
42  value->uValue = dc->eltName[0];
43  break;
44 
45  case DC_START1:
46  value->rValue = dc->vstart[0];
47  break;
48 
49  case DC_STOP1:
50  value->rValue = dc->vstop[0];
51  break;
52 
53  case DC_STEP1:
54  value->rValue = dc->vstep[0];
55  break;
56 
57  case DC_NAME2:
58  value->uValue = dc->eltName[1];
59  break;
60 
61  case DC_START2:
62  value->rValue = dc->vstart[1];
63  break;
64 
65  case DC_STOP2:
66  value->rValue = dc->vstop[1];
67  break;
68 
69  case DC_STEP2:
70  value->rValue = dc->vstep[1];
71  break;
72 
73  default:
74  return (E_BADPARM);
75  }
76  return (OK);
77 }
int DCTaskQuest(GENERIC *cktp, GENERIC *anal, int which, IFvalue *value)
Definition: dctaskq.c:17
#define DC_STOP1
Definition: analysis.h:19
Definition: dctdefs.h:18
#define DC_START1
Definition: analysis.h:18
#define E_BADPARM
Definition: iferrmsg.h:26
int DCTquery(struct sDCTprms *dc, int which, IFvalue *value)
Definition: dctaskq.c:33
double rValue
Definition: ifsim.h:233
#define DC_NAME2
Definition: analysis.h:21
#define OK
Definition: iferrmsg.h:17
#define DC_STEP1
Definition: analysis.h:20
struct sDCTprms DC
Definition: dctdefs.h:23
#define DC_NAME1
Definition: analysis.h:17
#define DC_START2
Definition: analysis.h:22
#define DC_STOP2
Definition: analysis.h:23
#define DC_STEP2
Definition: analysis.h:24
char GENERIC
Definition: ifsim.h:27
IFuid uValue
Definition: ifsim.h:236