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);
CrFwBool_t CrFwAppSmIsStarted()
Return true if the Application State Machine has been started.
FwPrDesc_t CrFwAppSmGetAppShutdownProc()
Retrieve the singleton instance of the Application Shutdown Procedure.
Interface to the Application Reset Procedure.
void CrFwAppSmReset()
Reset the Application State Machine.
void CrFwAppSmExecute()
Execute the Application State Machine.
#define CR_FW_APPSM_STARTUP_ESM
The pointer to the state machine embedded in state START-UP.
CrFwBool_t CrFwAppSmIsInStartUp()
Return true if the Application State Machine is in state START_UP.
static FwSmBool_t IsStartUpPrTerminated(FwSmDesc_t smDesc)
Function which checks whether the Application Start-Up Procedure has terminated.
#define CR_FW_APP_TR_SHUTDOWN
Identifier for transition command "Shutdown" in the Application State Machine.
#define CR_FW_APPSM_RESET_ESM
The pointer to the state machine embedded in state RESET.
static FwSmBool_t IsShutdownPrTerminated(FwSmDesc_t smDesc)
Function which checks whether the Application Shutdown Procedure has terminated.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
Header file to define all invariant publicly available constants and types for the CORDET Framework...
Interface to the Application Start-Up Procedure.
#define CR_FW_APP_STATE_NORMAL
State identifier for state NORMAL in the application State Machine.
User-modifiable parameters for the Application State Machine (see CrFwAppSm.h).
static void StartAppShutdownPr(FwSmDesc_t smDesc)
Function which starts the Application Shutdown Procedure.
#define CR_FW_APP_STATE_SHUTDOWN
State identifier for state SHUTDOWN in the application State Machine.
static void StartAppResetPr(FwSmDesc_t smDesc)
Function which starts the Application Reset Procedure.
Definition of the utility functions for the CORDET Framework.
Interface to the Application Shutdown Procedure.
Definition of Application State Machine.
#define CR_FW_APP_TR_RESET
Identifier for transition command "Reset" in the Application State Machine.
#define CR_FW_APPSM_SHUTDOWN_ESM
The pointer to the state machine embedded in state SHUTDOWN.
FwSmDesc_t CrFwAppSmGetEsmStartUp()
Return the state machine embedded in state START-UP (or NULL if no state machine is embedded in START...
FwSmDesc_t CrFwAppSmGetEsmShutdown()
Return the state machine embedded in state SHUTDOWN (or NULL if no state machine is embedded in SHUTD...
static FwSmDesc_t appSmDesc
The singleton instance of the Application State Machine.
FwPrDesc_t CrFwAppSmGetAppResetProc()
Retrieve the singleton instance of the Application Reset Procedure.
FwSmDesc_t CrFwAppSmGetEsmNormal()
Return the state machine embedded in state NORMAL (or NULL if no state machine is embedded in NORMAL)...
static FwSmBool_t IsResetPrTerminated(FwSmDesc_t smDesc)
Function which checks whether the Application Reset Procedure has terminated.
FwPrDesc_t CrFwAppSmGetAppStartUpProc()
Retrieve the singleton instance of the Application Start-Up Procedure.
CrFwBool_t CrFwAppSmIsInNormal()
Return true if the Application State Machine is in state NORMAL.
void CrFwAppSmShutdown()
Shutdown the Application State Machine.
FwSmDesc_t CrFwAppSmMake()
Retrieve the singleton instance of the Application State Machine.
CrFwBool_t CrFwAppSmIsInShutdown()
Return true if the Application State Machine is in state SHUTDOWN.
static void StartAppStartUpPr(FwSmDesc_t smDesc)
Function which starts the Application Start-Up Procedure.
#define CR_FW_APP_STATE_RESET
State identifier for state RESET in the application State Machine.
CrFwBool_t CrFwAppSmIsInReset()
Return true if the Application State Machine is in state RESET.
void CrFwAppSmStart()
Start the Application State Machine.
FwSmDesc_t CrFwAppSmGetEsmReset()
Return the state machine embedded in state RESET (or NULL if no state machine is embedded in RESET)...
#define CR_FW_APP_STATE_START_UP
State identifier for state START_UP in the application State Machine.
#define CR_FW_APPSM_NORMAL_ESM
The pointer to the state machine embedded in state NORMAL.