CORDET Framework - C2 Implementation
|
Implementation of Base State Machine. More...
Go to the source code of this file.
Functions | |
static void | RunCIP (FwSmDesc_t smDesc) |
Function which runs the Component Initialization Procedure. More... | |
static void | RunCRP (FwSmDesc_t smDesc) |
Function which runs the Component Reset Procedure. More... | |
static void | StartCEP (FwSmDesc_t smDesc) |
Function which starts the Component Execution Procedure. More... | |
static void | ExecCEP (FwSmDesc_t smDesc) |
Function which executes the Component Execution Procedure. More... | |
static void | StopCEP (FwSmDesc_t smDesc) |
Function which stops the Component Execution Procedure. More... | |
FwSmDesc_t | CrFwBaseCmpMake () |
Retrieve the singleton instance of the Base State Machine. More... | |
void | CrFwCmpInit (FwSmDesc_t smDesc) |
Initialize a framework component. More... | |
void | CrFwCmpReset (FwSmDesc_t smDesc) |
Reset a framework component. More... | |
void | CrFwCmpShutdown (FwSmDesc_t smDesc) |
Shutdown a framework component. More... | |
void | CrFwCmpExecute (FwSmDesc_t smDesc) |
Execute a framework component. More... | |
FwPrDesc_t | CrFwCmpGetInitPr (FwSmDesc_t smDesc) |
Return the descriptor of the Initialization Procedure of the argument component. More... | |
FwPrDesc_t | CrFwCmpGetResetPr (FwSmDesc_t smDesc) |
Return the descriptor of the Reset Procedure of the argument component. More... | |
FwPrDesc_t | CrFwCmpGetExecPr (FwSmDesc_t smDesc) |
Return the descriptor of the Execution Procedure of the argument component. More... | |
CrFwInstanceId_t | CrFwCmpGetInstanceId (FwSmDesc_t smDesc) |
Return the instance identifier of the argument component. More... | |
CrFwTypeId_t | CrFwCmpGetTypeId (FwSmDesc_t smDesc) |
Return the type identifier of the argument component. More... | |
CrFwBool_t | CrFwCmpIsStarted (FwSmDesc_t smDesc) |
Return true if the state machine of the argument component has been started. More... | |
CrFwBool_t | CrFwCmpIsInCreated (FwSmDesc_t smDesc) |
Return true if the argument component is in state CREATED. More... | |
CrFwBool_t | CrFwCmpIsInInitialized (FwSmDesc_t smDesc) |
Return true if the argument component is in state INITIALIZED. More... | |
CrFwBool_t | CrFwCmpIsInConfigured (FwSmDesc_t smDesc) |
Return true if the argument component is in state CONFIGURED. More... | |
void | CrFwBaseCmpDefShutdownAction (FwSmDesc_t smDesc) |
Function which performs the Shutdown Action for the Base State Machine. More... | |
Variables | |
static FwSmDesc_t | baseCmpSmDesc = NULL |
The singleton instance of the Base State Machine. More... | |
Implementation of Base 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 CrFwBaseCmp.c.
void CrFwBaseCmpDefShutdownAction | ( | FwSmDesc_t | smDesc | ) |
Function which performs the Shutdown Action for the Base State Machine.
This implementation of the Shutdown Action returns without doing anything.
This action is an adaptation point of the framework. Components which extend the Base Component may want to override this function to implement their own shutdown behaviour.
smDesc | the descriptor of the Base State Machine. |
Definition at line 217 of file CrFwBaseCmp.c.
FwSmDesc_t CrFwBaseCmpMake | ( | ) |
Retrieve the singleton instance of the Base State Machine.
The Base State Machine is a singleton. The first time this function is called, it creates the Base State Machine. Subsequently, it always returns the same instance.
The first time this function is called, it returns the Base State Machine in state STOPPED.
Definition at line 77 of file CrFwBaseCmp.c.
void CrFwCmpExecute | ( | FwSmDesc_t | smDesc | ) |
Execute a framework component.
This function sends command Execute to a Base State Machine. This function can be used either on a Base State Machine or on a state machine that has been derived from a Base State Machine.
smDesc | the descriptor of the Base State Machine to be executed. |
Definition at line 127 of file CrFwBaseCmp.c.
FwPrDesc_t CrFwCmpGetExecPr | ( | FwSmDesc_t | smDesc | ) |
Return the descriptor of the Execution Procedure of the argument component.
Each component derived from the Base Component has an Execution Procedure. This function returns the descriptor of the Execution Procedure of the argument component.
smDesc | the descriptor of the Base State Machine. |
Definition at line 144 of file CrFwBaseCmp.c.
FwPrDesc_t CrFwCmpGetInitPr | ( | FwSmDesc_t | smDesc | ) |
Return the descriptor of the Initialization Procedure of the argument component.
Each component derived from the Base Component has an Initialization Procedure. This function returns the descriptor of the Initialization Procedure of the argument component.
smDesc | the descriptor of the Base State Machine. |
Definition at line 132 of file CrFwBaseCmp.c.
CrFwInstanceId_t CrFwCmpGetInstanceId | ( | FwSmDesc_t | smDesc | ) |
Return the instance identifier of the argument component.
Each component derived from the Base Component has an Instance Identifier which identifies a certain instance of a component within all instances of the same type. This function returns the value of the Instance Identifier.
smDesc | the descriptor of the Base State Machine. |
Definition at line 150 of file CrFwBaseCmp.c.
FwPrDesc_t CrFwCmpGetResetPr | ( | FwSmDesc_t | smDesc | ) |
Return the descriptor of the Reset Procedure of the argument component.
Each component derived from the Base Component has a Reset Procedure. This function returns the descriptor of the Reset Procedure of the argument component.
smDesc | the descriptor of the Base State Machine. |
Definition at line 138 of file CrFwBaseCmp.c.
CrFwTypeId_t CrFwCmpGetTypeId | ( | FwSmDesc_t | smDesc | ) |
Return the type identifier of the argument component.
Each component belongs to a type. This function returns the value of the Type Identifier.
smDesc | the descriptor of the Base State Machine. |
Definition at line 156 of file CrFwBaseCmp.c.
void CrFwCmpInit | ( | FwSmDesc_t | smDesc | ) |
Initialize a framework component.
This function sends command Init to a Base State Machine. This function can be used either on a Base State Machine or on a state machine that has been derived from a Base State Machine.
smDesc | the descriptor of the Base State Machine to be initialized. |
Definition at line 112 of file CrFwBaseCmp.c.
CrFwBool_t CrFwCmpIsInConfigured | ( | FwSmDesc_t | smDesc | ) |
Return true if the argument component is in state CONFIGURED.
This function checks whether the Base State Machine is in state CONFIGURED. This function can be used either on a Base State Machine or on a state machine that has been derived from a Base State Machine.
smDesc | the descriptor of the Base State Machine. |
Definition at line 177 of file CrFwBaseCmp.c.
CrFwBool_t CrFwCmpIsInCreated | ( | FwSmDesc_t | smDesc | ) |
Return true if the argument component is in state CREATED.
This function checks whether the Base State Machine is in state CREATED. This function can be used either on a Base State Machine or on a state machine that has been derived from a Base State Machine.
smDesc | the descriptor of the Base State Machine. |
Definition at line 167 of file CrFwBaseCmp.c.
CrFwBool_t CrFwCmpIsInInitialized | ( | FwSmDesc_t | smDesc | ) |
Return true if the argument component is in state INITIALIZED.
This function checks whether the Base State Machine is in state INITIALIZED. This function can be used either on a Base State Machine or on a state machine that has been derived from a Base State Machine.
smDesc | the descriptor of the Base State Machine. |
Definition at line 172 of file CrFwBaseCmp.c.
CrFwBool_t CrFwCmpIsStarted | ( | FwSmDesc_t | smDesc | ) |
Return true if the state machine of the argument component has been started.
This function checks whether the Base State Machine has been started. This function can be used either on a Base State Machine or on a state machine that has been derived from a Base State Machine.
smDesc | the descriptor of the Base State Machine. |
Definition at line 162 of file CrFwBaseCmp.c.
void CrFwCmpReset | ( | FwSmDesc_t | smDesc | ) |
Reset a framework component.
This function sends command Reset to a Base State Machine. This function can be used either on a Base State Machine or on a state machine that has been derived from a Base State Machine.
smDesc | the descriptor of the Base State Machine to be reset. |
Definition at line 117 of file CrFwBaseCmp.c.
void CrFwCmpShutdown | ( | FwSmDesc_t | smDesc | ) |
Shutdown a framework component.
This function sends command Shutdown to a Base State Machine. This function can be used either on a Base State Machine or on a state machine that has been derived from a Base State Machine.
smDesc | the descriptor of the Base State Machine to be shutdown. |
Definition at line 122 of file CrFwBaseCmp.c.
|
static |
Function which executes the Component Execution Procedure.
This function is used as do-action for the CONFIGURED state.
smDesc | the state machine descriptor |
Definition at line 210 of file CrFwBaseCmp.c.
|
static |
Function which runs the Component Initialization Procedure.
This function is used as exit action for the CREATED state.
smDesc | the state machine descriptor |
Definition at line 182 of file CrFwBaseCmp.c.
|
static |
Function which runs the Component Reset Procedure.
This function is used as exit action for the INITIALIZED state.
smDesc | the state machine descriptor |
Definition at line 189 of file CrFwBaseCmp.c.
|
static |
Function which starts the Component Execution Procedure.
This function is used as entry action for the CONFIGURED state.
smDesc | the state machine descriptor |
Definition at line 196 of file CrFwBaseCmp.c.
|
static |
Function which stops the Component Execution Procedure.
This function is used as exit action for the CONFIGURED state.
smDesc | the state machine descriptor |
Definition at line 203 of file CrFwBaseCmp.c.
|
static |
The singleton instance of the Base State Machine.
Definition at line 39 of file CrFwBaseCmp.c.