28 #include "FwSmConstants.h"
29 #include "FwSmDCreate.h"
30 #include "FwSmConfig.h"
32 #include "FwPrConstants.h"
33 #include "FwPrDCreate.h"
34 #include "FwPrConfig.h"
40 #define CR_FW_APP_STATE_START_UP 1
43 #define CR_FW_APP_STATE_NORMAL 2
46 #define CR_FW_APP_STATE_RESET 3
49 #define CR_FW_APP_STATE_SHUTDOWN 4
52 #define CR_FW_APP_TR_RESET CR_FW_APP_TYPE*CR_FW_MAX_NOF_TRANS_CMDS+0
55 #define CR_FW_APP_TR_SHUTDOWN CR_FW_APP_TYPE*CR_FW_MAX_NOF_TRANS_CMDS+1
107 FwSmCounterS1_t nOfStates = 4;
108 FwSmCounterS1_t nOfChoicePseudoStates = 0;
109 FwSmCounterS1_t nOfTrans = 6;
110 FwSmCounterS1_t nOfActions = 3;
111 FwSmCounterS1_t nOfGuards = 3;
117 appSmDesc = FwSmCreate(nOfStates, nOfChoicePseudoStates, nOfTrans, nOfActions, nOfGuards);
Interface to the Application Reset Procedure.
FwPrDesc_t CrFwAppSmGetAppResetProc()
Retrieve the singleton instance of the Application Reset Procedure.
Interface to the Application Shutdown Procedure.
FwPrDesc_t CrFwAppSmGetAppShutdownProc()
Retrieve the singleton instance of the Application Shutdown Procedure.
FwSmDesc_t CrFwAppSmGetEsmReset()
Return the state machine embedded in state RESET (or NULL if no state machine is embedded in RESET).
CrFwBool_t CrFwAppSmIsInNormal()
Return true if the Application State Machine is in state NORMAL.
static FwSmBool_t IsShutdownPrTerminated(FwSmDesc_t smDesc)
Function which checks whether the Application Shutdown Procedure has terminated.
#define CR_FW_APP_STATE_RESET
State identifier for state RESET in the application State Machine.
FwSmDesc_t CrFwAppSmGetEsmShutdown()
Return the state machine embedded in state SHUTDOWN (or NULL if no state machine is embedded in SHUTD...
void CrFwAppSmExecute()
Execute the Application State Machine.
static void StartAppResetPr(FwSmDesc_t smDesc)
Function which starts the Application Reset Procedure.
CrFwBool_t CrFwAppSmIsStarted()
Return true if the Application State Machine has been started.
CrFwBool_t CrFwAppSmIsInStartUp()
Return true if the Application State Machine is in state START_UP.
void CrFwAppSmReset()
Reset the Application State Machine.
#define CR_FW_APP_STATE_START_UP
State identifier for state START_UP in the application State Machine.
CrFwBool_t CrFwAppSmIsInReset()
Return true if the Application State Machine is in state RESET.
static FwSmDesc_t appSmDesc
The singleton instance of the Application State Machine.
FwSmDesc_t CrFwAppSmMake()
Retrieve the singleton instance of the Application State Machine.
void CrFwAppSmStart()
Start the Application State Machine.
static void StartAppStartUpPr(FwSmDesc_t smDesc)
Function which starts the Application Start-Up Procedure.
void CrFwAppSmShutdown()
Shutdown the Application State Machine.
CrFwBool_t CrFwAppSmIsInShutdown()
Return true if the Application State Machine is in state SHUTDOWN.
#define CR_FW_APP_STATE_SHUTDOWN
State identifier for state SHUTDOWN in the application State Machine.
FwSmDesc_t CrFwAppSmGetEsmStartUp()
Return the state machine embedded in state START-UP (or NULL if no state machine is embedded in START...
static FwSmBool_t IsResetPrTerminated(FwSmDesc_t smDesc)
Function which checks whether the Application Reset Procedure has terminated.
FwSmDesc_t CrFwAppSmGetEsmNormal()
Return the state machine embedded in state NORMAL (or NULL if no state machine is embedded in NORMAL)...
#define CR_FW_APP_STATE_NORMAL
State identifier for state NORMAL in the application State Machine.
#define CR_FW_APP_TR_SHUTDOWN
Identifier for transition command "Shutdown" in the Application State Machine.
static void StartAppShutdownPr(FwSmDesc_t smDesc)
Function which starts the Application Shutdown Procedure.
static FwSmBool_t IsStartUpPrTerminated(FwSmDesc_t smDesc)
Function which checks whether the Application Start-Up Procedure has terminated.
#define CR_FW_APP_TR_RESET
Identifier for transition command "Reset" in the Application State Machine.
Definition of Application State Machine.
User-modifiable parameters for the Application State Machine (see CrFwAppSm.h).
#define CR_FW_APPSM_RESET_ESM
The pointer to the state machine embedded in state RESET.
#define CR_FW_APPSM_NORMAL_ESM
The pointer to the state machine embedded in state NORMAL.
#define CR_FW_APPSM_SHUTDOWN_ESM
The pointer to the state machine embedded in state SHUTDOWN.
#define CR_FW_APPSM_STARTUP_ESM
The pointer to the state machine embedded in state START-UP.
Interface to the Application Start-Up Procedure.
FwPrDesc_t CrFwAppSmGetAppStartUpProc()
Retrieve the singleton instance of the Application Start-Up Procedure.
Header file to define all invariant publicly available constants and types for the CORDET Framework.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
Definition of the utility functions for the CORDET Framework.