FsmVCR.h
Go to the documentation of this file.
#ifndef __FSMVCR_H_
#define __FSMVCR_H_
#include "ES2_V4_app.h"
typedef enum fsmVCRevents
{
evPlaybutton = 0, // Button T0 is pressed
evStopbutton, // Button T1 is pressed
evFastforwardbutton, // Button T2 is pressed
evRecordbutton, // Button T3 is pressed
evRewindbutton, // Button T4 is pressed
evBegintape, // Tape is at the beginning
evEndtape, // Tape is at the end
evTapeout, // Tape is out
EV_LAST_VCR
} eEventsVCR_t;
typedef enum fsmVCRstates
{
sStandby = 0,
sRecord,
sPlay,
sRewind,
sFastForward,
STATE_LAST_VCR
} eStatesVCR_t;
_Bool bFsmVCRInitialize(void);
_Bool bFsmVCRDispatchEvent (int32_t event);
int32_t s32FsmVCRGetState(void);
_Bool bFsmVCRIsStateChanged(void);
const char* pcFsmVCRGetStateName(void);
_Bool bGuard_tapein_andnot_atend(void);
_Bool bGuard_tapein_andnot_atbegin(void);
void vEntry_sStandby(void);
void vEntry_sRecord(void);
void vExit_sRecord(void);
void vEntry_sPlay(void);
void vExit_sPlay(void);
void vEntry_sRewind(void);
void vExit_sRewind(void);
void vEntry_sFastForward(void);
void vExit_sFastForward(void);
#endif /* __FSMVCR_H_ */
bFsmVCRDispatchEvent
_Bool bFsmVCRDispatchEvent(int32_t s32Event)
dispatch event VCR FSM
Definition: FsmVCR.c:100
GLCD_Param_2_uint32_t_char_p::param1
uint32_t param1
Definition: displaytask.h:67
vEntry_sRecord
void vEntry_sRecord(void)
entry for sRecord
Definition: FsmVCR.c:175
bFsmframeworkDispatchEvent
_Bool bFsmframeworkDispatchEvent(psStateMachine_t psStateMachine, int32_t s32Event)
Dispatch Event.
Definition: FsmFramework.c:47
evPlaybutton
@ evPlaybutton
Definition: FsmVCR.h:23
GLCD_Command::eDisplayCommand
enum DisplayCommand eDisplayCommand
Definition: displaytask.h:99
vExit_sPlay
void vExit_sPlay(void)
exit for sPlay
Definition: FsmVCR.c:226
ES2_V4_app.h
global header file for project
stateMachine
All nesseccary data for a state machine.
Definition: FsmFramework.h:145
vEntry_sRewind
void vEntry_sRewind(void)
entry for sRewind
Definition: FsmVCR.c:239
bGuard_tapein_andnot_atbegin
_Bool bGuard_tapein_andnot_atbegin(void)
guard for Tape in and not at begin
Definition: FsmVCR.c:326
GLCD_Param_2_uint32_t_char_p::param2
char * param2
Definition: displaytask.h:68
evBegintape
@ evBegintape
Definition: FsmVCR.h:28
pcFsmVCRstates_names
static const char * pcFsmVCRstates_names[]
Definition: FsmVCR.c:14
sFsmVCR
sStateMachine_t sFsmVCR
Definition: FsmVCR.c:12
asEventsFsmVCRRecord
sStateTransitions_t asEventsFsmVCRRecord[]
Definition: FsmVCR.c:27
asEventsFsmVCRFastForward
sStateTransitions_t asEventsFsmVCRFastForward[]
Definition: FsmVCR.c:60
vExit_sRewind
void vExit_sRewind(void)
entry for sRewind
Definition: FsmVCR.c:258
s32FsmframeworkGetState
int32_t s32FsmframeworkGetState(psStateMachine_t psStateMachine)
Get the actual state of a statemachine.
Definition: FsmFramework.c:134
STATE_LAST_VCR
@ STATE_LAST_VCR
Definition: FsmVCR.h:49
asEventsFsmVCRRewind
sStateTransitions_t asEventsFsmVCRRewind[]
Definition: FsmVCR.c:49
vExit_sFastForward
void vExit_sFastForward(void)
exit for sFastForward
Definition: FsmVCR.c:290
EV_LAST_VCR
@ EV_LAST_VCR
Definition: FsmVCR.h:31
asEventsFsmVCRStandby
sStateTransitions_t asEventsFsmVCRStandby[]
Definition: FsmVCR.c:16
asFsmVCRStates
sStateTable_t asFsmVCRStates[]
Definition: FsmVCR.c:71
sTapeBegin
@ sTapeBegin
Definition: FsmTape.h:37
s32FsmVCRGetState
int32_t s32FsmVCRGetState()
get FSM state
Definition: FsmVCR.c:126
sPlay
@ sPlay
Definition: FsmVCR.h:46
vEntry_sStandby
void vEntry_sStandby(void)
entry for sStandby
Definition: FsmVCR.c:157
TickType_t
uint32_t TickType_t
Definition: portmacro.h:64
bFsmVCRDispatchEvent
_Bool bFsmVCRDispatchEvent(int32_t event)
Sends an event to the state machine.
Definition: FsmVCR.c:100
bGuard_tapein_andnot_atend
_Bool bGuard_tapein_andnot_atend(void)
guard for Tape in and not at end
Definition: FsmVCR.c:303
evTapeout
@ evTapeout
Definition: FsmVCR.h:30
vExit_sRecord
void vExit_sRecord(void)
exit for sRecord
Definition: FsmVCR.c:194
vEntry_sPlay
void vEntry_sPlay(void)
entry for sPlay
Definition: FsmVCR.c:207
FAULT_STATE
@ FAULT_STATE
Definition: FsmFramework.h:76
evRecordbutton
@ evRecordbutton
Definition: FsmVCR.h:26
vExit_sRewind
void vExit_sRewind(void)
entry for sRewind
Definition: FsmVCR.c:258
GLCD_Command::uparameters
union GLCD_Command::@0 uparameters
GLCD_Command
Definition: displaytask.h:98
sStandby
@ sStandby
Definition: FsmVCR.h:44
bGuard_tapein_andnot_atend
_Bool bGuard_tapein_andnot_atend(void)
guard for Tape in and not at end
Definition: FsmVCR.c:303
evEndtape
@ evEndtape
Definition: FsmVCR.h:29
sTapeOut
@ sTapeOut
Definition: FsmTape.h:36
bFsmVCRInitialize
_Bool bFsmVCRInitialize(void)
Wrapper function to statemachine_init().
Definition: FsmVCR.c:87
vExit_sFastForward
void vExit_sFastForward(void)
exit for sFastForward
Definition: FsmVCR.c:290
GLCD_Param_2_uint32_t_char_p::param0
uint32_t param0
Definition: displaytask.h:66
vEntry_sFastForward
void vEntry_sFastForward(void)
entry for sFastForward
Definition: FsmVCR.c:271
vEntry_sPlay
void vEntry_sPlay(void)
entry for sPlay
Definition: FsmVCR.c:207
sFastForward
@ sFastForward
Definition: FsmVCR.h:48
s32FsmTapeGetState
int32_t s32FsmTapeGetState()
get FSM state
Definition: FsmTape.c:94
fsmVCRevents
fsmVCRevents
Enumeration holds all possible events for this state machine.
Definition: FsmVCR.h:22
evRewindbutton
@ evRewindbutton
Definition: FsmVCR.h:27
evFastforwardbutton
@ evFastforwardbutton
Definition: FsmVCR.h:25
stateTableEvents
State table holds states and corresponding event tables.
Definition: FsmFramework.h:128
GLCD_Command::sparam_2_uint32_t_const_char_p
struct GLCD_Param_2_uint32_t_char_p sparam_2_uint32_t_const_char_p
Definition: displaytask.h:108
vEntry_sRecord
void vEntry_sRecord(void)
entry for sRecord
Definition: FsmVCR.c:175
sTapeEnd
@ sTapeEnd
Definition: FsmTape.h:38
asEventsFsmVCRSPlay
sStateTransitions_t asEventsFsmVCRSPlay[]
Definition: FsmVCR.c:38
vExit_sPlay
void vExit_sPlay(void)
exit for sPlay
Definition: FsmVCR.c:226
bFsmVCRIsStateChanged
_Bool bFsmVCRIsStateChanged()
check if state changed
Definition: FsmVCR.c:113
s32FsmVCRGetState
int32_t s32FsmVCRGetState(void)
Returns the current state of the fsm.
Definition: FsmVCR.c:126
bFsmVCRInitialize
_Bool bFsmVCRInitialize(void)
init VCR FSM
Definition: FsmVCR.c:87
evStopbutton
@ evStopbutton
Definition: FsmVCR.h:24
stateTransition
Event table holds events that can generate a state transition.
Definition: FsmFramework.h:111
vEntry_sStandby
void vEntry_sStandby(void)
entry for sStandby
Definition: FsmVCR.c:157
xQueueDisplay
void * xQueueDisplay
Definition: Globals.c:15
bFsmVCRIsStateChanged
_Bool bFsmVCRIsStateChanged(void)
Indicates if a state changed happend.
Definition: FsmVCR.c:113
cmd_GLCD_DrawString
@ cmd_GLCD_DrawString
Definition: displaytask.h:20
sRecord
@ sRecord
Definition: FsmVCR.h:45
vEntry_sRewind
void vEntry_sRewind(void)
entry for sRewind
Definition: FsmVCR.c:239
vEntry_sFastForward
void vEntry_sFastForward(void)
entry for sFastForward
Definition: FsmVCR.c:271
pcFsmVCRGetStateName
const char * pcFsmVCRGetStateName(void)
Get the name of the current state.
Definition: FsmVCR.c:139
vExit_sRecord
void vExit_sRecord(void)
exit for sRecord
Definition: FsmVCR.c:194
bFsmframeworkIsStateChanged
_Bool bFsmframeworkIsStateChanged(psStateMachine_t psStateMachine)
Get the statechanged flag. 1 if last event changed the state, 0 if last event did not changed the sta...
Definition: FsmFramework.c:139
sRewind
@ sRewind
Definition: FsmVCR.h:47
eEventsVCR_t
enum fsmVCRevents eEventsVCR_t
Enumeration holds all possible events for this state machine.
bGuard_tapein_andnot_atbegin
_Bool bGuard_tapein_andnot_atbegin(void)
guard for Tape in and not at begin
Definition: FsmVCR.c:326
xQueueSend
#define xQueueSend(xQueue, pvItemToQueue, xTicksToWait)
Definition: queue.h:478
fsmVCRstates
fsmVCRstates
Enumeration holds all defined states for video recorder state machine.
Definition: FsmVCR.h:43
bFsmframeworkInitialize
_Bool bFsmframeworkInitialize(psStateMachine_t psStateMachine, psStateTable_t psStateTable, int32_t s32StartState, uint32_t u32StateCount, uint32_t u32EventCount, vCallback_t vInitCallback)
Initialization of the State Machine.
Definition: FsmFramework.c:6
eStatesVCR_t
enum fsmVCRstates eStatesVCR_t
Enumeration holds all defined states for video recorder state machine.
pcFsmVCRGetStateName
const char * pcFsmVCRGetStateName()
get FSM state name
Definition: FsmVCR.c:139