CORDET Framework - C2 Implementation
|
Definition of Application State Machine. More...
Go to the source code of this file.
Functions | |
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... | |
Definition of Application State Machine.
The Application State Machine implements the application start-up behaviour (see figures below).
The Application State Machine is a singleton. Initially, after it has been started through function FwSmStart
, it is in state START-UP. At entry into this state, the Application Start-Up Procedure is executed. This procedure is an adaptation point for the application (it is defined in CrFwAppShutdownProc.c
).
Normal operation takes place in state NORMAL. In particular, the services provided by an application to its users are only guaranteed to be available when the application is in state NORMAL and it is only from this state that the application makes use of the services provided by other applications. Thus, in state NORMAL, an application may assume that its service interfaces are all operational.
When state NORMAL is entered or exited, a notification is sent to the users of the application services. The content of this notification is an adaptation point.
An application can be reset by sending command Reset to its Application State Machine (this is done through function CrFwAppSmReset
). This causes a transition to state RESET where the Application Reset Procedure is executed. This procedure is an adaptation point for the application (it is defined in CrFwAppResetProc.c
).
Finally, the orderly shutdown of an application is performed by sending command Shutdown to the Application State Machine (this is done through function CrFwAppSmShutdown
). This triggers a transition to state SHUTDOWN where the Application Shutdown Procedure is executed. This procedure is an adaptation point for the application (it is defined in CrFwAppShutdownProc.c
).
Applications may define embedded state machines in the states of the Application State Machine. The embedded state machines are adaptation points for the framework. They are defined in CrFwAppSmUserPar.h
.
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.h.
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.