コード例 #1
0
ファイル: monitorEvflag.c プロジェクト: T-A-R-L-A/EPICS-Base
/* Event function for state "makeRequest" in state set "monitorEvflagTest" */
static seqBool E_monitorEvflagTest_0_makeRequest(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState)
{
# line 35 "../monitorEvflag.st"
	if (pVar->UserVar_monitorEvflagTest.error)
	{
		seq_exit(ssId);
		*pTransNum = 0;
		return TRUE;
	}
# line 37 "../monitorEvflag.st"
	if (pVar->UserVar_monitorEvflagTest.cycleCount > (20 * 500))
	{
		seq_exit(ssId);
		*pTransNum = 1;
		return TRUE;
	}
# line 40 "../monitorEvflag.st"
	if (pVar->UserVar_monitorEvflagTest.cycleCount <= (20 * 500))
	{
		*pNextState = 2;
		*pTransNum = 2;
		return TRUE;
	}
	return FALSE;
}
コード例 #2
0
ファイル: monitorEvflag.c プロジェクト: rorydog1/epics
/* Event function for state "makeRequest" in state set "monitorEvflagTest" */
static seqBool seqg_event_monitorEvflagTest_0_makeRequest(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 35 "../monitorEvflag.st"
	if (seqg_var->seqg_vars_monitorEvflagTest.error)
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 0;
		return TRUE;
	}
# line 37 "../monitorEvflag.st"
	if (seqg_var->seqg_vars_monitorEvflagTest.cycleCount > (20 * 500))
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 1;
		return TRUE;
	}
# line 40 "../monitorEvflag.st"
	if (seqg_var->seqg_vars_monitorEvflagTest.cycleCount <= (20 * 500))
	{
		*seqg_pnst = 2;
		*seqg_ptrn = 2;
		return TRUE;
	}
	return FALSE;
}
コード例 #3
0
ファイル: opttVar.c プロジェクト: rorydog1/epics
/* Event function for state "check_msg" in state set "check" */
static seqBool seqg_event_check_1_check_msg(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 106 "../opttVar.st"
	if (seqg_var->seqg_vars_check.repeat && !*seqg_var->seqg_vars_check.xp)
	{
		*seqg_pnst = 0;
		*seqg_ptrn = 0;
		return TRUE;
	}
# line 111 "../opttVar.st"
	if (!*seqg_var->seqg_vars_check.xp)
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 1;
		return TRUE;
	}
# line 113 "../opttVar.st"
	if (seq_pvGetQ(seqg_env, 0/*msg*/))
	{
		*seqg_pnst = 0;
		*seqg_ptrn = 2;
		return TRUE;
	}
	return FALSE;
}
コード例 #4
0
ファイル: userfuncEf.c プロジェクト: rorydog1/epics
/* Event function for state "check_set" in state set "myss" */
static seqBool seqg_event_myss_0_check_set(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 41 "../userfuncEf.st"
	if (seq_efTestAndClear(seqg_env, x))
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 0;
		return TRUE;
	}
# line 44 "../userfuncEf.st"
	if (seq_delay(seqg_env, 0.5))
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 1;
		return TRUE;
	}
	return FALSE;
}
コード例 #5
0
ファイル: seq_task.c プロジェクト: ukaea/epics
/*
 * Delete all state set threads and do general clean-up.
 */
