1 /********** 2 Copyright 1991 Regents of the University of California. All rights reserved. 3 **********/ 4 5 #include "ngspice/ngspice.h" 6 #include "ngspice/ifsim.h" 7 #include "ngspice/iferrmsg.h" 8 #include "ngspice/cktdefs.h" 9 #include "ngspice/sensdefs.h" 10 11 12 /* ARGSUSED */ 13 int SENSask(CKTcircuit * ckt,JOB * anal,int which,IFvalue * value)14SENSask(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) 15 { 16 SENS_AN *job = (SENS_AN *) anal; 17 18 NG_IGNORE(ckt); 19 20 switch (which) { 21 22 case SENS_START: 23 value->rValue = job->start_freq; 24 break; 25 26 case SENS_STOP: 27 value->rValue = job->stop_freq; 28 break; 29 30 case SENS_STEPS: 31 value->iValue = job->n_freq_steps; 32 break; 33 34 case SENS_DECADE: 35 case SENS_OCTAVE: 36 case SENS_LINEAR: 37 case SENS_DC: 38 value->iValue = job->step_type == which; 39 break; 40 41 case SENS_DEFTOL: 42 value->rValue = job->deftol; 43 break; 44 45 case SENS_DEFPERTURB: 46 value->rValue = job->defperturb; 47 break; 48 49 default: 50 return(E_BADPARM); 51 } 52 return(OK); 53 } 54 55