/* Generated with snc from psControl.i */ /* Program "psControl" */ #include #include #include #include #include "epicsTypes.h" #include "seqCom.h" /* Variable declarations */ struct UserVar { # line 27 "../psControl.st" double wait_delay_sofar; # line 30 "../psControl.st" double wait_delay; # line 36 "../psControl.st" int norampoff; # line 40 "../psControl.st" int ps_on; # line 44 "../psControl.st" int ps_on_des; # line 47 "../psControl.st" int ps_ramp; # line 51 "../psControl.st" int ps_status; # line 54 "../psControl.st" double ps_curr_setpt; # line 60 "../psControl.st" double ps_curr_des; # line 66 "../psControl.st" int ps_limits_flag; # line 57 "../psControl.st" int standardize; # line 61 "../psControl.st" int cycle_count; # line 64 "../psControl.st" int max_cycle_count; # line 68 "../psControl.st" double ps_curr_drvh; # line 74 "../psControl.st" char *ps_c; # line 75 "../psControl.st" int setpt_change; # line 76 "../psControl.st" int zero_current; # line 77 "../psControl.st" int wait_needed; # line 78 "../psControl.st" int ramp_timeout; # line 79 "../psControl.st" int change_count; # line 80 "../psControl.st" int standardizing; # line 81 "../psControl.st" int ramping_off; # line 82 "../psControl.st" double wait_delay_increment; # line 83 "../psControl.st" double wait_delay_total; }; /* C code definitions */ # line 50 "../psControl.st" #include /* Program init func */ static void G_prog_init(struct UserVar *pVar) { static struct UserVar pVarInit = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; *pVar = pVarInit; } /****** Code for state "psControl_init" in state set "psControl" ******/ /* Delay function for state "psControl_init" in state set "psControl" */ static void D_psControl_psControl_init(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "psControl_init" in state set "psControl" */ static seqBool E_psControl_psControl_init(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { if (TRUE) { *pNextState = 1; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "psControl_init" in state set "psControl" */ static void A_psControl_psControl_init(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 94 "../psControl.st" pVar->ps_c = seq_macValueGet(ssId, "ps"); # line 95 "../psControl.st" pVar->ps_status = 10; # line 96 "../psControl.st" seq_pvPut(ssId, 6/*ps_status*/, 0); # line 97 "../psControl.st" pVar->cycle_count = 0; # line 98 "../psControl.st" seq_pvPut(ssId, 11/*cycle_count*/, 0); # line 99 "../psControl.st" pVar->wait_delay_sofar = 0; # line 100 "../psControl.st" seq_pvPut(ssId, 0/*wait_delay_sofar*/, 0); # line 101 "../psControl.st" pVar->standardize = 0; # line 102 "../psControl.st" seq_pvPut(ssId, 10/*standardize*/, 0); # line 103 "../psControl.st" pVar->norampoff = 1; # line 104 "../psControl.st" seq_pvPut(ssId, 2/*norampoff*/, 0); # line 105 "../psControl.st" seq_efClear(ssId, 2/*ps_curr_setpt_ef*/); # line 106 "../psControl.st" pVar->ps_limits_flag = 0; # line 107 "../psControl.st" seq_pvPut(ssId, 9/*ps_limits_flag*/, 0); } return; } } /****** Code for state "psControl_request" in state set "psControl" ******/ /* Delay function for state "psControl_request" in state set "psControl" */ static void D_psControl_psControl_request(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "psControl_request" in state set "psControl" */ static seqBool E_psControl_psControl_request(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 117 "../psControl.st" if ((!pVar->ps_on) && ((!pVar->norampoff) || pVar->standardize)) { *pNextState = 1; *pTransNum = 0; return TRUE; } # line 128 "../psControl.st" if ((!pVar->ps_on) && seq_efTest(ssId, 2/*ps_curr_setpt_ef*/)) { *pNextState = 1; *pTransNum = 1; return TRUE; } # line 134 "../psControl.st" if ((!pVar->norampoff) || pVar->standardize) { *pNextState = 2; *pTransNum = 2; return TRUE; } # line 156 "../psControl.st" if (seq_efTest(ssId, 2/*ps_curr_setpt_ef*/)) { *pNextState = 5; *pTransNum = 3; return TRUE; } return FALSE; } /* Action function for state "psControl_request" in state set "psControl" */ static void A_psControl_psControl_request(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 119 "../psControl.st" pVar->ps_status = 4; # line 120 "../psControl.st" seq_pvPut(ssId, 6/*ps_status*/, 0); # line 121 "../psControl.st" pVar->norampoff = 1; # line 122 "../psControl.st" seq_pvPut(ssId, 2/*norampoff*/, 0); # line 123 "../psControl.st" pVar->standardize = 0; # line 124 "../psControl.st" seq_pvPut(ssId, 10/*standardize*/, 0); } return; case 1: { # line 130 "../psControl.st" seq_efClear(ssId, 2/*ps_curr_setpt_ef*/); } return; case 2: { # line 136 "../psControl.st" pVar->setpt_change = 0; # line 137 "../psControl.st" pVar->change_count = 0; # line 138 "../psControl.st" pVar->zero_current = 1; # line 139 "../psControl.st" pVar->wait_needed = 0; # line 140 "../psControl.st" pVar->cycle_count = 0; # line 141 "../psControl.st" seq_pvPut(ssId, 11/*cycle_count*/, 0); # line 142 "../psControl.st" pVar->ps_limits_flag = 1; # line 143 "../psControl.st" seq_pvPut(ssId, 9/*ps_limits_flag*/, 0); # line 144 "../psControl.st" if (!pVar->norampoff) { # line 145 "../psControl.st" pVar->ramping_off = 1; # line 146 "../psControl.st" pVar->standardizing = 0; # line 147 "../psControl.st" epicsPrintf("Ramp off started for %s\n", pVar->ps_c); } else { # line 150 "../psControl.st" pVar->ramping_off = 0; # line 151 "../psControl.st" pVar->standardizing = 1; # line 152 "../psControl.st" epicsPrintf("Standardize started for %s\n", pVar->ps_c); } } return; case 3: { # line 158 "../psControl.st" pVar->setpt_change = 1; # line 159 "../psControl.st" pVar->wait_needed = 1; # line 160 "../psControl.st" pVar->cycle_count = pVar->max_cycle_count + 1; # line 161 "../psControl.st" pVar->standardizing = 0; # line 162 "../psControl.st" pVar->ramping_off = 0; # line 163 "../psControl.st" pVar->ps_limits_flag = 1; # line 164 "../psControl.st" seq_pvPut(ssId, 9/*ps_limits_flag*/, 0); # line 165 "../psControl.st" seq_efClear(ssId, 2/*ps_curr_setpt_ef*/); } return; } } /****** Code for state "psControl_ramp_wait" in state set "psControl" ******/ /* Entry function for state "psControl_ramp_wait" in state set "psControl" */ static void I_psControl_psControl_ramp_wait(SS_ID ssId, struct UserVar *pVar) { # line 176 "../psControl.st" if (pVar->ps_ramp && (!pVar->setpt_change)) { # line 177 "../psControl.st" pVar->ps_status = 1; # line 178 "../psControl.st" seq_pvPut(ssId, 6/*ps_status*/, 0); } # line 180 "../psControl.st" pVar->ramp_timeout = 0; } /* Delay function for state "psControl_ramp_wait" in state set "psControl" */ static void D_psControl_psControl_ramp_wait(SS_ID ssId, struct UserVar *pVar) { # line 190 "../psControl.st" seq_delayInit(ssId, 0, (300.0)); } /* Event function for state "psControl_ramp_wait" in state set "psControl" */ static seqBool E_psControl_psControl_ramp_wait(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 182 "../psControl.st" if ((!pVar->ps_on) || (pVar->standardizing && ((!pVar->standardize) || (!pVar->norampoff)))) { *pNextState = 6; *pTransNum = 0; return TRUE; } # line 186 "../psControl.st" if (!pVar->ps_ramp) { *pNextState = 3; *pTransNum = 1; return TRUE; } # line 190 "../psControl.st" if (seq_delay(ssId, 0)) { *pNextState = 6; *pTransNum = 2; return TRUE; } return FALSE; } /* Action function for state "psControl_ramp_wait" in state set "psControl" */ static void A_psControl_psControl_ramp_wait(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { } return; case 1: { } return; case 2: { # line 192 "../psControl.st" pVar->ramp_timeout = 1; } return; } } /****** Code for state "psControl_wait" in state set "psControl" ******/ /* Entry function for state "psControl_wait" in state set "psControl" */ static void I_psControl_psControl_wait(SS_ID ssId, struct UserVar *pVar) { # line 205 "../psControl.st" pVar->wait_delay_increment = 1.0; # line 206 "../psControl.st" pVar->wait_delay_sofar = 0; # line 207 "../psControl.st" pVar->wait_delay_total = pVar->wait_delay; # line 208 "../psControl.st" if (pVar->setpt_change) # line 208 "../psControl.st" pVar->wait_delay_total *= 2; # line 209 "../psControl.st" seq_pvPut(ssId, 0/*wait_delay_sofar*/, 0); } /* Delay function for state "psControl_wait" in state set "psControl" */ static void D_psControl_psControl_wait(SS_ID ssId, struct UserVar *pVar) { # line 228 "../psControl.st" seq_delayInit(ssId, 0, (pVar->wait_delay_increment)); } /* Event function for state "psControl_wait" in state set "psControl" */ static seqBool E_psControl_psControl_wait(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 213 "../psControl.st" if ((!pVar->ps_on) || (pVar->standardizing && ((!pVar->standardize) || (!pVar->norampoff))) || (pVar->setpt_change && (pVar->standardize || (!pVar->norampoff))) || ((pVar->cycle_count > pVar->max_cycle_count) && (pVar->wait_delay_sofar >= pVar->wait_delay_total))) { *pNextState = 6; *pTransNum = 0; return TRUE; } # line 219 "../psControl.st" if (pVar->ps_ramp) { *pNextState = 2; *pTransNum = 1; return TRUE; } # line 223 "../psControl.st" if ((!pVar->wait_needed) || ((pVar->cycle_count <= pVar->max_cycle_count) && (pVar->wait_delay_sofar >= pVar->wait_delay))) { *pNextState = 4; *pTransNum = 2; return TRUE; } # line 228 "../psControl.st" if (seq_delay(ssId, 0)) { *pNextState = 3; *pTransNum = 3; return TRUE; } return FALSE; } /* Action function for state "psControl_wait" in state set "psControl" */ static void A_psControl_psControl_wait(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { } return; case 1: { } return; case 2: { } return; case 3: { # line 230 "../psControl.st" if (!pVar->setpt_change) { # line 231 "../psControl.st" pVar->ps_status = 2; # line 232 "../psControl.st" seq_pvPut(ssId, 6/*ps_status*/, 0); } # line 234 "../psControl.st" pVar->wait_delay_sofar += pVar->wait_delay_increment; # line 235 "../psControl.st" seq_pvPut(ssId, 0/*wait_delay_sofar*/, 0); # line 236 "../psControl.st" pVar->wait_delay_increment = pVar->wait_delay_total - pVar->wait_delay_sofar; # line 237 "../psControl.st" if (pVar->wait_delay_increment > 1.0) # line 238 "../psControl.st" pVar->wait_delay_increment = 1.0; } return; } } /****** Code for state "psControl_set_current" in state set "psControl" ******/ /* Delay function for state "psControl_set_current" in state set "psControl" */ static void D_psControl_psControl_set_current(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "psControl_set_current" in state set "psControl" */ static seqBool E_psControl_psControl_set_current(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { if (TRUE) { *pNextState = 5; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "psControl_set_current" in state set "psControl" */ static void A_psControl_psControl_set_current(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 248 "../psControl.st" pVar->wait_needed = 1; # line 249 "../psControl.st" if (pVar->ramping_off) { # line 251 "../psControl.st" pVar->cycle_count = pVar->max_cycle_count + 1; # line 252 "../psControl.st" pVar->ps_curr_setpt = 0.0; } else # line 254 "../psControl.st" if (pVar->cycle_count < pVar->max_cycle_count) { # line 256 "../psControl.st" pVar->change_count++; # line 257 "../psControl.st" pVar->cycle_count = pVar->change_count / 2; # line 258 "../psControl.st" seq_pvPut(ssId, 11/*cycle_count*/, 0); # line 259 "../psControl.st" pVar->zero_current = pVar->zero_current ? 0 : 1; # line 260 "../psControl.st" if (pVar->zero_current) # line 260 "../psControl.st" pVar->ps_curr_setpt = 0.0; else # line 261 "../psControl.st" pVar->ps_curr_setpt = pVar->ps_curr_drvh; } else { # line 265 "../psControl.st" pVar->cycle_count = pVar->max_cycle_count + 1; # line 266 "../psControl.st" pVar->ps_curr_setpt = pVar->ps_curr_des; } # line 268 "../psControl.st" seq_pvPut(ssId, 7/*ps_curr_setpt*/, 0); } return; } } /****** Code for state "psControl_ramp_start" in state set "psControl" ******/ /* Delay function for state "psControl_ramp_start" in state set "psControl" */ static void D_psControl_psControl_ramp_start(SS_ID ssId, struct UserVar *pVar) { # line 282 "../psControl.st" seq_delayInit(ssId, 0, (5.0)); } /* Event function for state "psControl_ramp_start" in state set "psControl" */ static seqBool E_psControl_psControl_ramp_start(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 278 "../psControl.st" if ((!pVar->ps_on) || (pVar->standardizing && ((!pVar->standardize) || (!pVar->norampoff)))) { *pNextState = 6; *pTransNum = 0; return TRUE; } # line 282 "../psControl.st" if (pVar->ps_ramp || seq_delay(ssId, 0)) { *pNextState = 2; *pTransNum = 1; return TRUE; } return FALSE; } /* Action function for state "psControl_ramp_start" in state set "psControl" */ static void A_psControl_psControl_ramp_start(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { } return; case 1: { } return; } } /****** Code for state "psControl_done" in state set "psControl" ******/ /* Delay function for state "psControl_done" in state set "psControl" */ static void D_psControl_psControl_done(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "psControl_done" in state set "psControl" */ static seqBool E_psControl_psControl_done(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { if (TRUE) { *pNextState = 1; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "psControl_done" in state set "psControl" */ static void A_psControl_psControl_done(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 294 "../psControl.st" if (pVar->standardizing) { # line 295 "../psControl.st" if (!pVar->ps_on) { # line 296 "../psControl.st" epicsPrintf("Supply off - Standardize aborted for %s\n", pVar->ps_c); # line 297 "../psControl.st" pVar->ps_status = 4; } else # line 299 "../psControl.st" if ((!pVar->standardize) || (!pVar->norampoff)) { # line 300 "../psControl.st" epicsPrintf("Standardize aborted by user for %s\n", pVar->ps_c); # line 301 "../psControl.st" pVar->ps_status = 3; } else # line 303 "../psControl.st" if (pVar->ramp_timeout) { # line 304 "../psControl.st" epicsPrintf("Ramp timeout - Standardize aborted for %s\n", pVar->ps_c); # line 305 "../psControl.st" pVar->ps_status = 5; } else { # line 308 "../psControl.st" epicsPrintf("Standardize completed for %s\n", pVar->ps_c); # line 309 "../psControl.st" pVar->ps_status = 10; } # line 311 "../psControl.st" pVar->standardize = 0; # line 312 "../psControl.st" seq_pvPut(ssId, 10/*standardize*/, 0); # line 313 "../psControl.st" if (pVar->ps_status != 10) { # line 314 "../psControl.st" if (pVar->ps_curr_setpt != 0.0) { # line 315 "../psControl.st" pVar->ps_curr_setpt = 0.0; # line 316 "../psControl.st" seq_pvPut(ssId, 7/*ps_curr_setpt*/, 0); # line 317 "../psControl.st" seq_efSet(ssId, 2/*ps_curr_setpt_ef*/); } } } else # line 322 "../psControl.st" if (pVar->ramping_off) { # line 323 "../psControl.st" epicsPrintf("Ramp off completed for %s\n", pVar->ps_c); # line 324 "../psControl.st" pVar->ps_status = 4; # line 325 "../psControl.st" seq_efClear(ssId, 2/*ps_curr_setpt_ef*/); # line 326 "../psControl.st" pVar->norampoff = 1; # line 327 "../psControl.st" seq_pvPut(ssId, 2/*norampoff*/, 0); # line 328 "../psControl.st" pVar->standardize = 0; # line 329 "../psControl.st" seq_pvPut(ssId, 10/*standardize*/, 0); # line 330 "../psControl.st" pVar->ps_on_des = 0; # line 331 "../psControl.st" seq_pvPut(ssId, 4/*ps_on_des*/, 0); } # line 333 "../psControl.st" seq_pvPut(ssId, 6/*ps_status*/, 0); # line 334 "../psControl.st" if (!seq_efTest(ssId, 2/*ps_curr_setpt_ef*/)) { # line 335 "../psControl.st" pVar->ps_limits_flag = 0; # line 336 "../psControl.st" seq_pvPut(ssId, 9/*ps_limits_flag*/, 0); } } return; } } /* Program exit func */ static void G_prog_exit(SS_ID ssId, struct UserVar *pVar) { } /************************ Tables ************************/ /* Channel table */ static seqChan G_channels[] = { /* chName, offset, varName, varType, count, eventNum, efId, monitored, queueSize, queueIndex */ {"{ps}:ControlDelay", offsetof(struct UserVar, wait_delay_sofar), "wait_delay_sofar", "double", 1, 4, 0, 0, 0, 0}, {"{ps}:ControlDelayMax", offsetof(struct UserVar, wait_delay), "wait_delay", "double", 1, 5, 1, 1, 0, 0}, {"{ps}:Ramp", offsetof(struct UserVar, norampoff), "norampoff", "int", 1, 6, 0, 1, 0, 0}, {"{ps}:State", offsetof(struct UserVar, ps_on), "ps_on", "int", 1, 7, 0, 1, 0, 0}, {"{ps}:StateSetpt", offsetof(struct UserVar, ps_on_des), "ps_on_des", "int", 1, 8, 0, 0, 0, 0}, {"{ps}:RampStatus", offsetof(struct UserVar, ps_ramp), "ps_ramp", "int", 1, 9, 0, 1, 0, 0}, {"{ps}:ControlStatus", offsetof(struct UserVar, ps_status), "ps_status", "int", 1, 10, 0, 0, 0, 0}, {"{ps}:CurrSetpt", offsetof(struct UserVar, ps_curr_setpt), "ps_curr_setpt", "double", 1, 11, 2, 1, 0, 0}, {"{ps}:CurrSetptDes", offsetof(struct UserVar, ps_curr_des), "ps_curr_des", "double", 1, 12, 3, 1, 0, 0}, {"{ps}:Limits.F", offsetof(struct UserVar, ps_limits_flag), "ps_limits_flag", "int", 1, 13, 0, 0, 0, 0}, {"{ps}:Standardize", offsetof(struct UserVar, standardize), "standardize", "int", 1, 14, 0, 1, 0, 0}, {"{ps}:StandardizeNumCycle", offsetof(struct UserVar, cycle_count), "cycle_count", "int", 1, 15, 0, 0, 0, 0}, {"{ps}:StandardizeNumCycleMax", offsetof(struct UserVar, max_cycle_count), "max_cycle_count", "int", 1, 16, 0, 1, 0, 0}, {"{ps}:CurrSetpt.DRVH", offsetof(struct UserVar, ps_curr_drvh), "ps_curr_drvh", "double", 1, 17, 0, 1, 0, 0} }; /* Event masks for state set "psControl" */ static const seqMask EM_psControl_psControl_init[] = { 0x00000000, }; static const seqMask EM_psControl_psControl_request[] = { 0x000040c4, }; static const seqMask EM_psControl_psControl_ramp_wait[] = { 0x000042c0, }; static const seqMask EM_psControl_psControl_wait[] = { 0x0001c2f0, }; static const seqMask EM_psControl_psControl_set_current[] = { 0x00000000, }; static const seqMask EM_psControl_psControl_ramp_start[] = { 0x000042c0, }; static const seqMask EM_psControl_psControl_done[] = { 0x00000000, }; /* State table for state set "psControl" */ static seqState G_psControl_states[] = { { /* state name */ "psControl_init", /* action function */ A_psControl_psControl_init, /* event function */ E_psControl_psControl_init, /* delay function */ D_psControl_psControl_init, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_psControl_psControl_init, /* state options */ (0) }, { /* state name */ "psControl_request", /* action function */ A_psControl_psControl_request, /* event function */ E_psControl_psControl_request, /* delay function */ D_psControl_psControl_request, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_psControl_psControl_request, /* state options */ (0) }, { /* state name */ "psControl_ramp_wait", /* action function */ A_psControl_psControl_ramp_wait, /* event function */ E_psControl_psControl_ramp_wait, /* delay function */ D_psControl_psControl_ramp_wait, /* entry function */ I_psControl_psControl_ramp_wait, /* exit function */ 0, /* event mask array */ EM_psControl_psControl_ramp_wait, /* state options */ (0) }, { /* state name */ "psControl_wait", /* action function */ A_psControl_psControl_wait, /* event function */ E_psControl_psControl_wait, /* delay function */ D_psControl_psControl_wait, /* entry function */ I_psControl_psControl_wait, /* exit function */ 0, /* event mask array */ EM_psControl_psControl_wait, /* state options */ (0) }, { /* state name */ "psControl_set_current", /* action function */ A_psControl_psControl_set_current, /* event function */ E_psControl_psControl_set_current, /* delay function */ D_psControl_psControl_set_current, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_psControl_psControl_set_current, /* state options */ (0) }, { /* state name */ "psControl_ramp_start", /* action function */ A_psControl_psControl_ramp_start, /* event function */ E_psControl_psControl_ramp_start, /* delay function */ D_psControl_psControl_ramp_start, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_psControl_psControl_ramp_start, /* state options */ (0) }, { /* state name */ "psControl_done", /* action function */ A_psControl_psControl_done, /* event function */ E_psControl_psControl_done, /* delay function */ D_psControl_psControl_done, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_psControl_psControl_done, /* state options */ (0) }, }; /* State set table */ static seqSS G_state_sets[] = { { /* state set name */ "psControl", /* states */ G_psControl_states, /* number of states */ 7, /* number of delays */ 1 }, }; /* Program table (global) */ seqProgram psControl = { /* magic number */ 2001003, /* program name */ "psControl", /* channels */ G_channels, /* num. channels */ 14, /* state sets */ G_state_sets, /* num. state sets */ 1, /* user var size */ sizeof(struct UserVar), /* param */ "ps=00G-QD1", /* num. event flags */ 3, /* encoded options */ (0 | OPT_CONN | OPT_NEWEF | OPT_REENT), /* init func */ G_prog_init, /* entry func */ NULL, /* exit func */ G_prog_exit, /* num. queues */ 0 }; /* Register sequencer commands and program */ #include "epicsExport.h" static void psControlRegistrar (void) { seqRegisterSequencerCommands(); seqRegisterSequencerProgram (&psControl); } epicsExportRegistrar(psControlRegistrar);