Пример #1
0
static long get_control_double(struct dbAddr *paddr, struct dbr_ctrlDouble *pcd)
{
    selRecord	*prec=(selRecord *)paddr->precord;

    if(paddr->pfield==(void *)&prec->val
    || paddr->pfield==(void *)&prec->hihi
    || paddr->pfield==(void *)&prec->high
    || paddr->pfield==(void *)&prec->low
    || paddr->pfield==(void *)&prec->lolo){
	pcd->upper_ctrl_limit = prec->hopr;
	pcd->lower_ctrl_limit = prec->lopr;
	return(0);
    }

    if(paddr->pfield>=(void *)&prec->a && paddr->pfield<=(void *)&prec->l){
	pcd->upper_ctrl_limit = prec->hopr;
	pcd->lower_ctrl_limit = prec->lopr;
	return(0);
    }
    if(paddr->pfield>=(void *)&prec->la && paddr->pfield<=(void *)&prec->ll){
	pcd->upper_ctrl_limit = prec->hopr;
	pcd->lower_ctrl_limit = prec->lopr;
	return(0);
    }
    recGblGetControlDouble(paddr,pcd);
    return(0);
}
Пример #2
0
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
    calcoutRecord *prec = (calcoutRecord *)paddr->precord;
    
    switch (dbGetFieldIndex(paddr)) {
        case indexof(VAL):
        case indexof(HIHI):
        case indexof(HIGH):
        case indexof(LOW):
        case indexof(LOLO):
        case indexof(LALM):
        case indexof(ALST):
        case indexof(MLST):
            pcd->lower_ctrl_limit = prec->lopr;
            pcd->upper_ctrl_limit = prec->hopr;
            break;
        case indexof(ODLY):
            pcd->lower_ctrl_limit = 0.0;
            pcd->upper_ctrl_limit = calcoutODLYlimit;
            break;
        default:
            recGblGetControlDouble(paddr,pcd);
    }
    return 0;
}
Пример #3
0
static long get_control_double(struct dbAddr *paddr,
                               struct dbr_ctrlDouble *pcd)
{
    epidRecord   *pepid=(epidRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    if (
        fieldIndex == epidRecordVAL
        || fieldIndex == epidRecordHIHI
        || fieldIndex == epidRecordHIGH
        || fieldIndex == epidRecordLOW
        || fieldIndex == epidRecordLOLO
        || fieldIndex == epidRecordCVAL) {
        pcd->upper_ctrl_limit = pepid->hopr;
        pcd->lower_ctrl_limit = pepid->lopr;
    } else if (
        fieldIndex == epidRecordOVAL
        || fieldIndex == epidRecordP
        || fieldIndex == epidRecordI
        || fieldIndex == epidRecordD) {
        pcd->upper_ctrl_limit = pepid->drvh;
        pcd->lower_ctrl_limit = pepid->drvl;
    } else recGblGetControlDouble(paddr,pcd);
    return(0);
}
Пример #4
0
static long get_control_double(DBADDR *paddr,struct dbr_ctrlDouble *pcd)
{
    longoutRecord *prec=(longoutRecord *)paddr->precord;

    switch (dbGetFieldIndex(paddr)) {
        case indexof(VAL):
        case indexof(HIHI):
        case indexof(HIGH):
        case indexof(LOW):
        case indexof(LOLO):
        case indexof(LALM):
        case indexof(ALST):
        case indexof(MLST):
            /* do not change pre drvh/drvl behavior */
            if(prec->drvh > prec->drvl) {
                pcd->upper_ctrl_limit = prec->drvh;
                pcd->lower_ctrl_limit = prec->drvl;
            } else {
                pcd->upper_ctrl_limit = prec->hopr;
                pcd->lower_ctrl_limit = prec->lopr;
            }
            break;
        default:
            recGblGetControlDouble(paddr,pcd);
    }
    return(0);
}
Пример #5
0
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
    subArrayRecord *prec = (subArrayRecord *) paddr->precord;

    switch (dbGetFieldIndex(paddr)) {
    case subArrayRecordVAL:
        pcd->upper_ctrl_limit = prec->hopr;
        pcd->lower_ctrl_limit = prec->lopr;
        break;

    case subArrayRecordINDX:
        pcd->upper_ctrl_limit = prec->malm - 1;
        pcd->lower_ctrl_limit = 0;
        break;

    case subArrayRecordNELM:
        pcd->upper_ctrl_limit = prec->malm;
        pcd->lower_ctrl_limit = 1;
        break;

    default:
        recGblGetControlDouble(paddr, pcd);
    }

