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