char str[20]; int sent6; epicsUInt32 tval; int sent7; char c; char c1[2]; int offpre; int offpost; } myStruct; static const chfPluginEnumType colorEnum[] = { {"R", 1}, {"G", 2}, {"B", 4}, {NULL,0} }; static const chfPluginArgDef sloppyTaggedOpts[] = { chfInt32 (myStruct, tval, "t" , 0, 0), chfTagInt32 (myStruct, ival, "I" , tval, 1, 0, 0), chfTagBoolean(myStruct, flag, "F" , tval, 2, 0, 0), chfTagDouble (myStruct, dval, "D" , tval, 3, 0, 0), chfTagString (myStruct, str, "S" , tval, 4, 0, 0), chfTagEnum (myStruct, enumval, "C" , tval, 5, 0, 0, colorEnum), chfPluginArgEnd }; static const chfPluginArgDef strictTaggedOpts[] = { chfInt32 (myStruct, tval, "t" , 1, 0), chfBoolean (myStruct, flag, "f" , 1, 0), chfTagInt32 (myStruct, ival, "I" , tval, 1, 0, 0), chfTagBoolean(myStruct, flag, "F" , tval, 2, 0, 0), chfTagDouble (myStruct, dval, "D" , tval, 3, 1, 0),
#include "registry.h" #include "errlog.h" #include "epicsExit.h" #include "dbUnitTest.h" #include "testMain.h" #include "osiFileName.h" typedef struct myStruct { epicsInt32 start; epicsInt32 incr; epicsInt32 end; } myStruct; static const chfPluginArgDef opts[] = { chfInt32 (myStruct, start, "s", 0, 1), chfInt32 (myStruct, incr, "i", 0, 1), chfInt32 (myStruct, end, "e", 0, 1), chfPluginArgEnd }; static myStruct my; static void * allocPvt(void) { my.start = 0; my.incr = 1; my.end = -1; return &my; }