39 #include "FwSmConstants.h"
40 #include "FwSmDCreate.h"
41 #include "FwSmConfig.h"
43 #include "FwPrConstants.h"
44 #include "FwPrDCreate.h"
45 #include "FwPrConfig.h"
96 FwPrDesc_t resetPr, execPr, initPr;
171 outManagerCSData->
pocl[i] = NULL;
201 for (i=0; i<size; i++)
202 if (outManagerCSData->
pocl[i] == NULL) {
216 for (i=freePos+1; i<size; i++)
217 if (outManagerCSData->
pocl[i] == NULL) {
234 outManagerCSData->
pocl[i] = NULL;
236 outManagerDataLocal->
outcome = 1;
247 if (outManagerCSData->
pocl[i] != NULL) {
249 outManagerCSData->
pocl[i] = NULL;
255 outManagerDataLocal->
outcome = 1;
266 if (outManagerCSData->
pocl[i] != NULL) {
268 outManagerCSData->
pocl[i] = NULL;
271 free(outManagerCSData->
pocl);
void CrFwBaseCmpDefShutdownAction(FwSmDesc_t smDesc)
Function which performs the Shutdown Action for the Base State Machine.
FwSmDesc_t CrFwBaseCmpMake()
Retrieve the singleton instance of the Base State Machine.
Definition of Base Component.
Definition of the Framework Component Data (FCD) Type.
Header file to define all invariant publicly available constants and types for the CORDET Framework.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
#define CR_FW_OUTMANAGER_TYPE
Type identifier for the OutManager component.
FwPrDesc_t CrFwBaseCmpGetDummyExecProc()
Retrieve the singleton instance of the Dummy CEP.
void CwFwBaseCmpDummyExecAction(FwPrDesc_t prDesc)
Dummy action executed in the single node of the Dummy Execution Procedure.
Dummy Component Execution Procedure (CEP) for the Base Component.
FwPrDesc_t CrFwCmpGetInitProc()
Retrieve the singleton instance of the CIP.
void CrFwBaseCmpDefInitAction(FwPrDesc_t prDesc)
Function which performs the default Initialization Action of the CIP.
Component Initialization Procedure (CIP) for the Base Component.
CrFwBool_t CrFwOutCmpIsInPending(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state PENDING.
CrFwBool_t CrFwOutCmpIsInAborted(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state ABORTED.
void CrFwOutCmpTerminate(FwSmDesc_t smDesc)
Send command Terminate to the argument OutComponent.
Definition of the OutComponent Component of the framework.
static FwSmDesc_t outCmp[CR_FW_OUTFACTORY_MAX_NOF_OUTCMP]
The pre-allocated OutComponent instances.
void CrFwOutFactoryReleaseOutCmp(FwSmDesc_t outCmpInstance)
Release function for an OutComponent.
Definition of the OutFactory component.
static void OutManagerInitAction(FwPrDesc_t initPr)
Initialization action for OutManagers.
static void OutManagerShutdownAction(FwSmDesc_t smDesc)
Shutdown action for OutManager.
static FwSmDesc_t outManagerDesc[CR_FW_NOF_OUTMANAGER]
The descriptors of the OutManager State Machines.
CrFwCounterU1_t CrFwOutManagerGetNOfPendingOutCmp(FwSmDesc_t smDesc)
Return the number of OutComponents currently in the POCL of an OutManager.
CrFwBool_t CrFwOutManagerLoad(FwSmDesc_t smDesc, FwSmDesc_t outCmp)
Load a new OutComponent into the OutManager.
static CrFwCounterU2_t outManagerPoclSize[CR_FW_NOF_OUTMANAGER]
The sizes of the POCL in the OutManager components.
static void OutManagerConfigAction(FwPrDesc_t initPr)
Configuration action for OutManagers.
static CrFwCmpData_t outManagerData[CR_FW_NOF_OUTMANAGER]
The data structures for the OutManager State Machines and their Procedures.
static CrFwOutManagerData_t outManagerCmpSpecificData[CR_FW_NOF_OUTMANAGER]
The component-specific data for the OutManager instances.
CrFwCounterU1_t CrFwOutManagerGetPOCLSize(FwSmDesc_t smDesc)
Return the size of the POCL of an OutManager.
CrFwCounterU2_t CrFwOutManagerGetNOfLoadedOutCmp(FwSmDesc_t smDesc)
Return the number of OutComponents successfully loaded in the POCL of an OutManager since the OutMana...
static void OutManagerExecAction(FwPrDesc_t execPr)
Implement the logic of the Execution Procedure (see figure below).
FwSmDesc_t CrFwOutManagerMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th OutManager State Machine instance.
Definition of the OutManager component.
User-modifiable parameters for the OutManager components (see CrFwOutManager.h).
#define CR_FW_NOF_OUTMANAGER
The number of OutManager components in the application.
#define CR_FW_OUTMANAGER_POCLSIZE
The sizes of the Pending OutComponent List (POCL) of the OutManager components.
void CrFwOutRegistryStartTracking(FwSmDesc_t outCmp)
Ask the OutRegistry to start tracking an out-going command or report.
void CrFwOutRegistryUpdateState(FwSmDesc_t outCmp, CrFwOutRegistryCmdRepState_t newState)
Ask the OutRegistry to update the state of an out-going command or report.
Definition of the OutRegistry Component.
CrFwOutRegistryCmdRepState_t
Enumerated type for the state of an out-going command or report tracked by the OutRegistry.
@ crOutRegistryTerminated
Out-going command or report has been passed to the OutStream.
@ crOutRegistryAborted
Out-going command or report has been aborted.
@ crOutRegistryPending
Out-going command or report is pending (waiting to be sent)
Interface for creating and accessing a report or command packet.
Definition and management of packet queues.
Interface for reporting an error detected by a framework component.
void CrFwRepErr(CrFwRepErrCode_t errCode, CrFwTypeId_t typeId, CrFwInstanceId_t instanceId)
Report an error which has no parameters attached to it.
FwPrDesc_t CrFwCmpGetResetProc()
Retrieve the singleton instance of the CRP.
void CrFwBaseCmpDefConfigAction(FwPrDesc_t prDesc)
Function which performs the default Configuration Action of the CRP.
Component Reset Procedure (CRP) for the Base Component.
Interface through which framework components access the current time.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
@ crOutManagerPoclFull
The Pending OutComponent List (POCL) of an OutManager is full (see CrFwOutManager....
@ crOutManagerIllId
A framework function has been called with an illegal OutManager identifier.
unsigned short CrFwInstanceId_t
Type used for instance identifiers.
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
Definition of the utility functions for the CORDET Framework.
Type for the Framework Component Data (FCD).
FwPrDesc_t initProc
The Component Initialization Procedure (CIP) (see CrFwInitProc.h).
CrFwInstanceId_t instanceId
The instance identifier of the framework component.
CrFwOutcome_t outcome
The outcome of an action or check executed by a state machine or by one of its procedures.
FwPrDesc_t resetProc
The Component Reset Procedure (CRP) (see CrFwResetProc.h).
FwPrDesc_t execProc
The Component Execution Procedure (CEP) (see CrFwBaseCmp.h).
void * cmpSpecificData
Derived data which are specific to each type of framework component.
CrFwTypeId_t typeId
The type identifier of the framework component.
Type for the data describing an OutManager.
FwSmDesc_t * pocl
Pending OutComponent List (POCL) for the OutManager.
CrFwCounterU1_t nOfOutCmpInPocl
Number of OutComponents currently in POCL.
CrFwCounterU1_t nextFreePoclPos
Next free position in the POCL.
CrFwCounterU2_t nOfLoadedOutCmp
Number of successfully loaded OutComponents.