CORDET Framework - C2 Implementation
|
Implementation of Application State Machine. More...
Go to the source code of this file.
Macros | |
#define | CR_FW_APP_STATE_START_UP 1 |
State identifier for state START_UP in the application State Machine. | |
#define | CR_FW_APP_STATE_NORMAL 2 |
State identifier for state NORMAL in the application State Machine. | |
#define | CR_FW_APP_STATE_RESET 3 |
State identifier for state RESET in the application State Machine. | |
#define | CR_FW_APP_STATE_SHUTDOWN 4 |
State identifier for state SHUTDOWN in the application State Machine. | |
#define | CR_FW_APP_TR_RESET CR_FW_APP_TYPE*CR_FW_MAX_NOF_TRANS_CMDS+0 |
Identifier for transition command "Reset" in the Application State Machine. | |
#define | CR_FW_APP_TR_SHUTDOWN CR_FW_APP_TYPE*CR_FW_MAX_NOF_TRANS_CMDS+1 |
Identifier for transition command "Shutdown" in the Application State Machine. | |
Functions | |
static void | StartAppStartUpPr (FwSmDesc_t smDesc) |
Function which starts the Application Start-Up Procedure. More... | |
static void | StartAppResetPr (FwSmDesc_t smDesc) |
Function which starts the Application Reset Procedure. More... | |
static void | StartAppShutdownPr (FwSmDesc_t smDesc) |
Function which starts the Application Shutdown Procedure. More... | |
static FwSmBool_t | IsStartUpPrTerminated (FwSmDesc_t smDesc) |
Function which checks whether the Application Start-Up Procedure has terminated. More... | |
static FwSmBool_t | IsResetPrTerminated (FwSmDesc_t smDesc) |
Function which checks whether the Application Reset Procedure has terminated. More... | |
static FwSmBool_t | IsShutdownPrTerminated (FwSmDesc_t smDesc) |
Function which checks whether the Application Shutdown Procedure has terminated. More... | |
FwSmDesc_t | CrFwAppSmMake () |
Retrieve the singleton instance of the Application State Machine. More... | |
void | CrFwAppSmStart () |
Start the Application State Machine. More... | |
void | CrFwAppSmExecute () |
Execute the Application State Machine. More... | |
void | CrFwAppSmReset () |
Reset the Application State Machine. More... | |
void | CrFwAppSmShutdown () |
Shutdown the Application State Machine. More... | |
CrFwBool_t | CrFwAppSmIsStarted () |
Return true if the Application State Machine has been started. More... | |
CrFwBool_t | CrFwAppSmIsInStartUp () |
Return true if the Application State Machine is in state START_UP. More... | |
CrFwBool_t | CrFwAppSmIsInNormal () |
Return true if the Application State Machine is in state NORMAL. More... | |
CrFwBool_t | CrFwAppSmIsInReset () |
Return true if the Application State Machine is in state RESET. More... | |
CrFwBool_t | CrFwAppSmIsInShutdown () |
Return true if the Application State Machine is in state SHUTDOWN. More... | |
FwSmDesc_t | CrFwAppSmGetEsmStartUp () |
Return the state machine embedded in state START-UP (or NULL if no state machine is embedded in START-UP). More... | |
FwSmDesc_t | CrFwAppSmGetEsmNormal () |
Return the state machine embedded in state NORMAL (or NULL if no state machine is embedded in NORMAL). More... | |
FwSmDesc_t | CrFwAppSmGetEsmReset () |
Return the state machine embedded in state RESET (or NULL if no state machine is embedded in RESET). More... | |
FwSmDesc_t | CrFwAppSmGetEsmShutdown () |
Return the state machine embedded in state SHUTDOWN (or NULL if no state machine is embedded in SHUTDOWN). More... | |
Variables | |
static FwSmDesc_t | appSmDesc = NULL |
The singleton instance of the Application State Machine. | |
Implementation of Application State Machine.
This file is part of the CORDET Framework.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
For information on alternative licensing, please contact P&P Software GmbH.
Definition in file CrFwAppSm.c.
void CrFwAppSmExecute | ( | ) |
Execute the Application State Machine.
This function sends command Execute
to the Application State Machine.
Definition at line 144 of file CrFwAppSm.c.
FwSmDesc_t CrFwAppSmGetEsmNormal | ( | ) |
Return the state machine embedded in state NORMAL (or NULL if no state machine is embedded in NORMAL).
Definition at line 228 of file CrFwAppSm.c.
FwSmDesc_t CrFwAppSmGetEsmReset | ( | ) |
Return the state machine embedded in state RESET (or NULL if no state machine is embedded in RESET).
Definition at line 233 of file CrFwAppSm.c.
FwSmDesc_t CrFwAppSmGetEsmShutdown | ( | ) |
Return the state machine embedded in state SHUTDOWN (or NULL if no state machine is embedded in SHUTDOWN).
Definition at line 238 of file CrFwAppSm.c.
FwSmDesc_t CrFwAppSmGetEsmStartUp | ( | ) |
Return the state machine embedded in state START-UP (or NULL if no state machine is embedded in START-UP).
Definition at line 223 of file CrFwAppSm.c.
CrFwBool_t CrFwAppSmIsInNormal | ( | ) |
Return true if the Application State Machine is in state NORMAL.
Definition at line 169 of file CrFwAppSm.c.
CrFwBool_t CrFwAppSmIsInReset | ( | ) |
Return true if the Application State Machine is in state RESET.
Definition at line 174 of file CrFwAppSm.c.
CrFwBool_t CrFwAppSmIsInShutdown | ( | ) |
Return true if the Application State Machine is in state SHUTDOWN.
Definition at line 179 of file CrFwAppSm.c.
CrFwBool_t CrFwAppSmIsInStartUp | ( | ) |
Return true if the Application State Machine is in state START_UP.
Definition at line 164 of file CrFwAppSm.c.
CrFwBool_t CrFwAppSmIsStarted | ( | ) |
Return true if the Application State Machine has been started.
Definition at line 159 of file CrFwAppSm.c.
FwSmDesc_t CrFwAppSmMake | ( | ) |
Retrieve the singleton instance of the Application State Machine.
The Application State Machine is a singleton. The first time this function is called, it creates the Application State Machine. Subsequently, it always returns the same instance.
The first time this function is called, it returns the Application State Machine before it has been started.
Definition at line 106 of file CrFwAppSm.c.
void CrFwAppSmReset | ( | ) |
Reset the Application State Machine.
This function sends command Reset
to the Application State Machine.
Definition at line 149 of file CrFwAppSm.c.
void CrFwAppSmShutdown | ( | ) |
Shutdown the Application State Machine.
This function sends command Shutdown
to the Application State Machine.
Definition at line 154 of file CrFwAppSm.c.
void CrFwAppSmStart | ( | ) |
Start the Application State Machine.
This function causes the Application State Machine to make the transition from its initial pseudo-state into its initial state START_UP.
Definition at line 139 of file CrFwAppSm.c.
|
static |
Function which checks whether the Application Reset Procedure has terminated.
This function acts as guard on the transition out of RESET.
smDesc | the state machine descriptor |
Definition at line 211 of file CrFwAppSm.c.
|
static |
Function which checks whether the Application Shutdown Procedure has terminated.
This function acts as guard on the transition out of SHUTDOWN.
smDesc | the state machine descriptor |
Definition at line 217 of file CrFwAppSm.c.
|
static |
Function which checks whether the Application Start-Up Procedure has terminated.
This function acts as guard on the transition out of START_UP.
smDesc | the state machine descriptor |
Definition at line 205 of file CrFwAppSm.c.
|
static |
Function which starts the Application Reset Procedure.
This function is used as entry action for the RESET state.
smDesc | the state machine descriptor |
Definition at line 191 of file CrFwAppSm.c.
|
static |
Function which starts the Application Shutdown Procedure.
This function is used as entry action for the SHUTDOWN state.
smDesc | the state machine descriptor |
Definition at line 198 of file CrFwAppSm.c.
|
static |
Function which starts the Application Start-Up Procedure.
This function is used as entry action for the START_UP state.
smDesc | the state machine descriptor |
Definition at line 184 of file CrFwAppSm.c.