Feature: add SIMM=RAW to ao records
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
#include "recGbl.h"
|
||||
#include "menuConvert.h"
|
||||
#include "menuOmsl.h"
|
||||
#include "menuYesNo.h"
|
||||
#include "menuSimm.h"
|
||||
#include "menuIvoa.h"
|
||||
|
||||
#define GEN_SIZE_OFFSET
|
||||
@@ -561,15 +561,24 @@ static long writeValue(aoRecord *prec)
|
||||
}
|
||||
|
||||
switch (prec->simm) {
|
||||
case menuYesNoNO:
|
||||
case menuSimmNO:
|
||||
status = pdset->write_ao(prec);
|
||||
break;
|
||||
|
||||
case menuYesNoYES: {
|
||||
case menuSimmYES:
|
||||
case menuSimmRAW:
|
||||
{
|
||||
recGblSetSevr(prec, SIMM_ALARM, prec->sims);
|
||||
if (prec->pact || (prec->sdly < 0.)) {
|
||||
status = dbPutLink(&prec->siol, DBR_DOUBLE, &prec->oval, 1);
|
||||
prec->pact = FALSE;
|
||||
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*/
|
||||
/* convert */
|
||||
status = dbPutLink(&prec->siol, DBR_LONG, &prec->rval, 1);
|
||||
}
|
||||
prec->pact = FALSE;
|
||||
} else { /* !prec->pact && delay >= 0. */
|
||||
epicsCallback *pvt = prec->simpvt;
|
||||
if (!pvt) {
|
||||
|
||||
@@ -263,7 +263,7 @@ processing.
|
||||
|
||||
The following fields are used to operate the record in simulation mode.
|
||||
|
||||
If SIMM (fetched through SIML) is YES, the record is put in SIMS
|
||||
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.
|
||||
SSCN sets a different SCAN mechanism to use in simulation mode.
|
||||
SDLY sets a delay (in sec) that is used for asynchronous simulation
|
||||
@@ -557,7 +557,7 @@ for more information on simulation mode and its fields.
|
||||
prompt("Simulation Mode")
|
||||
special(SPC_MOD)
|
||||
interest(1)
|
||||
menu(menuYesNo)
|
||||
menu(menuSimm)
|
||||
}
|
||||
field(SIMS,DBF_MENU) {
|
||||
prompt("Simulation Mode Severity")
|
||||
|
||||
Reference in New Issue
Block a user