From 4f0cc20e2b5f8abcd27d1609be99703ea59d58dc Mon Sep 17 00:00:00 2001 From: Evan Daykin Date: Tue, 9 Mar 2021 12:41:34 -0500 Subject: [PATCH 1/7] Feature: add SIMM=RAW to ao records --- modules/database/src/std/rec/aoRecord.c | 21 +++++++++++++------ modules/database/src/std/rec/aoRecord.dbd.pod | 4 ++-- modules/database/test/std/rec/simmTest.c | 18 ++++++++++++++-- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/modules/database/src/std/rec/aoRecord.c b/modules/database/src/std/rec/aoRecord.c index 022424054..11206277b 100644 --- a/modules/database/src/std/rec/aoRecord.c +++ b/modules/database/src/std/rec/aoRecord.c @@ -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) { diff --git a/modules/database/src/std/rec/aoRecord.dbd.pod b/modules/database/src/std/rec/aoRecord.dbd.pod index 5fef0d09e..3789d1bef 100644 --- a/modules/database/src/std/rec/aoRecord.dbd.pod +++ b/modules/database/src/std/rec/aoRecord.dbd.pod @@ -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") diff --git a/modules/database/test/std/rec/simmTest.c b/modules/database/test/std/rec/simmTest.c index 17e4d7fe4..a253b791c 100644 --- a/modules/database/test/std/rec/simmTest.c +++ b/modules/database/test/std/rec/simmTest.c @@ -63,6 +63,7 @@ static char *rawSupp[] = { "bi", "mbbi", "mbbiDirect", + "ao" }; static @@ -77,6 +78,7 @@ int hasRawSimmSupport(const char *rectype) { static char nameVAL[PVNAMELENGTH]; static char nameB0[PVNAMELENGTH]; static char nameRVAL[PVNAMELENGTH]; +static char nameROFF[PVNAMELENGTH]; static char nameSGNL[PVNAMELENGTH]; static char nameSIMM[PVNAMELENGTH]; static char nameSIML[PVNAMELENGTH]; @@ -98,7 +100,7 @@ static char nameSimvalLEN[PVNAMELENGTH]; static void setNames(const char *name) { - SETNAME(VAL); SETNAME(B0); SETNAME(RVAL); SETNAME(SGNL); + SETNAME(VAL); SETNAME(B0); SETNAME(RVAL); SETNAME(ROFF); SETNAME(SGNL); SETNAME(SVAL); SETNAME(SIMM); SETNAME(SIML); SETNAME(SIOL); SETNAME(SIMS); SETNAME(SCAN); SETNAME(PROC); SETNAME(PACT); SETNAME(STAT); SETNAME(SEVR); SETNAME(TSE); @@ -399,6 +401,18 @@ void testSiolWrite(const char *name, testdbPutFieldOk(nameVAL, DBR_LONG, 1); testdbGetFieldEqual(nameSimval, DBR_USHORT, 1); + if(hasRawSimmSupport(name)){ + testDiag("in simmRAW, RVAL should be written to SIOL"); + testDiag("SIML overrides SIMM, disable it here"); + testdbPutFieldOk(nameSIML, DBR_STRING, ""); + testdbPutFieldOk(nameSIMM, DBR_STRING, "RAW"); + testdbPutFieldOk(nameROFF, DBR_ULONG, 2); + testdbPutFieldOk(nameVAL, DBR_DOUBLE, 5.); + testdbGetFieldEqual(nameRVAL, DBR_LONG, 3); + testdbGetFieldEqual(nameSimval, DBR_DOUBLE, 3.); + testdbPutFieldOk(nameSIML, DBR_STRING, nameSimmode); + } + /* Set TSE to -2 (from device) and reprocess: timestamp is taken from IOC */ epicsTimeGetCurrent(&now); testdbPutFieldOk(nameTSE, DBR_SHORT, -2); @@ -502,7 +516,7 @@ void testAllRecTypes(void) MAIN(simmTest) { - testPlan(1176); + testPlan(1219); startSimmTestIoc("simmTest.db"); testSimmSetup(); From edb9208b0121b4d03e55a25e7aca10c9b7cccd65 Mon Sep 17 00:00:00 2001 From: Evan Daykin Date: Fri, 12 Mar 2021 17:06:35 -0500 Subject: [PATCH 2/7] correct number of simm tests --- modules/database/test/std/rec/simmTest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/database/test/std/rec/simmTest.c b/modules/database/test/std/rec/simmTest.c index a253b791c..f755196de 100644 --- a/modules/database/test/std/rec/simmTest.c +++ b/modules/database/test/std/rec/simmTest.c @@ -516,7 +516,7 @@ void testAllRecTypes(void) MAIN(simmTest) { - testPlan(1219); + testPlan(1199); startSimmTestIoc("simmTest.db"); testSimmSetup(); From 371cdde6dfca5f5e1139659543484ba199b690ea Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 10 May 2022 15:34:01 -0700 Subject: [PATCH 3/7] 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. From 4e9bb9fe504a5eb3fef4d7d97af316e6ef600f2c Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 10 May 2022 14:26:31 -0700 Subject: [PATCH 4/7] Add SIMM=RAW to bo record --- modules/database/src/std/rec/boRecord.c | 13 ++++++---- modules/database/src/std/rec/boRecord.dbd.pod | 7 +++--- modules/database/test/std/rec/simmTest.c | 24 +++++++++++++------ 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/modules/database/src/std/rec/boRecord.c b/modules/database/src/std/rec/boRecord.c index 05195b880..e093f9cbb 100644 --- a/modules/database/src/std/rec/boRecord.c +++ b/modules/database/src/std/rec/boRecord.c @@ -34,7 +34,7 @@ #include "special.h" #include "menuIvoa.h" #include "menuOmsl.h" -#include "menuYesNo.h" +#include "menuSimm.h" #define GEN_SIZE_OFFSET #include "boRecord.h" @@ -427,14 +427,18 @@ static long writeValue(boRecord *prec) } switch (prec->simm) { - case menuYesNoNO: + case menuSimmNO: status = pdset->write_bo(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_USHORT, &prec->val, 1); + if (prec->simm == menuSimmYES) + status = dbPutLink(&prec->siol, DBR_USHORT, &prec->val, 1); + else /* prec->simm == menuSimmRAW */ + status = dbPutLink(&prec->siol, DBR_ULONG, &prec->rval, 1); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ epicsCallback *pvt = prec->simpvt; @@ -446,7 +450,6 @@ static long writeValue(boRecord *prec) prec->pact = TRUE; } break; - } default: recGblSetSevr(prec, SOFT_ALARM, INVALID_ALARM); diff --git a/modules/database/src/std/rec/boRecord.dbd.pod b/modules/database/src/std/rec/boRecord.dbd.pod index bfbc8e820..8c3deabcd 100644 --- a/modules/database/src/std/rec/boRecord.dbd.pod +++ b/modules/database/src/std/rec/boRecord.dbd.pod @@ -206,8 +206,9 @@ The WPDT field is a private field for honoring seconds to hold HIGH. 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 -severity and the value is written through SIOL. +If SIMM (fetched through SIML, if populated) is YES, the record is put +in SIMS severity and the unconverted value is written through SIOL. +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. @@ -352,7 +353,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") diff --git a/modules/database/test/std/rec/simmTest.c b/modules/database/test/std/rec/simmTest.c index 14deb7a1f..908d42989 100644 --- a/modules/database/test/std/rec/simmTest.c +++ b/modules/database/test/std/rec/simmTest.c @@ -65,7 +65,8 @@ static char *rawSupp[] = { "bi", "mbbi", "mbbiDirect", - "ao" + "ao", + "bo" }; static @@ -403,15 +404,24 @@ void testSiolWrite(const char *name, testdbPutFieldOk(nameVAL, DBR_LONG, 1); testdbGetFieldEqual(nameSimval, DBR_USHORT, 1); - if(hasRawSimmSupport(name)){ + if (hasRawSimmSupport(name)) { testDiag("in simmRAW, RVAL should be written to SIOL"); testDiag("SIML overrides SIMM, disable it here"); testdbPutFieldOk(nameSIML, DBR_STRING, ""); testdbPutFieldOk(nameSIMM, DBR_STRING, "RAW"); - testdbPutFieldOk(nameROFF, DBR_ULONG, 2); - testdbPutFieldOk(nameVAL, DBR_DOUBLE, 5.); - testdbGetFieldEqual(nameRVAL, DBR_LONG, 3); - testdbGetFieldEqual(nameSimval, DBR_DOUBLE, 3.); + if (strcmp(name, "ao") == 0) { + testdbPutFieldOk(nameROFF, DBR_ULONG, 2); + testdbPutFieldOk(nameVAL, DBR_DOUBLE, 5.); + testdbGetFieldEqual(nameRVAL, DBR_LONG, 3); + testdbGetFieldEqual(nameSimval, DBR_DOUBLE, 3.); + } else if (strcmp(name, "bo") == 0) { + boRecord *prec; + prec = (boRecord *) testdbRecordPtr("bo"); + prec->mask = 0x55; + testdbPutFieldOk(nameVAL, DBR_USHORT, 1); + testdbGetFieldEqual(nameRVAL, DBR_ULONG, 0x55); + testdbGetFieldEqual(nameSimval, DBR_ULONG, 0x55); + } testdbPutFieldOk(nameSIML, DBR_STRING, nameSimmode); } @@ -532,7 +542,7 @@ void testAllRecTypes(void) MAIN(simmTest) { - testPlan(1199); + testPlan(1221); startSimmTestIoc("simmTest.db"); testSimmSetup(); From 37b95bc24231d478a78826d9e1284796e74284be Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 10 May 2022 16:12:51 -0700 Subject: [PATCH 5/7] Add SIMM=RAW for mbbo record --- modules/database/src/std/rec/mbboRecord.c | 13 ++++++++----- modules/database/src/std/rec/mbboRecord.dbd.pod | 5 +++-- modules/database/test/std/rec/simmTest.c | 14 +++++++++++--- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/modules/database/src/std/rec/mbboRecord.c b/modules/database/src/std/rec/mbboRecord.c index 83448f19a..7140c7c62 100644 --- a/modules/database/src/std/rec/mbboRecord.c +++ b/modules/database/src/std/rec/mbboRecord.c @@ -35,7 +35,7 @@ #include "special.h" #include "menuOmsl.h" #include "menuIvoa.h" -#include "menuYesNo.h" +#include "menuSimm.h" #define GEN_SIZE_OFFSET #include "mbboRecord.h" @@ -448,14 +448,18 @@ static long writeValue(mbboRecord *prec) } switch (prec->simm) { - case menuYesNoNO: + case menuSimmNO: status = pdset->write_mbbo(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_USHORT, &prec->val, 1); + if (prec->simm == menuSimmYES) + status = dbPutLink(&prec->siol, DBR_USHORT, &prec->val, 1); + else /* prec->simm == menuSimmRAW */ + status = dbPutLink(&prec->siol, DBR_ULONG, &prec->rval, 1); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ epicsCallback *pvt = prec->simpvt; @@ -467,7 +471,6 @@ static long writeValue(mbboRecord *prec) prec->pact = TRUE; } break; - } default: recGblSetSevr(prec, SOFT_ALARM, INVALID_ALARM); diff --git a/modules/database/src/std/rec/mbboRecord.dbd.pod b/modules/database/src/std/rec/mbboRecord.dbd.pod index 56d031760..ff16cb34f 100644 --- a/modules/database/src/std/rec/mbboRecord.dbd.pod +++ b/modules/database/src/std/rec/mbboRecord.dbd.pod @@ -165,8 +165,9 @@ for converting VAL to RVAL. 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. +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. @@ -657,7 +658,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") diff --git a/modules/database/test/std/rec/simmTest.c b/modules/database/test/std/rec/simmTest.c index 908d42989..466480531 100644 --- a/modules/database/test/std/rec/simmTest.c +++ b/modules/database/test/std/rec/simmTest.c @@ -66,7 +66,8 @@ static char *rawSupp[] = { "mbbi", "mbbiDirect", "ao", - "bo" + "bo", + "mbbo" }; static @@ -80,6 +81,7 @@ int hasRawSimmSupport(const char *rectype) { #define PVNAMELENGTH 60 static char nameVAL[PVNAMELENGTH]; static char nameB0[PVNAMELENGTH]; +static char nameONVL[PVNAMELENGTH]; static char nameRVAL[PVNAMELENGTH]; static char nameROFF[PVNAMELENGTH]; static char nameSGNL[PVNAMELENGTH]; @@ -103,7 +105,8 @@ static char nameSimvalLEN[PVNAMELENGTH]; static void setNames(const char *name) { - SETNAME(VAL); SETNAME(B0); SETNAME(RVAL); SETNAME(ROFF); SETNAME(SGNL); + SETNAME(VAL); SETNAME(B0); SETNAME(ONVL); + SETNAME(RVAL); SETNAME(ROFF); SETNAME(SGNL); SETNAME(SVAL); SETNAME(SIMM); SETNAME(SIML); SETNAME(SIOL); SETNAME(SIMS); SETNAME(SCAN); SETNAME(PROC); SETNAME(PACT); SETNAME(STAT); SETNAME(SEVR); SETNAME(TSE); @@ -421,6 +424,11 @@ void testSiolWrite(const char *name, testdbPutFieldOk(nameVAL, DBR_USHORT, 1); testdbGetFieldEqual(nameRVAL, DBR_ULONG, 0x55); testdbGetFieldEqual(nameSimval, DBR_ULONG, 0x55); + } else if (strcmp(name, "mbbo") == 0) { + testdbPutFieldOk(nameONVL, DBR_ULONG, 5); + testdbPutFieldOk(nameVAL, DBR_UCHAR, 1); + testdbGetFieldEqual(nameRVAL, DBR_ULONG, 5); + testdbGetFieldEqual(nameSimval, DBR_UCHAR, 5); } testdbPutFieldOk(nameSIML, DBR_STRING, nameSimmode); } @@ -542,7 +550,7 @@ void testAllRecTypes(void) MAIN(simmTest) { - testPlan(1221); + testPlan(1244); startSimmTestIoc("simmTest.db"); testSimmSetup(); From 60001c0571cc34cce85702c01085da50222f4ec1 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Tue, 10 May 2022 16:29:55 -0700 Subject: [PATCH 6/7] Add SIMM=RAW for mbboDirect record --- modules/database/src/std/rec/mbboDirectRecord.c | 13 ++++++++----- .../database/src/std/rec/mbboDirectRecord.dbd.pod | 3 ++- modules/database/test/std/rec/simmTest.c | 13 ++++++++++--- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/modules/database/src/std/rec/mbboDirectRecord.c b/modules/database/src/std/rec/mbboDirectRecord.c index b2b531572..6175469ec 100644 --- a/modules/database/src/std/rec/mbboDirectRecord.c +++ b/modules/database/src/std/rec/mbboDirectRecord.c @@ -34,7 +34,7 @@ #include "special.h" #include "menuOmsl.h" #include "menuIvoa.h" -#include "menuYesNo.h" +#include "menuSimm.h" #define GEN_SIZE_OFFSET #include "mbboDirectRecord.h" @@ -364,14 +364,18 @@ static long writeValue(mbboDirectRecord *prec) } switch (prec->simm) { - case menuYesNoNO: + case menuSimmNO: status = pdset->write_mbbo(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_ULONG, &prec->val, 1); + if (prec->simm == menuSimmYES) + status = dbPutLink(&prec->siol, DBR_LONG, &prec->val, 1); + else /* prec->simm == menuSimmRAW */ + status = dbPutLink(&prec->siol, DBR_ULONG, &prec->rval, 1); prec->pact = FALSE; } else { /* !prec->pact && delay >= 0. */ epicsCallback *pvt = prec->simpvt; @@ -383,7 +387,6 @@ static long writeValue(mbboDirectRecord *prec) prec->pact = TRUE; } break; - } default: recGblSetSevr(prec, SOFT_ALARM, INVALID_ALARM); diff --git a/modules/database/src/std/rec/mbboDirectRecord.dbd.pod b/modules/database/src/std/rec/mbboDirectRecord.dbd.pod index d15ad6448..b1db5bd27 100644 --- a/modules/database/src/std/rec/mbboDirectRecord.dbd.pod +++ b/modules/database/src/std/rec/mbboDirectRecord.dbd.pod @@ -178,6 +178,7 @@ 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 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. @@ -203,7 +204,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") diff --git a/modules/database/test/std/rec/simmTest.c b/modules/database/test/std/rec/simmTest.c index 466480531..227f5c309 100644 --- a/modules/database/test/std/rec/simmTest.c +++ b/modules/database/test/std/rec/simmTest.c @@ -67,7 +67,8 @@ static char *rawSupp[] = { "mbbiDirect", "ao", "bo", - "mbbo" + "mbbo", + "mbboDirect" }; static @@ -84,6 +85,7 @@ static char nameB0[PVNAMELENGTH]; static char nameONVL[PVNAMELENGTH]; static char nameRVAL[PVNAMELENGTH]; static char nameROFF[PVNAMELENGTH]; +static char nameSHFT[PVNAMELENGTH]; static char nameSGNL[PVNAMELENGTH]; static char nameSIMM[PVNAMELENGTH]; static char nameSIML[PVNAMELENGTH]; @@ -106,7 +108,7 @@ static void setNames(const char *name) { SETNAME(VAL); SETNAME(B0); SETNAME(ONVL); - SETNAME(RVAL); SETNAME(ROFF); SETNAME(SGNL); + SETNAME(RVAL); SETNAME(ROFF); SETNAME(SHFT); SETNAME(SGNL); SETNAME(SVAL); SETNAME(SIMM); SETNAME(SIML); SETNAME(SIOL); SETNAME(SIMS); SETNAME(SCAN); SETNAME(PROC); SETNAME(PACT); SETNAME(STAT); SETNAME(SEVR); SETNAME(TSE); @@ -429,6 +431,11 @@ void testSiolWrite(const char *name, testdbPutFieldOk(nameVAL, DBR_UCHAR, 1); testdbGetFieldEqual(nameRVAL, DBR_ULONG, 5); testdbGetFieldEqual(nameSimval, DBR_UCHAR, 5); + } else if (strcmp(name, "mbboDirect") == 0) { + testdbPutFieldOk(nameSHFT, DBR_ULONG, 2); + testdbPutFieldOk(nameB0, DBR_UCHAR, 1); + testdbGetFieldEqual(nameRVAL, DBR_ULONG, 4); + testdbGetFieldEqual(nameSimval, DBR_UCHAR, 4); } testdbPutFieldOk(nameSIML, DBR_STRING, nameSimmode); } @@ -550,7 +557,7 @@ void testAllRecTypes(void) MAIN(simmTest) { - testPlan(1244); + testPlan(1267); startSimmTestIoc("simmTest.db"); testSimmSetup(); From 0bcffb56bbe4e44e95521722db42bffd0ab65f09 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Wed, 11 May 2022 10:44:53 -0700 Subject: [PATCH 7/7] Add mention to RELEASE_NOTES --- documentation/RELEASE_NOTES.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/documentation/RELEASE_NOTES.md b/documentation/RELEASE_NOTES.md index eaee85dbc..392136a7b 100644 --- a/documentation/RELEASE_NOTES.md +++ b/documentation/RELEASE_NOTES.md @@ -17,6 +17,13 @@ should also be read to understand what has changed since earlier releases. +### Simulation Mode RAW Support for Output Record Types + +SIMM=RAW support has been added for the relevant output record types +(ao, bo, mbbo, mbboDirect). +RAW simulation mode will have those records do the appropriate conversion +and write RVAL to the location pointed to by SIOL. + ### Support for obsolete architectures removed These target architectures have been removed: @@ -1327,7 +1334,7 @@ editing and history. This functionality has now been restored, see Launchpad ### Constant link types Constant links can now hold 64-bit integer values, either as scalars or -arrays. Only base 10 is supported by the JSON parser though, the JSON standard + arrays. Only base 10 is supported by the JSON parser though, the JSON standard doesn't allow for hexadecimal numbers. ### Upgraded the YAJL JSON Library