    return 0;
}
Пример #6
0
static long get_control_double(DBADDR *paddr,struct dbr_ctrlDouble *pcd)
{
    if(dbGetFieldIndex(paddr) == indexof(HIGH)) {
        pcd->lower_ctrl_limit = 0.0;
        pcd->upper_ctrl_limit = boHIGHlimit;
    } else
        recGblGetControlDouble(paddr,pcd);
    return(0);
}
Пример #7
0
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
    waveformRecord *prec = (waveformRecord *) paddr->precord;

    if (dbGetFieldIndex(paddr) == waveformRecordVAL) {
        pcd->upper_ctrl_limit = prec->hopr;
        pcd->lower_ctrl_limit = prec->lopr;
    } else
        recGblGetControlDouble(paddr, pcd);
    return 0;
}
Пример #8
0
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
    compressRecord *prec=(compressRecord *)paddr->precord;

    if(paddr->pfield==(void *)prec->bptr
    || paddr->pfield==(void *)&prec->ihil
    || paddr->pfield==(void *)&prec->ilil){
        pcd->upper_ctrl_limit = prec->hopr;
        pcd->lower_ctrl_limit = prec->lopr;
    } else recGblGetControlDouble(paddr,pcd);
    return(0);
}
Пример #9
0
/*****************************************************************************
*
* Allow for only sensible values for entries
*
******************************************************************************/
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble * pcd)
{
    vsRecord *pvs = (vsRecord *)paddr->precord;
    int	fieldIndex = dbGetFieldIndex(paddr);
    
    if (fieldIndex == vsRecordVAL || fieldIndex == vsRecordPRES
      || fieldIndex == vsRecordCGAP
      || fieldIndex == vsRecordCGBP) {
	pcd->upper_ctrl_limit = pvs->hopr;
	pcd->lower_ctrl_limit = pvs->lopr;
    } else
        recGblGetControlDouble(paddr, pcd);
    return (0);
}
Пример #10
0
static long get_control_double(DBADDR *paddr,struct dbr_ctrlDouble *pcd)
{
    ifstatRecord	*prec=(ifstatRecord *)paddr->precord;
    int		fieldIndex = dbGetFieldIndex(paddr);

    if(fieldIndex == ifstatRecordVAL
    || fieldIndex == ifstatRecordHIHI
    || fieldIndex == ifstatRecordHIGH
    || fieldIndex == ifstatRecordLOW
    || fieldIndex == ifstatRecordLOLO) {
	pcd->upper_ctrl_limit = prec->hopr;
	pcd->lower_ctrl_limit = prec->lopr;
    } else recGblGetControlDouble(paddr,pcd);
    return(0);
}
Пример #11
0
/*****************************************************************************
 *
 * Allow for only sensible values for setpoint entries and displays
 *
 ******************************************************************************/
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble * pcd)
{
    digitelRecord *pdg = (digitelRecord *) (paddr->precord);
    void *p;
    p = (void *) (paddr->pfield);
    if ((p == &(pdg->s1hs)) || (p == &(pdg->s2hs)) || (p == &(pdg->s3hs))) {
	pcd->upper_ctrl_limit = DIGITEL_MAXHY;
	pcd->lower_ctrl_limit = DIGITEL_MINHY;
    } else if ((p == &(pdg->sp1s)) || (p == &(pdg->sp2s)) || 
    	       (p == &(pdg->sp3s))) {
	pcd->upper_ctrl_limit = DIGITEL_MAXSP;
	pcd->lower_ctrl_limit = DIGITEL_MINSP;
    } else
	recGblGetControlDouble(paddr, pcd);
    return (0);
}
Пример #12
0
static long get_control_double(struct dbAddr *paddr, struct dbr_ctrlDouble *pcd)
{
    struct cvtRecord *pcvt = (struct cvtRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    switch (fieldIndex) {
    case cvtRecordVAL:
    case cvtRecordHIHI:
    case cvtRecordHIGH:
    case cvtRecordLOW:
    case cvtRecordLOLO:
        pcd->upper_ctrl_limit = pcvt->drvh;
        pcd->lower_ctrl_limit = pcvt->drvl;
        break;
    default:
        recGblGetControlDouble(paddr, pcd);
    }
    return 0;
}
Пример #13
0
static long get_control_double(DBADDR *paddr,struct dbr_ctrlDouble *pcd)
{
    longoutRecord *prec=(longoutRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    if(fieldIndex == longoutRecordVAL
    || fieldIndex == longoutRecordHIHI
    || fieldIndex == longoutRecordHIGH
    || fieldIndex == longoutRecordLOW
    || fieldIndex == longoutRecordLOLO) {
        /* do not change pre drvh/drvl behavior */
        if(prec->drvh > prec->drvl) {
            pcd->upper_ctrl_limit = prec->drvh;
            pcd->lower_ctrl_limit = prec->drvl;
        } else {
            pcd->upper_ctrl_limit = prec->hopr;
            pcd->lower_ctrl_limit = prec->lopr;
        }
    } else recGblGetControlDouble(paddr,pcd);
    return(0);
}
Пример #14
0
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
    aoRecord	*prec=(aoRecord *)paddr->precord;

    switch (dbGetFieldIndex(paddr)) {
        case indexof(VAL):
        case indexof(OVAL):
        case indexof(PVAL):
        case indexof(HIHI):
        case indexof(HIGH):
        case indexof(LOW):
        case indexof(LOLO):
        case indexof(LALM):
        case indexof(ALST):
        case indexof(MLST):
            pcd->upper_ctrl_limit = prec->drvh;
            pcd->lower_ctrl_limit = prec->drvl;
            break;
        default:
            recGblGetControlDouble(paddr,pcd);
    }
    return(0);
}
Пример #15
0
static long get_control_double(DBADDR *paddr, struct dbr_ctrlDouble *pcd)
{
    subRecord *prec = (subRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    switch (fieldIndex) {
    case subRecordVAL:
    case subRecordHIHI:     case subRecordHIGH:
    case subRecordLOW:      case subRecordLOLO:
    case subRecordA:        case subRecordB:
    case subRecordC:        case subRecordD:
    case subRecordE:        case subRecordF:
    case subRecordG:        case subRecordH:
    case subRecordI:        case subRecordJ:
    case subRecordK:        case subRecordL:
        pcd->upper_ctrl_limit = prec->hopr;
        pcd->lower_ctrl_limit = prec->lopr;
        break;

    default:
        recGblGetControlDouble(paddr, pcd);
    }
    return 0;
}