From 371cdde6dfca5f5e1139659543484ba199b690ea Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 10 May 2022 15:34:01 -0700 Subject: [PATCH] Trivial fixes to simmRAW for ao --- modules/database/src/std/rec/aoRecord.c | 12 ++++-------- modules/database/src/std/rec/aoRecord.dbd.pod | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/modules/database/src/std/rec/aoRecord.c b/modules/database/src/std/rec/aoRecord.c index 11206277b..875c42661 100644 --- a/modules/database/src/std/rec/aoRecord.c +++ b/modules/database/src/std/rec/aoRecord.c @@ -567,18 +567,15 @@ static long writeValue(aoRecord *prec) case menuSimmYES: case menuSimmRAW: - { recGblSetSevr(prec, SIMM_ALARM, prec->sims); - if (prec->pact || (prec->sdly < 0.)) { - if(prec->simm == menuSimmYES){ + if (prec->pact || (prec->sdly < 0.)) { + if (prec->simm == menuSimmYES) /* don't convert */ status = dbPutLink(&prec->siol, DBR_DOUBLE, &prec->oval, 1); - } - else { /* prec->simm == menuSimmRAW*/ + else /* prec->simm == menuSimmRAW*/ /* convert */ status = dbPutLink(&prec->siol, DBR_LONG, &prec->rval, 1); - } - prec->pact = FALSE; + prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ epicsCallback *pvt = prec->simpvt; if (!pvt) { @@ -589,7 +586,6 @@ static long writeValue(aoRecord *prec) prec->pact = TRUE; } break; - } default: recGblSetSevr(prec, SOFT_ALARM, INVALID_ALARM); diff --git a/modules/database/src/std/rec/aoRecord.dbd.pod b/modules/database/src/std/rec/aoRecord.dbd.pod index 3789d1bef..a800f8109 100644 --- a/modules/database/src/std/rec/aoRecord.dbd.pod +++ b/modules/database/src/std/rec/aoRecord.dbd.pod @@ -265,6 +265,7 @@ The following fields are used to operate the record in simulation mode. If SIMM (fetched through SIML, if populated) is YES, the record is put in SIMS severity and the value is written through SIOL, without conversion. +If SIMM is RAW, the value is converted and RVAL is written. SSCN sets a different SCAN mechanism to use in simulation mode. SDLY sets a delay (in sec) that is used for asynchronous simulation processing.