epicsShareFunc void epicsShareAPI seqStop(epicsThreadId tid)
{
	PROG	*sp;

	/* Check that this is indeed a state program thread */
	sp = seqFindProg(tid);
	if (sp == NULL)
		return;
	seq_exit(sp->ss);
}
コード例 #6
0
ファイル: include_windows_h.c プロジェクト: rorydog1/epics
/* Event function for state "simple" in state set "simple" */
static seqBool seqg_event_simple_0_simple(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
	if (TRUE)
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 0;
		return TRUE;
	}
	return FALSE;
}
コード例 #7
0
ファイル: reassign.c プロジェクト: T-A-R-L-A/EPICS-Base
/* Event function for state "done" in state set "reassign" */
static seqBool E_reassign_0_done(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState)
{
# line 89 "../reassign.st"
    if (1)
    {
        seq_exit(ssId);
        *pTransNum = 0;
        return TRUE;
    }
    return FALSE;
}
コード例 #8
0
ファイル: pvGet.c プロジェクト: rorydog1/epics
/* Event function for state "done" in state set "read_named" */
static seqBool seqg_event_read_named_0_done(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 67 "../pvGet.st"
	if (FALSE)
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 0;
		return TRUE;
	}
	return FALSE;
}
コード例 #9
0
ファイル: pvGet.c プロジェクト: rorydog1/epics
/* Event function for state "done" in state set "read_anon_sync" */
static seqBool seqg_event_read_anon_sync_3_done(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 181 "../pvGet.st"
	if (FALSE)
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 0;
		return TRUE;
	}
	return FALSE;
}
コード例 #10
0
ファイル: safeModeNotAssigned.c プロジェクト: rorydog1/epics
/* Event function for state "done" in state set "ss1" */
static seqBool seqg_event_ss1_0_done(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 33 "../safeModeNotAssigned.st"
	if (seq_delay(seqg_env, 0.2))
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 0;
		return TRUE;
	}
	return FALSE;
}
コード例 #11
0
ファイル: pvGetAsync.c プロジェクト: T-A-R-L-A/EPICS-Base
/* Event function for state "get_async" in state set "pvGetAsync" */
static seqBool E_pvGetAsync_0_get_async(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState)
{
# line 29 "../pvGetAsync.st"
	if (UserVar_pvGetAsync.n == 100000)
	{
		seq_exit(ssId);
		*pTransNum = 0;
		return TRUE;
	}
	if (TRUE)
	{
		*pNextState = 2;
		*pTransNum = 1;
		return TRUE;
	}
	return FALSE;
}
コード例 #12
0
ファイル: local.c プロジェクト: rorydog1/epics
/* Event function for state "first" in state set "start" */
static seqBool seqg_event_start_0_first(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 27 "../local.st"
    if (seqg_var->seqg_vars_start.seqg_vars_first.i < 5)
    {
        *seqg_pnst = 1;
        *seqg_ptrn = 0;
        return TRUE;
    }
    if (TRUE)
    {
        seq_exit(seqg_env);
        *seqg_ptrn = 1;
        return TRUE;
    }
    return FALSE;
}
コード例 #13
0
ファイル: entryOpte.c プロジェクト: rorydog1/epics
/* Event function for state "minus_e" in state set "opt_e" */
static seqBool seqg_event_opt_e_0_minus_e(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 36 "../entryOpte.st"
	if (seq_delay(seqg_env, 0.1))
	{
		*seqg_pnst = 1;
		*seqg_ptrn = 0;
		return TRUE;
	}
# line 39 "../entryOpte.st"
	if (seqg_vars_opt_e.delayed2 > 1)
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 1;
		return TRUE;
	}
	return FALSE;
}
コード例 #14
0
ファイル: pvGet.c プロジェクト: rorydog1/epics
/* Event function for state "run" in state set "write" */
static seqBool seqg_event_write_4_run(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 191 "../pvGet.st"
	if (seq_efTest(seqg_env, ef_read_named) && seq_efTest(seqg_env, ef_read_anon) && seq_efTest(seqg_env, ef_read_named_sync) && seq_efTest(seqg_env, ef_read_anon_sync))
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 0;
		return TRUE;
	}
