/* Generated with snc from ../tempDlwgLimits.stt */ /* Program "tempDlwgLimits" */ #include #include #include #include #include "epicsTypes.h" #include "seqCom.h" /* Variable declarations */ struct UserVar { # line 81 "../tempDlwgLimits.stt" int lowrf; # line 82 "../tempDlwgLimits.stt" int status; # line 91 "../tempDlwgLimits.stt" string statustext; # line 95 "../tempDlwgLimits.stt" long swrd; # line 99 "../tempDlwgLimits.stt" long stat; # line 110 "../tempDlwgLimits.stt" float lolo_rfon; # line 114 "../tempDlwgLimits.stt" float low_rfon; # line 118 "../tempDlwgLimits.stt" float hihi_rfon; # line 122 "../tempDlwgLimits.stt" float high_rfon; # line 129 "../tempDlwgLimits.stt" float lolo_rfoff; # line 133 "../tempDlwgLimits.stt" float low_rfoff; # line 138 "../tempDlwgLimits.stt" float lolo; # line 142 "../tempDlwgLimits.stt" float low; # line 146 "../tempDlwgLimits.stt" float hihi; # line 150 "../tempDlwgLimits.stt" float high; # line 155 "../tempDlwgLimits.stt" string pvname; }; /* C code definitions */ # line 56 "../tempDlwgLimits.stt" #include #include #include #include #include #include /* time() */ #include "errlog.h" /* printf */ /* Define 'status' values */ #define INIT 0 #define MAIN 1 #define LOWRF 2 #define TIMER 3 #define TIMERCOMP 4 #define RFON 5 /* Timeout in seconds. After RF back on, wait TIMEOUT before restoring limits */ #define TIMEOUT 300 /* Period between checking limits; if users change any RFON/RFOFF limits, we want to update ours */ #define LOOP_PERIOD 5 /* 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, "", }; *pVar = pVarInit; } /* Program entry func */ static void G_prog_entry(SS_ID ssId, struct UserVar *pVar) { # line 179 "../tempDlwgLimits.stt" seq_efClear(ssId, 1/*ef_main*/); # line 180 "../tempDlwgLimits.stt" seq_efClear(ssId, 2/*ef_eval*/); # line 181 "../tempDlwgLimits.stt" seq_efClear(ssId, 3/*ef_lowrf_tol*/); # line 182 "../tempDlwgLimits.stt" seq_efClear(ssId, 4/*ef_rfon_tol*/); # line 183 "../tempDlwgLimits.stt" seq_efClear(ssId, 5/*ef_timer*/); } /****** Code for state "seq_init" in state set "main" ******/ /* Delay function for state "seq_init" in state set "main" */ static void D_main_seq_init(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "seq_init" in state set "main" */ static seqBool E_main_seq_init(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 190 "../tempDlwgLimits.stt" if (seq_pvConnectCount(ssId) == seq_pvChannelCount(ssId)) { *pNextState = 1; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "seq_init" in state set "main" */ static void A_main_seq_init(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 193 "../tempDlwgLimits.stt" pVar->lolo = pVar->lolo_rfon; # line 194 "../tempDlwgLimits.stt" pVar->low = pVar->low_rfon; # line 195 "../tempDlwgLimits.stt" pVar->hihi = pVar->hihi_rfon; # line 196 "../tempDlwgLimits.stt" pVar->high = pVar->high_rfon; # line 198 "../tempDlwgLimits.stt" seq_pvPut(ssId, 9/*lolo*/, 0); # line 199 "../tempDlwgLimits.stt" seq_pvPut(ssId, 10/*low*/, 0); # line 200 "../tempDlwgLimits.stt" seq_pvPut(ssId, 11/*hihi*/, 0); # line 201 "../tempDlwgLimits.stt" seq_pvPut(ssId, 12/*high*/, 0); # line 203 "../tempDlwgLimits.stt" pVar->status = INIT; # line 204 "../tempDlwgLimits.stt" sprintf(pVar->statustext, "RF on"); # line 205 "../tempDlwgLimits.stt" seq_pvPut(ssId, 0/*statustext*/, 0); # line 206 "../tempDlwgLimits.stt" seq_pvGet(ssId, 13/*pvname*/, 0); } return; } } /****** Code for state "init" in state set "main" ******/ /* Delay function for state "init" in state set "main" */ static void D_main_init(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "init" in state set "main" */ static seqBool E_main_init(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 211 "../tempDlwgLimits.stt" if (seq_efTestAndClear(ssId, 1/*ef_main*/) || pVar->status == INIT) { *pNextState = 2; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "init" in state set "main" */ static void A_main_init(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { } return; } } /****** Code for state "mon" in state set "main" ******/ /* Delay function for state "mon" in state set "main" */ static void D_main_mon(SS_ID ssId, struct UserVar *pVar) { # line 216 "../tempDlwgLimits.stt" seq_delayInit(ssId, 0, (LOOP_PERIOD)); } /* Event function for state "mon" in state set "main" */ static seqBool E_main_mon(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 216 "../tempDlwgLimits.stt" if (seq_efTestAndClear(ssId, 6/*ef_klysstat*/) || seq_delay(ssId, 0) || pVar->status == INIT) { *pNextState = 1; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "mon" in state set "main" */ static void A_main_mon(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 218 "../tempDlwgLimits.stt" if (pVar->status == RFON) { # line 219 "../tempDlwgLimits.stt" if (pVar->lolo != pVar->lolo_rfon) { # line 220 "../tempDlwgLimits.stt" pVar->lolo = pVar->lolo_rfon; # line 221 "../tempDlwgLimits.stt" seq_pvPut(ssId, 9/*lolo*/, 0); } # line 223 "../tempDlwgLimits.stt" if (pVar->low != pVar->low_rfon) { # line 224 "../tempDlwgLimits.stt" pVar->low = pVar->low_rfon; # line 225 "../tempDlwgLimits.stt" seq_pvPut(ssId, 10/*low*/, 0); } # line 227 "../tempDlwgLimits.stt" if (pVar->hihi != pVar->hihi_rfon) { # line 228 "../tempDlwgLimits.stt" pVar->hihi = pVar->hihi_rfon; # line 229 "../tempDlwgLimits.stt" seq_pvPut(ssId, 11/*hihi*/, 0); } # line 231 "../tempDlwgLimits.stt" if (pVar->high != pVar->high_rfon) { # line 232 "../tempDlwgLimits.stt" pVar->high = pVar->high_rfon; # line 233 "../tempDlwgLimits.stt" seq_pvPut(ssId, 12/*high*/, 0); } } else # line 236 "../tempDlwgLimits.stt" if (pVar->status == LOWRF) { # line 237 "../tempDlwgLimits.stt" if (pVar->lolo != pVar->lolo_rfoff) { # line 238 "../tempDlwgLimits.stt" pVar->lolo = pVar->lolo_rfoff; # line 239 "../tempDlwgLimits.stt" seq_pvPut(ssId, 9/*lolo*/, 0); } # line 241 "../tempDlwgLimits.stt" if (pVar->low != pVar->low_rfoff) { # line 242 "../tempDlwgLimits.stt" pVar->low = pVar->low_rfoff; # line 243 "../tempDlwgLimits.stt" seq_pvPut(ssId, 10/*low*/, 0); } # line 245 "../tempDlwgLimits.stt" if (pVar->hihi != pVar->hihi_rfon) { # line 246 "../tempDlwgLimits.stt" pVar->hihi = pVar->hihi_rfon; # line 247 "../tempDlwgLimits.stt" seq_pvPut(ssId, 11/*hihi*/, 0); } # line 249 "../tempDlwgLimits.stt" if (pVar->high != pVar->high_rfon) { # line 250 "../tempDlwgLimits.stt" pVar->high = pVar->high_rfon; # line 251 "../tempDlwgLimits.stt" seq_pvPut(ssId, 12/*high*/, 0); } } else # line 254 "../tempDlwgLimits.stt" if (pVar->status == INIT) # line 255 "../tempDlwgLimits.stt" pVar->status = RFON; # line 257 "../tempDlwgLimits.stt" seq_efSet(ssId, 2/*ef_eval*/); } return; } } /****** Code for state "init" in state set "eval" ******/ /* Delay function for state "init" in state set "eval" */ static void D_eval_init(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "init" in state set "eval" */ static seqBool E_eval_init(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 289 "../tempDlwgLimits.stt" if (seq_efTestAndClear(ssId, 2/*ef_eval*/)) { *pNextState = 1; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "init" in state set "eval" */ static void A_eval_init(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { } return; } } /****** Code for state "eval_stat" in state set "eval" ******/ /* Delay function for state "eval_stat" in state set "eval" */ static void D_eval_eval_stat(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "eval_stat" in state set "eval" */ static seqBool E_eval_eval_stat(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { if (TRUE) { *pNextState = 0; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "eval_stat" in state set "eval" */ static void A_eval_eval_stat(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 296 "../tempDlwgLimits.stt" pVar->lowrf = (pVar->stat & 16) | (pVar->stat & 64) | (pVar->swrd & 1) | (pVar->swrd & 4) | (pVar->swrd & 8) | (pVar->swrd & 32); # line 298 "../tempDlwgLimits.stt" if (pVar->lowrf && pVar->status != LOWRF) { # line 299 "../tempDlwgLimits.stt" if (pVar->status == TIMERCOMP) { # line 300 "../tempDlwgLimits.stt" pVar->status = LOWRF; # line 301 "../tempDlwgLimits.stt" sprintf(pVar->statustext, "Low RF"); # line 302 "../tempDlwgLimits.stt" seq_pvPut(ssId, 0/*statustext*/, 0); # line 303 "../tempDlwgLimits.stt" seq_efSet(ssId, 1/*ef_main*/); } else # line 306 "../tempDlwgLimits.stt" if (pVar->status != TIMER) { # line 307 "../tempDlwgLimits.stt" pVar->status = LOWRF; # line 308 "../tempDlwgLimits.stt" sprintf(pVar->statustext, "Low RF"); # line 309 "../tempDlwgLimits.stt" seq_pvPut(ssId, 0/*statustext*/, 0); # line 310 "../tempDlwgLimits.stt" seq_efSet(ssId, 3/*ef_lowrf_tol*/); } else { # line 314 "../tempDlwgLimits.stt" seq_efSet(ssId, 1/*ef_main*/); } } else # line 318 "../tempDlwgLimits.stt" if (!pVar->lowrf && pVar->status == LOWRF) { # line 319 "../tempDlwgLimits.stt" seq_efSet(ssId, 5/*ef_timer*/); } else # line 322 "../tempDlwgLimits.stt" if (!pVar->lowrf && pVar->status == TIMERCOMP) { # line 323 "../tempDlwgLimits.stt" seq_efSet(ssId, 4/*ef_rfon_tol*/); } else { # line 327 "../tempDlwgLimits.stt" seq_efSet(ssId, 1/*ef_main*/); } } return; } } /****** Code for state "init" in state set "lowrf" ******/ /* Delay function for state "init" in state set "lowrf" */ static void D_lowrf_init(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "init" in state set "lowrf" */ static seqBool E_lowrf_init(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 346 "../tempDlwgLimits.stt" if (seq_efTestAndClear(ssId, 3/*ef_lowrf_tol*/)) { *pNextState = 1; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "init" in state set "lowrf" */ static void A_lowrf_init(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { } return; } } /****** Code for state "lowrf_tol" in state set "lowrf" ******/ /* Delay function for state "lowrf_tol" in state set "lowrf" */ static void D_lowrf_lowrf_tol(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "lowrf_tol" in state set "lowrf" */ static seqBool E_lowrf_lowrf_tol(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { if (TRUE) { *pNextState = 0; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "lowrf_tol" in state set "lowrf" */ static void A_lowrf_lowrf_tol(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 352 "../tempDlwgLimits.stt" pVar->lolo = pVar->lolo_rfoff; # line 353 "../tempDlwgLimits.stt" pVar->low = pVar->low_rfoff; # line 354 "../tempDlwgLimits.stt" seq_pvPut(ssId, 9/*lolo*/, SYNC); # line 355 "../tempDlwgLimits.stt" seq_pvPut(ssId, 10/*low*/, SYNC); # line 356 "../tempDlwgLimits.stt" errlogPrintfNoConsole("%.12s RF low. Lowering %s low alarm limits: LOLO=%.1f degF, LOW=%.1f degF\n", pVar->pvname, pVar->pvname, pVar->lolo, pVar->low); # line 357 "../tempDlwgLimits.stt" seq_efSet(ssId, 1/*ef_main*/); } return; } } /****** Code for state "init" in state set "timer" ******/ /* Delay function for state "init" in state set "timer" */ static void D_timer_init(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "init" in state set "timer" */ static seqBool E_timer_init(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 376 "../tempDlwgLimits.stt" if (seq_efTestAndClear(ssId, 5/*ef_timer*/)) { *pNextState = 1; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "init" in state set "timer" */ static void A_timer_init(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 378 "../tempDlwgLimits.stt" pVar->status = TIMER; # line 379 "../tempDlwgLimits.stt" sprintf(pVar->statustext, "Timer running"); # line 380 "../tempDlwgLimits.stt" seq_pvPut(ssId, 0/*statustext*/, 0); } return; } } /****** Code for state "run_timer" in state set "timer" ******/ /* Delay function for state "run_timer" in state set "timer" */ static void D_timer_run_timer(SS_ID ssId, struct UserVar *pVar) { # line 385 "../tempDlwgLimits.stt" seq_delayInit(ssId, 0, (TIMEOUT)); } /* Event function for state "run_timer" in state set "timer" */ static seqBool E_timer_run_timer(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 385 "../tempDlwgLimits.stt" if (seq_delay(ssId, 0)) { *pNextState = 0; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "run_timer" in state set "timer" */ static void A_timer_run_timer(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 386 "../tempDlwgLimits.stt" pVar->status = TIMERCOMP; # line 387 "../tempDlwgLimits.stt" sprintf(pVar->statustext, "Timer complete"); # line 388 "../tempDlwgLimits.stt" seq_pvPut(ssId, 0/*statustext*/, 0); # line 389 "../tempDlwgLimits.stt" seq_efSet(ssId, 2/*ef_eval*/); } return; } } /****** Code for state "init" in state set "rfon" ******/ /* Delay function for state "init" in state set "rfon" */ static void D_rfon_init(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "init" in state set "rfon" */ static seqBool E_rfon_init(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { # line 407 "../tempDlwgLimits.stt" if (seq_efTestAndClear(ssId, 4/*ef_rfon_tol*/)) { *pNextState = 1; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "init" in state set "rfon" */ static void A_rfon_init(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { } return; } } /****** Code for state "rfon_tol" in state set "rfon" ******/ /* Delay function for state "rfon_tol" in state set "rfon" */ static void D_rfon_rfon_tol(SS_ID ssId, struct UserVar *pVar) { } /* Event function for state "rfon_tol" in state set "rfon" */ static seqBool E_rfon_rfon_tol(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState) { if (TRUE) { *pNextState = 0; *pTransNum = 0; return TRUE; } return FALSE; } /* Action function for state "rfon_tol" in state set "rfon" */ static void A_rfon_rfon_tol(SS_ID ssId, struct UserVar *pVar, int transNum, int *pNextState) { switch(transNum) { case 0: { # line 413 "../tempDlwgLimits.stt" pVar->lolo = pVar->lolo_rfon; # line 414 "../tempDlwgLimits.stt" pVar->low = pVar->low_rfon; # line 415 "../tempDlwgLimits.stt" seq_pvPut(ssId, 9/*lolo*/, 0); # line 416 "../tempDlwgLimits.stt" seq_pvPut(ssId, 10/*low*/, 0); # line 417 "../tempDlwgLimits.stt" errlogPrintfNoConsole("%.12s RF on. Restoring %s low alarm limits: LOLO=%.1f degF, LOW=%.1f degF\n", pVar->pvname, pVar->pvname, pVar->lolo, pVar->low); # line 418 "../tempDlwgLimits.stt" pVar->status = RFON; # line 419 "../tempDlwgLimits.stt" sprintf(pVar->statustext, "RF on"); # line 420 "../tempDlwgLimits.stt" seq_pvPut(ssId, 0/*statustext*/, 0); # line 421 "../tempDlwgLimits.stt" seq_efSet(ssId, 1/*ef_main*/); } return; } } /************************ Tables ************************/ /* Channel table */ static seqChan G_channels[] = { /* chName, offset, varName, varType, count, eventNum, efId, monitored, queueSize, queueIndex */ {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP_STA", offsetof(struct UserVar, statustext), "statustext", "string", 1, 7, 0, 0, 0, 0}, #if LONG_MAX > 0x7fffffffL # line 95 "../tempDlwgLimits.stt" #error variable 'long swrd' cannot be assigned to a PV (on the chosen target system)\ because Channel Access does not support integral types longer than 4 bytes.\ You can use 'int' instead, or the fixed size type 'int32_t'. #endif {"KLYS:{LOCA}:{UNIT}:SWRD_VAL", offsetof(struct UserVar, swrd), "swrd", "long", 1, 8, 6, 1, 0, 0}, #if LONG_MAX > 0x7fffffffL # line 99 "../tempDlwgLimits.stt" #error variable 'long stat' cannot be assigned to a PV (on the chosen target system)\ because Channel Access does not support integral types longer than 4 bytes.\ You can use 'int' instead, or the fixed size type 'int32_t'. #endif {"KLYS:{LOCA}:{UNIT}:STAT_VAL", offsetof(struct UserVar, stat), "stat", "long", 1, 9, 6, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP_RFON.LOLO", offsetof(struct UserVar, lolo_rfon), "lolo_rfon", "float", 1, 10, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP_RFON.LOW", offsetof(struct UserVar, low_rfon), "low_rfon", "float", 1, 11, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP_RFON.HIHI", offsetof(struct UserVar, hihi_rfon), "hihi_rfon", "float", 1, 12, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP_RFON.HIGH", offsetof(struct UserVar, high_rfon), "high_rfon", "float", 1, 13, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP_RFOFF.LOLO", offsetof(struct UserVar, lolo_rfoff), "lolo_rfoff", "float", 1, 14, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP_RFOFF.LOW", offsetof(struct UserVar, low_rfoff), "low_rfoff", "float", 1, 15, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP.LOLO", offsetof(struct UserVar, lolo), "lolo", "float", 1, 16, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP.LOW", offsetof(struct UserVar, low), "low", "float", 1, 17, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP.HIHI", offsetof(struct UserVar, hihi), "hihi", "float", 1, 18, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP.HIGH", offsetof(struct UserVar, high), "high", "float", 1, 19, 0, 1, 0, 0}, {"KLYS:{LOCA}:{UNIT}:DL_WG_TEMP.NAME", offsetof(struct UserVar, pvname), "pvname", "string", 1, 20, 0, 0, 0, 0} }; /* Event masks for state set "main" */ static const seqMask EM_main_seq_init[] = { 0x00000000, }; static const seqMask EM_main_init[] = { 0x00000002, }; static const seqMask EM_main_mon[] = { 0x00000040, }; /* State table for state set "main" */ static seqState G_main_states[] = { { /* state name */ "seq_init", /* action function */ A_main_seq_init, /* event function */ E_main_seq_init, /* delay function */ D_main_seq_init, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_main_seq_init, /* state options */ (0) }, { /* state name */ "init", /* action function */ A_main_init, /* event function */ E_main_init, /* delay function */ D_main_init, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_main_init, /* state options */ (0) }, { /* state name */ "mon", /* action function */ A_main_mon, /* event function */ E_main_mon, /* delay function */ D_main_mon, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_main_mon, /* state options */ (0) }, }; /* Event masks for state set "eval" */ static const seqMask EM_eval_init[] = { 0x00000004, }; static const seqMask EM_eval_eval_stat[] = { 0x00000000, }; /* State table for state set "eval" */ static seqState G_eval_states[] = { { /* state name */ "init", /* action function */ A_eval_init, /* event function */ E_eval_init, /* delay function */ D_eval_init, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_eval_init, /* state options */ (0) }, { /* state name */ "eval_stat", /* action function */ A_eval_eval_stat, /* event function */ E_eval_eval_stat, /* delay function */ D_eval_eval_stat, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_eval_eval_stat, /* state options */ (0) }, }; /* Event masks for state set "lowrf" */ static const seqMask EM_lowrf_init[] = { 0x00000008, }; static const seqMask EM_lowrf_lowrf_tol[] = { 0x00000000, }; /* State table for state set "lowrf" */ static seqState G_lowrf_states[] = { { /* state name */ "init", /* action function */ A_lowrf_init, /* event function */ E_lowrf_init, /* delay function */ D_lowrf_init, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_lowrf_init, /* state options */ (0) }, { /* state name */ "lowrf_tol", /* action function */ A_lowrf_lowrf_tol, /* event function */ E_lowrf_lowrf_tol, /* delay function */ D_lowrf_lowrf_tol, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_lowrf_lowrf_tol, /* state options */ (0) }, }; /* Event masks for state set "timer" */ static const seqMask EM_timer_init[] = { 0x00000020, }; static const seqMask EM_timer_run_timer[] = { 0x00000000, }; /* State table for state set "timer" */ static seqState G_timer_states[] = { { /* state name */ "init", /* action function */ A_timer_init, /* event function */ E_timer_init, /* delay function */ D_timer_init, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_timer_init, /* state options */ (0) }, { /* state name */ "run_timer", /* action function */ A_timer_run_timer, /* event function */ E_timer_run_timer, /* delay function */ D_timer_run_timer, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_timer_run_timer, /* state options */ (0) }, }; /* Event masks for state set "rfon" */ static const seqMask EM_rfon_init[] = { 0x00000010, }; static const seqMask EM_rfon_rfon_tol[] = { 0x00000000, }; /* State table for state set "rfon" */ static seqState G_rfon_states[] = { { /* state name */ "init", /* action function */ A_rfon_init, /* event function */ E_rfon_init, /* delay function */ D_rfon_init, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_rfon_init, /* state options */ (0) }, { /* state name */ "rfon_tol", /* action function */ A_rfon_rfon_tol, /* event function */ E_rfon_rfon_tol, /* delay function */ D_rfon_rfon_tol, /* entry function */ 0, /* exit function */ 0, /* event mask array */ EM_rfon_rfon_tol, /* state options */ (0) }, }; /* State set table */ static seqSS G_state_sets[] = { { /* state set name */ "main", /* states */ G_main_states, /* number of states */ 3, /* number of delays */ 1 }, { /* state set name */ "eval", /* states */ G_eval_states, /* number of states */ 2, /* number of delays */ 0 }, { /* state set name */ "lowrf", /* states */ G_lowrf_states, /* number of states */ 2, /* number of delays */ 0 }, { /* state set name */ "timer", /* states */ G_timer_states, /* number of states */ 2, /* number of delays */ 1 }, { /* state set name */ "rfon", /* states */ G_rfon_states, /* number of states */ 2, /* number of delays */ 0 }, }; /* Program table (global) */ seqProgram tempDlwgLimits = { /* magic number */ 2001006, /* program name */ "tempDlwgLimits", /* channels */ G_channels, /* num. channels */ 14, /* state sets */ G_state_sets, /* num. state sets */ 5, /* user var size */ sizeof(struct UserVar), /* param */ "", /* num. event flags */ 6, /* encoded options */ (0 | OPT_CONN | OPT_NEWEF | OPT_REENT), /* init func */ G_prog_init, /* entry func */ G_prog_entry, /* exit func */ NULL, /* num. queues */ 0 }; /* Register sequencer commands and program */ #include "epicsExport.h" static void tempDlwgLimitsRegistrar (void) { seqRegisterSequencerCommands(); seqRegisterSequencerProgram (&tempDlwgLimits); } epicsExportRegistrar(tempDlwgLimitsRegistrar);