24 #include "FwSmConstants.h"
25 #include "FwSmConfig.h"
27 #include "FwPrConfig.h"
29 #include "FwPrConstants.h"
50 FwSmDesc_t outManager1, outManagerIll;
87 if (outManagerIll != NULL)
107 FwSmDesc_t outCmp1, outCmp2, outCmp3, outCmp4, outCmp5;
198 FwSmDesc_t sampleOutCmp;
199 FwSmCounterU3_t execCnt;
244 execCnt = FwSmGetExecCnt(sampleOutCmp);
251 if (FwSmGetExecCnt(sampleOutCmp) != execCnt+1)
253 if (FwSmGetStateExecCnt(sampleOutCmp) != 1)
287 if (FwSmGetStateExecCnt(sampleOutCmp) != 2)
317 FwSmDesc_t sampleOutCmp1, sampleOutCmp2, stdOutCmp1, stdOutCmp2, stdOutCmp3, stdOutCmp4;
344 FwSmStart(outStream1);
464 FwSmStart(outManager4);
CrFwInstanceId_t CrFwCmpGetInstanceId(FwSmDesc_t smDesc)
Return the instance identifier of the argument component.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
CrFwBool_t CrFwCmpIsInInitialized(FwSmDesc_t smDesc)
Return true if the argument component is in state INITIALIZED.
void CrFwCmpShutdown(FwSmDesc_t smDesc)
Shutdown a framework component.
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
CrFwBool_t CrFwCmpIsInCreated(FwSmDesc_t smDesc)
Return true if the argument component is in state CREATED.
void CrFwCmpExecute(FwSmDesc_t smDesc)
Execute a framework component.
CrFwTypeId_t CrFwCmpGetTypeId(FwSmDesc_t smDesc)
Return the type identifier of the argument component.
Definition of Base Component.
Definition of the Framework Component Data (FCD) Type.
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.
static CrFwDestSrc_t dest
Destination.
CrFwBool_t CrFwOutCmpIsInPending(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state PENDING.
void CrFwOutCmpSetDest(FwSmDesc_t smDesc, CrFwDestSrc_t dest)
Set the destination of the OutComponent.
CrFwBool_t CrFwOutCmpIsInLoaded(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state LOADED.
CrFwBool_t CrFwOutCmpIsInAborted(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state ABORTED.
CrFwBool_t CrFwOutCmpIsInTerminated(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state TERMINATED.
Definition of the OutComponent Component of the framework.
void CrFwOutCmpSample1SetReadyFlag(CrFwBool_t flag)
Set the value of Ready Flag (see CrFwOutCmpSample1ReadyCheck).
void CrFwOutCmpSample1SetEnableFlag(CrFwBool_t flag)
Set the value of Enable Flag (see CrFwOutCmpSample1EnableCheck).
CrFwOutFactoryPoolIndex_t CrFwOutFactoryGetNOfAllocatedOutCmp()
Return the number of OutComponents which are currently allocated.
static FwSmDesc_t outFactory
The singleton instance of the OutFactory.
FwSmDesc_t CrFwOutFactoryMakeOutCmp(CrFwServType_t type, CrFwServSubType_t subType, CrFwDiscriminant_t discriminant, CrFwPcktLength_t length)
Make function for an OutComponent.
FwSmDesc_t CrFwOutFactoryMake()
Factory function for the singleton instance of the OutFactory.
Definition of the OutFactory component.
User-modifiable parameters for the OutFactory component (see CrFwOutFactory.h).
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.
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...
FwSmDesc_t CrFwOutManagerMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th OutManager State Machine instance.
CrFwBool_t CrFwOutManagerTestCase2()
Check the load function of an OutManager.
CrFwBool_t CrFwOutManagerTestCase4()
Check the execution function of an OutManager with several OutComponents loaded.
CrFwBool_t CrFwOutManagerTestCase1()
Check the configuration of a newly created OutManager.
CrFwBool_t CrFwOutManagerTestCase3()
Check the execution function of an OutManager with one single OutComponent loaded.
Declaration of the test cases for the OutManager Component (see CrFwOutManager.h).
User-modifiable parameters for the OutManager components (see CrFwOutManager.h).
#define CR_FW_NOF_OUTMANAGER
The number of OutManager components in the application.
FwSmDesc_t CrFwOutRegistryMake()
Factory function for the singleton instance of the OutRegistry.
static FwSmDesc_t outRegistry
The OutRegistry singleton.
CrFwOutRegistryCmdRepState_t CrFwOutRegistryGetState(CrFwInstanceId_t cmdRepId)
Query the OutRegistry for the state of an out-going command or report.
Definition of the OutRegistry Component.
@ 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)
User-modifiable parameters for the OutRegistry component (see CrFwOutRegistry.h).
CrFwDestSrc_t CrFwOutStreamGetDest(FwSmDesc_t outStream, CrFwCounterU1_t i)
Return the i-th destination associated to the argument outStream.
FwSmDesc_t CrFwOutStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th OutStream State Machine instance.
Definition of the OutStream component.
Interface for the OutStream stub.
User-modifiable parameters for the OutStream components (see CrFwOutStream.h).
Interface for creating and accessing a report or command packet.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
CrFwInstanceId_t CrFwRepErrStubGetInstanceId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwCounterU2_t CrFwRepErrStubGetPos()
Return the position in the error report array at which the next error report will be written.
CrFwTypeId_t CrFwRepErrStubGetTypeId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwRepErrCode_t CrFwRepErrStubGetErrCode(CrFwCounterU2_t errRepPos)
Return the error code of the error report at position errRepPos.
Interface for reporting an error detected by a framework component.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr....
Interface through which framework components access the current time.
unsigned char CrFwDestSrc_t
Type used for the command or report destination and source.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
@ crOutManagerPoclFull
The Pending OutComponent List (POCL) of an OutManager is full (see CrFwOutManager....
@ crNoAppErr
No application errors have been detected.
@ crOutManagerIllId
A framework function has been called with an illegal OutManager identifier.
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
Definition of the utility functions for the CORDET Framework.