コード例 #1
0
ファイル: selRecord.c プロジェクト: ukaea/epics
static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
{
    selRecord	*prec=(selRecord *)paddr->precord;

    if(paddr->pfield==(void *)&prec->val ){
        pad->upper_alarm_limit = prec->hhsv ? prec->hihi : epicsNAN;
        pad->upper_warning_limit = prec->hsv ? prec->high : epicsNAN;
        pad->lower_warning_limit = prec->lsv ? prec->low : epicsNAN;
        pad->lower_alarm_limit = prec->llsv ? prec->lolo : epicsNAN;
    } else recGblGetAlarmDouble(paddr,pad);
    return(0);
}
コード例 #2
0
static long get_alarm_double(DBADDR *paddr,struct dbr_alDouble *pad)
{
    longoutRecord    *prec=(longoutRecord *)paddr->precord;

    if(dbGetFieldIndex(paddr) == indexof(VAL)) {
         pad->upper_alarm_limit = prec->hihi;
         pad->upper_warning_limit = prec->high;
         pad->lower_warning_limit = prec->low;
         pad->lower_alarm_limit = prec->lolo;
    } else recGblGetAlarmDouble(paddr,pad);
    return(0);
}
コード例 #3
0
ファイル: aoRecord.c プロジェクト: A2-Collaboration/epics
static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
{
    aoRecord	*prec=(aoRecord *)paddr->precord;

    if(dbGetFieldIndex(paddr) == indexof(VAL)){
        pad->upper_alarm_limit = prec->hhsv ? prec->hihi : epicsNAN;
        pad->upper_warning_limit = prec->hsv ? prec->high : epicsNAN;
        pad->lower_warning_limit = prec->lsv ? prec->low : epicsNAN;
        pad->lower_alarm_limit = prec->llsv ? prec->lolo : epicsNAN;
    } else recGblGetAlarmDouble(paddr,pad);
    return(0);
}
コード例 #4
0
ファイル: ushortRecord.c プロジェクト: pheest/pvaSrv
static long get_alarm_double(DBADDR *paddr,struct dbr_alDouble *pad)
{
    ushortRecord	*pushort=(ushortRecord *)paddr->precord;
    int		fieldIndex = dbGetFieldIndex(paddr);

    if(fieldIndex == ushortRecordVAL) {
	pad->upper_alarm_limit = pushort->hihi;
	pad->upper_warning_limit = pushort->high;
	pad->lower_warning_limit = pushort->low;
	pad->lower_alarm_limit = pushort->lolo;
    } else recGblGetAlarmDouble(paddr,pad);
    return(0);
}
コード例 #5
0
ファイル: epidRecord.c プロジェクト: epics-modules/std
static long get_alarm_double(struct dbAddr *paddr, struct dbr_alDouble *pad)
{
    struct epidRecord   *pepid=(struct epidRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);

    if(fieldIndex == epidRecordVAL) {
        pad->upper_alarm_limit = pepid->hihi;
        pad->upper_warning_limit = pepid->high;
        pad->lower_warning_limit = pepid->low;
        pad->lower_alarm_limit = pepid->lolo;
    } else recGblGetAlarmDouble(paddr,pad);
    return(0);
}
コード例 #6
0
static long get_alarm_double(DBADDR *paddr,struct dbr_alDouble *pad)
{
    rdbpostgreSQLRecord	*prec=(rdbpostgreSQLRecord *)paddr->precord;
    int		fieldIndex = dbGetFieldIndex(paddr);

    if(fieldIndex == rdbpostgreSQLRecordVAL) {
        pad->upper_alarm_limit = prec->hhsv ? prec->hihi : epicsNAN;
        pad->upper_warning_limit = prec->hsv ? prec->high : epicsNAN;
        pad->lower_warning_limit = prec->lsv ? prec->low : epicsNAN;
        pad->lower_alarm_limit = prec->llsv ? prec->lolo : epicsNAN;
    } else recGblGetAlarmDouble(paddr,pad);
    return(0);
}
コード例 #7
0
ファイル: digitelRecord.c プロジェクト: epicsdeb/synapps
static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
{
    digitelRecord *pdg = (digitelRecord *) (paddr->precord);
    void *p;
    p = (void *) (paddr->pfield);
    if (p == &(pdg->val)) {
	pad->upper_alarm_limit = pdg->hihi;
	pad->upper_warning_limit = pdg->high;
	pad->lower_warning_limit = pdg->low;
	pad->lower_alarm_limit = pdg->lolo;
    } else {
	pad->upper_alarm_limit = 0;
	pad->upper_warning_limit = 0;
	pad->lower_warning_limit = 0;
	pad->lower_alarm_limit = 0;
	recGblGetAlarmDouble(paddr, pad);
    }
    return (0);
}
コード例 #8
0
ファイル: vsRecord.c プロジェクト: epics-modules/vac
static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
{
    vsRecord *pvs = (vsRecord *)paddr->precord;
    int	fieldIndex = dbGetFieldIndex(paddr);
    
    if (fieldIndex == vsRecordVAL || fieldIndex == vsRecordPRES) {
	if ((pvs->ig1s == ON) || (pvs->ig2s == ON)) {
	    pad->upper_alarm_limit = pvs->hihi;
	    pad->upper_warning_limit = pvs->high;
	    pad->lower_warning_limit = pvs->low;
	    pad->lower_alarm_limit = pvs->lolo;
	} else {
	    pad->upper_alarm_limit = 0;
	    pad->upper_warning_limit = 0;
	    pad->lower_warning_limit = 0;
	    pad->lower_alarm_limit = 0;
	}
    } else
	recGblGetAlarmDouble(paddr, pad);
    return (0);
}
コード例 #9
0
ファイル: subRecord.c プロジェクト: epicsdeb/epics-base
static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad)
{
    subRecord *prec = (subRecord *)paddr->precord;
    int fieldIndex = dbGetFieldIndex(paddr);
    int linkNumber;

    if (fieldIndex == subRecordVAL) {
        pad->upper_alarm_limit = prec->hhsv ? prec->hihi : epicsNAN;
        pad->upper_warning_limit = prec->hsv ? prec->high : epicsNAN;
        pad->lower_warning_limit = prec->lsv ? prec->low : epicsNAN;
        pad->lower_alarm_limit = prec->llsv ? prec->lolo : epicsNAN;
    } else {
        linkNumber = get_linkNumber(fieldIndex);
        if (linkNumber >= 0) {
            dbGetAlarmLimits(&prec->inpa + linkNumber,
                &pad->lower_alarm_limit,
                &pad->lower_warning_limit,
                &pad->upper_warning_limit,
                &pad->upper_alarm_limit);
        } else
	    recGblGetAlarmDouble(paddr, pad);
    }
    return 0;
}