/* Action function for state "high" in state set "low_high" */ static void seqg_action_low_high_0_high(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 63 "../opttVar.st" sprintf(seqg_var->msg, "changing to low"); # line 64 "../opttVar.st" seq_pvPutTmo(seqg_env, 0/*msg*/, DEFAULT, DEFAULT_TIMEOUT); } return; case 1: { # line 67 "../opttVar.st" sprintf(seqg_var->msg, "high, delay 0.3 timeout, decr v and re-enter high"); # line 68 "../opttVar.st" seq_pvPutTmo(seqg_env, 0/*msg*/, DEFAULT, DEFAULT_TIMEOUT); # line 69 "../opttVar.st" seqg_var->seqg_vars_low_high.seqg_vars_high.v -= 1; # line 70 "../opttVar.st" sprintf(seqg_var->msg, "v = %d", seqg_var->seqg_vars_low_high.seqg_vars_high.v); # line 71 "../opttVar.st" seq_pvPutTmo(seqg_env, 0/*msg*/, DEFAULT, DEFAULT_TIMEOUT); } return; } }
/* Action function for state "run" in state set "write" */ static void seqg_action_write_4_run(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { } return; case 1: { # line 194 "../pvGet.st" epicsMutexMustLock(mutex); # line 195 "../pvGet.st" shared = seqg_var->seqg_vars_write.out; # line 196 "../pvGet.st" seq_pvPutTmo(seqg_env, 3/*out*/, DEFAULT, DEFAULT_TIMEOUT); # line 197 "../pvGet.st" seqg_var->anon = seqg_var->seqg_vars_write.out; # line 198 "../pvGet.st" seq_pvPutTmo(seqg_env, 0/*anon*/, DEFAULT, DEFAULT_TIMEOUT); # line 199 "../pvGet.st" epicsMutexUnlock(mutex); # line 200 "../pvGet.st" seqg_var->seqg_vars_write.out++; } return; } }
/* Action function for state "low" in state set "low_high" */ static void seqg_action_low_high_0_low(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { # line 39 "../opttVar.st" sprintf(seqg_var->msg, "low, delay = %g, now changing to high", seqg_var->seqg_vars_low_high.seqg_vars_low.d); # line 40 "../opttVar.st" seq_pvPutTmo(seqg_env, 0/*msg*/, DEFAULT, DEFAULT_TIMEOUT); } return; case 1: { # line 43 "../opttVar.st" sprintf(seqg_var->msg, "low, delay timeout, reenter low"); # line 44 "../opttVar.st" seq_pvPutTmo(seqg_env, 0/*msg*/, DEFAULT, DEFAULT_TIMEOUT); # line 45 "../opttVar.st" seqg_var->seqg_vars_low_high.seqg_vars_low.d += 0.2; # line 46 "../opttVar.st" sprintf(seqg_var->msg, "low, waiting %g secs to iterate", seqg_var->seqg_vars_low_high.seqg_vars_low.d); # line 47 "../opttVar.st" seq_pvPutTmo(seqg_env, 0/*msg*/, DEFAULT, DEFAULT_TIMEOUT); } return; } }
/* Exit function for state "low" in state set "low_high" */ static void seqg_exit_low_high_0_low(SS_ID seqg_env) { # line 50 "../opttVar.st" sprintf(seqg_var->msg, "low, print this on exit of low"); # line 51 "../opttVar.st" seq_pvPutTmo(seqg_env, 0/*msg*/, DEFAULT, DEFAULT_TIMEOUT); }
/* Entry function for state "low" in state set "low_high" */ static void seqg_entry_low_high_0_low(SS_ID seqg_env) { # line 34 "../opttVar.st" seqg_var->seqg_vars_low_high.seqg_vars_low.d = 0.4; # line 35 "../opttVar.st" sprintf(seqg_var->msg, "Entered low, initialize delay to %g sec.", seqg_var->seqg_vars_low_high.seqg_vars_low.d); # line 36 "../opttVar.st" seq_pvPutTmo(seqg_env, 0/*msg*/, DEFAULT, DEFAULT_TIMEOUT); }
/* Entry function for state "high" in state set "low_high" */ static void seqg_entry_low_high_0_high(SS_ID seqg_env) { # line 58 "../opttVar.st" seqg_var->seqg_vars_low_high.seqg_vars_high.v = 3; # line 59 "../opttVar.st" sprintf(seqg_var->msg, "Entered high"); # line 60 "../opttVar.st" seq_pvPutTmo(seqg_env, 0/*msg*/, DEFAULT, DEFAULT_TIMEOUT); }
/* Entry function for state "test" in state set "pvGetCancel" */ static void seqg_entry_pvGetCancel_0_test(SS_ID seqg_env) { # line 37 "../pvGetCancel.st" testOk1(seq_pvGetTmo(seqg_env, 0/*x*/ + (CH_ID)(0), ASYNC, DEFAULT_TIMEOUT) == pvStatOK); # line 38 "../pvGetCancel.st" testOk1(seq_pvGetTmo(seqg_env, 0/*x*/ + (CH_ID)(1), ASYNC, DEFAULT_TIMEOUT) == pvStatOK); # line 39 "../pvGetCancel.st" seq_pvArrayGetCancel(seqg_env, 0/*x*/, 2); # line 40 "../pvGetCancel.st" seqg_vars_pvGetCancel.x[0] = seqg_vars_pvGetCancel.x[1] = 0; # line 41 "../pvGetCancel.st" seqg_vars_pvGetCancel.y[0] = seqg_vars_pvGetCancel.y[1] = 1; # line 42 "../pvGetCancel.st" testOk1(seq_pvPutTmo(seqg_env, 2/*y*/ + (CH_ID)(0), SYNC, DEFAULT_TIMEOUT) == pvStatOK); # line 43 "../pvGetCancel.st" testOk1(seq_pvPutTmo(seqg_env, 2/*y*/ + (CH_ID)(1), SYNC, DEFAULT_TIMEOUT) == pvStatOK); # line 44 "../pvGetCancel.st" testOk1(seq_pvGetTmo(seqg_env, 0/*x*/ + (CH_ID)(0), ASYNC, DEFAULT_TIMEOUT) == pvStatOK); # line 45 "../pvGetCancel.st" testOk1(seq_pvGetTmo(seqg_env, 0/*x*/ + (CH_ID)(1), ASYNC, DEFAULT_TIMEOUT) == pvStatOK); }
/* Action function for state "makeRequest" in state set "monitorEvflagTest" */ static void seqg_action_monitorEvflagTest_0_makeRequest(SS_ID seqg_env, int seqg_trn, int *seqg_pnst) { switch(seqg_trn) { case 0: { } return; case 1: { # line 38 "../monitorEvflag.st" testPass("no error in %d cycles", (20 * 500)); } return; case 2: { # line 41 "../monitorEvflag.st" seqg_var->requested = seqg_var->seqg_vars_monitorEvflagTest.cycleCount; # line 42 "../monitorEvflag.st" seq_pvPutTmo(seqg_env, 0/*requested*/, DEFAULT, DEFAULT_TIMEOUT); } return; } }
/* * Put a variable's value to a PV. */ epicsShareFunc pvStat seq_pvPut(SS_ID ss, CH_ID chId, enum compType compType) { return seq_pvPutTmo(ss, chId, compType, DEFAULT_TIMEOUT); }