# line 193 "../pvGet.st"
	if (seq_delay(seqg_env, 0.07))
	{
		*seqg_pnst = 0;
		*seqg_ptrn = 1;
		return TRUE;
	}
	return FALSE;
}
コード例 #15
0
ファイル: pvGetAsync.c プロジェクト: T-A-R-L-A/EPICS-Base
/* Event function for state "wait_complete" in state set "pvGetAsync" */
static seqBool E_pvGetAsync_0_wait_complete(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState)
{
# line 39 "../pvGetAsync.st"
	if (seq_delay(ssId, 0))
	{
		seq_exit(ssId);
		*pTransNum = 0;
		return TRUE;
	}
# line 42 "../pvGetAsync.st"
	if (seq_pvGetComplete(ssId, 0/*x*/))
	{
		*pNextState = 1;
		*pTransNum = 1;
		return TRUE;
	}
	return FALSE;
}
コード例 #16
0
ファイル: change.c プロジェクト: T-A-R-L-A/EPICS-Base
/* Event function for state "zero" in state set "main" */
static seqBool E_main_0_zero(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState)
{
# line 34 "../change.st"
	if (pVar->UserVar_main.n > 50)
	{
		seq_exit(ssId);
		*pTransNum = 0;
		return TRUE;
	}
# line 36 "../change.st"
	if (seq_delay(ssId, 0))
	{
		*pNextState = 0;
		*pTransNum = 1;
		return TRUE;
	}
	return FALSE;
}
コード例 #17
0
ファイル: monitorEvflag.c プロジェクト: T-A-R-L-A/EPICS-Base
/* Event function for state "waitForActualToEqualRequested" in state set "monitorEvflagTest" */
static seqBool E_monitorEvflagTest_0_waitForActualToEqualRequested(SS_ID ssId, struct UserVar *pVar, int *pTransNum, int *pNextState)
{
# line 46 "../monitorEvflag.st"
	if (seq_efTestAndClear(ssId, 1/*actualChanged*/) && pVar->actual == pVar->requested)
	{
		*pNextState = 1;
		*pTransNum = 0;
		return TRUE;
	}
# line 55 "../monitorEvflag.st"
	if (seq_delay(ssId, 0))
	{
		seq_exit(ssId);
		*pTransNum = 1;
		return TRUE;
	}
	return FALSE;
}
コード例 #18
0
ファイル: monitorEvflag.c プロジェクト: rorydog1/epics
/* Event function for state "waitForActualToEqualRequested" in state set "monitorEvflagTest" */
static seqBool seqg_event_monitorEvflagTest_0_waitForActualToEqualRequested(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 46 "../monitorEvflag.st"
	if (seq_efTestAndClear(seqg_env, actualChanged) && seqg_var->actual == seqg_var->requested)
	{
		*seqg_pnst = 1;
		*seqg_ptrn = 0;
		return TRUE;
	}
# line 55 "../monitorEvflag.st"
	if (seq_delay(seqg_env, 1.0))
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 1;
		return TRUE;
	}
	return FALSE;
}
コード例 #19
0
ファイル: pvGetCancel.c プロジェクト: rorydog1/epics
/* Event function for state "done" in state set "pvGetCancel" */
static seqBool seqg_event_pvGetCancel_0_done(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 29 "../pvGetCancel.st"
	if (seqg_vars_pvGetCancel.n < 50)
	{
		*seqg_pnst = 1;
		*seqg_ptrn = 0;
		return TRUE;
	}
# line 32 "../pvGetCancel.st"
	if (seq_delay(seqg_env, 0.2))
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 1;
		return TRUE;
	}
	return FALSE;
}
コード例 #20
0
ファイル: pvGetCancel.c プロジェクト: rorydog1/epics
/* Event function for state "test" in state set "pvGetCancel" */
static seqBool seqg_event_pvGetCancel_0_test(SS_ID seqg_env, int *seqg_ptrn, int *seqg_pnst)
{
# line 47 "../pvGetCancel.st"
	if (seq_delay(seqg_env, 5.0))
	{
		seq_exit(seqg_env);
		*seqg_ptrn = 0;
		return TRUE;
	}
# line 51 "../pvGetCancel.st"
	if (seq_pvArrayGetComplete(seqg_env, 0/*x*/, 2, FALSE, NULL))
	{
		*seqg_pnst = 0;
		*seqg_ptrn = 1;
		return TRUE;
	}
	return FALSE;
}