CORDET Framework - C2 Implementation
|
Implementation of Component Initialization Procedure. More...
Go to the source code of this file.
Functions | |
void | CrFwBaseCmpDefInitCheck (FwPrDesc_t prDesc) |
Function which performs the default Initialization Check of the CIP. More... | |
void | CrFwBaseCmpDefInitAction (FwPrDesc_t prDesc) |
Function which performs the default Initialization Action of the CIP. More... | |
FwPrDesc_t | CrFwCmpGetInitProc () |
Retrieve the singleton instance of the CIP. More... | |
Variables | |
static FwPrDesc_t | initPrDesc = NULL |
The singleton instance of the CIP. | |
Implementation of Component Initialization Procedure.
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 CrFwInitProc.c.
void CrFwBaseCmpDefInitAction | ( | FwPrDesc_t | prDesc | ) |
Function which performs the default Initialization Action of the CIP.
This function implements one of the actions of the CIP. In general, the Initialization Action for a component creates all data structures required by the component and performs other initialization actions as required.
The Initialization Action has an outcome. This function assumes the procedure data to be of type CrFwCmpData_t
. It uses the outcome
field of this data structure to store the outcome of the initialization action. If the outcome of the Initialization Action is "action successful", then the outcome field is set equal to 1. If the outcome of the Initialization Action is "action failed", then the outcome field is set equal to 0.
This function assumes the procedure data to be of type CrFwCmpData_t
. It uses the outcome
field of this data structure to store the outcome of the initialization action (a value of "true" means that the initialization action was successful).
This function implements the Initialization Action for the Base Component which does nothing and always returns an outcome of "action successful" (i.e. always sets the outcome field to 1).
This action is an adaptation point of the framework. Components which extend the Base Component (and which therefore must also extend the CIP) may want to override this function to implement their own initialization behaviour).
prDesc | the CIP descriptor |
Definition at line 42 of file CrFwInitProc.c.
void CrFwBaseCmpDefInitCheck | ( | FwPrDesc_t | prDesc | ) |
Function which performs the default Initialization Check of the CIP.
This function implements one of the actions of the CIP. In general, the Initialization Check for a component checks that all parameters required for the component initialization have legal values.
The Initialization Check has an outcome. This function assumes the procedure data to be of type CrFwCmpData_t
. It uses the outcome
field of this data structure to store the outcome of the initialization check. If the outcome of the Initialization Check is "check successful", then the outcome field is set equal to 1. If the outcome of the Initialization Check is "check failed", then the outcome field is set equal to 0.
This function implements the Initialization Check for the Base Component which always returns an outcome of "check successful" (i.e. always sets the outcome field to 1).
This action is an adaptation point for the framework. Components which extend the Base Component (and which therefore must also extend the CIP) may want to override this function to implement their own initialization behaviour).
prDesc | the CIP descriptor |
Definition at line 36 of file CrFwInitProc.c.
FwPrDesc_t CrFwCmpGetInitProc | ( | ) |
Retrieve the singleton instance of the CIP.
This function returns the descriptor of the CIP. Note that no data are attached to the descriptor as it is returned by this function. The CIP descriptor returned by this function is therefore not ready to be executed. It can only be executed after the procedure data have been loaded into it.
Definition at line 48 of file CrFwInitProc.c.