24 #include "FwSmConstants.h" 25 #include "FwSmConfig.h" 27 #include "FwPrConfig.h" 29 #include "FwPrConstants.h" 67 if (FwSmCheckRec(outCmp1) != smSuccess)
337 CrFwBool_t acceptAck, startAck, progressAck, termAck;
405 if (cycTime != curTimeStamp)
475 CrFwBool_t acceptAck, startAck, progressAck, termAck;
610 CrFwBool_t acceptAck, startAck, progressAck, termAck;
CrFwBool_t CrFwOutCmpIsProgressAck(FwSmDesc_t smDesc)
Return the acknowledge level for command progress for the command encapsulated in the OutComponent...
Type for the Framework Component Data (FCD).
Interface through which framework components access the current time.
unsigned short CrFwInstanceId_t
Type used for instance identifiers.
CrFwBool_t CrFwOutCmpTestCase2()
Check the abort function of an OutComponent.
#define CR_FW_OUTCMP_TYPE
Type identifier for the OutComponent components.
CrFwTypeId_t CrFwCmpGetTypeId(FwSmDesc_t smDesc)
Return the type identifier of the argument component.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
Definition of the Framework Component Data (FCD) Type.
CrFwDestSrc_t CrFwOutCmpGetDest(FwSmDesc_t smDesc)
Return the destination of the OutComponent.
An OutComponent has an invalid destination (see CrFwOutCmp.h)
CrFwPcktLength_t CrFwOutCmpGetParLength(FwSmDesc_t smDesc)
Return the length in bytes of the parameter area of the OutComponent.
CrFwCounterU1_t CrFwOutStreamGetNOfPendingPckts(FwSmDesc_t smDesc)
Return the number of packets currently in the packet queue of an OutStream.
static FwSmDesc_t outCmp[CR_FW_OUTFACTORY_MAX_NOF_OUTCMP]
The pre-allocated OutComponent instances.
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
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).
#define CR_FW_HOST_APP_ID
The identifier of the host application.
Interface for the OutStream stub.
CrFwTimeCyc_t CrFwGetCurrentCycTime()
Return the current time in "cycle format" (integer number of cycles elapsed since some event)...
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
void CrFwOutCmpSample1SetReadyFlag(CrFwBool_t flag)
Set the value of Ready Flag (see CrFwOutCmpSample1ReadyCheck).
CrFwPckt_t CrFwPcktGetParStart(CrFwPckt_t pckt)
Return the start address of the packet's parameter area.
void CrFwOutCmpSample1SetEnableFlag(CrFwBool_t flag)
Set the value of Enable Flag (see CrFwOutCmpSample1EnableCheck).
CrFwInstanceId_t CrFwCmpGetInstanceId(FwSmDesc_t smDesc)
Return the instance identifier of the argument component.
CrFwBool_t CrFwOutCmpTestCase7()
Check the execution of a "repeat" OutComponent.
CrFwServType_t CrFwPcktGetServType(CrFwPckt_t pckt)
Return the service type of the command or report encapsulated in a packet.
static CrFwInstanceId_t apidInstanceId
The part of the command or report identifier which depends on the application identifier.
CrFwBool_t CrFwOutCmpTestCase1()
Check the configuration of a newly created OutComponent.
CrFwBool_t CrFwOutCmpIsStartAck(FwSmDesc_t smDesc)
Return the acknowledge level for command start for the command encapsulated in the OutComponent...
CrFwBool_t CrFwOutCmpIsInTerminated(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state TERMINATED.
Definition of the OutFactory component.
Type for the data describing an OutComponent.
void CrFwOutCmpSetTimeStamp(FwSmDesc_t smDesc, CrFwTimeStamp_t timeStamp)
Set the time stamp attribute of the OutComponent.
CrFwPckt_t CrFwOutCmpGetParStart(FwSmDesc_t smDesc)
Return the start address of the parameter area of the OutComponent.
CrFwDestSrc_t CrFwPcktGetDest(CrFwPckt_t pckt)
Return the destination of the command or report encapsulated in a packet.
CrFwPckt_t pckt
Packet to which the out-going command or report is serialized.
Interface for creating and accessing a report or command packet.
void CrFwOutCmpSetGroup(FwSmDesc_t smDesc, CrFwGroup_t group)
Set the group of the OutComponent.
void CrFwOutCmpSetAckLevel(FwSmDesc_t smDesc, CrFwBool_t accept, CrFwBool_t start, CrFwBool_t progress, CrFwBool_t term)
Set the acknowledge level for the command encapsulated in the OutComponent.
CrFwCrc_t CrFwPcktGetCrc(CrFwPckt_t pckt)
Return the CRC of the command or report encapsulated in a packet.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
CrFwServType_t CrFwOutCmpGetServType(FwSmDesc_t smDesc)
Return the type of the OutComponent.
Definition of the OutRegistry Component.
CrFwBool_t CrFwOutCmpTestCase5()
Check the execution of a "pending" OutComponent with a valid destination.
#define CR_FW_NBITS_APP_ID
The number of bits reserved for the application identifier in a command or report identifier...
CrFwBool_t CrFwOutCmpTestCase8()
Check the execution of a "repeat" OutComponent with an invalid destination.
CrFwBool_t CrFwOutCmpIsTermAck(FwSmDesc_t smDesc)
Return the acknowledge level for command termination for the command encapsulated in the OutComponent...
void CrFwRepErrStubReset()
Reset the error reporting interface.
unsigned char CrFwDestSrc_t
Type used for the command or report destination and source.
CrFwPckt_t CrFwOutCmpGetPckt(FwSmDesc_t smDesc)
Return the pointer to the packet which holds the OutComponent.
CrFwBool_t CrFwOutCmpIsInAborted(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state ABORTED.
static FwSmDesc_t outFactory
The singleton instance of the OutFactory.
Interface for reporting an error detected by a framework component.
void CrFwOutCmpSample1SetRepeatFlag(CrFwBool_t flag)
Set the value of Repeat Flag (see CrFwOutCmpSample1RepeatCheck).
CrFwBool_t CrFwOutCmpIsAcceptAck(FwSmDesc_t smDesc)
Return the acknowledge level for command acceptance for the command encapsulated in the OutComponent...
CrFwTypeId_t CrFwRepErrStubGetTypeId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
float CrFwTime_t
Type used for the application time.
CrFwBool_t CrFwOutCmpTestCase4()
Check the execution of a "ready" OutComponent with a valid destination.
CrFwBool_t CrFwOutCmpTestCase9()
Check the transition from state PENDING to state ABORTED.
CrFwTimeStamp_t CrFwOutCmpGetTimeStamp(FwSmDesc_t smDesc)
Return the time stamp attribute of the OutComponent.
CrFwRepErrCode_t CrFwRepErrStubGetErrCode(CrFwCounterU2_t errRepPos)
Return the error code of the error report at position errRepPos.
CrFwServType_t CrFwOutCmpGetServSubType(FwSmDesc_t smDesc)
Return the sub-type of the OutComponent.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
CrFwTime_t CrFwTimeStampToStdTime(CrFwTimeStamp_t timeStamp)
Convert a time value from time-stamp format to standard time format.
CrFwBool_t CrFwOutCmpTestCase6()
Check the default Enable Check Operation and Ready Check Operation of an OutComponent.
CrFwCmdRepType_t CrFwPcktGetCmdRepType(CrFwPckt_t pckt)
Return the type of a packet (either a command packet or a report packet).
CrFwDiscriminant_t CrFwPcktGetDiscriminant(CrFwPckt_t pckt)
Return the discriminant of the command or report encapsulated in a packet.
void * cmpSpecificData
Derived data which are specific to each type of framework component.
CrFwTimeStamp_t CrFwGetCurrentTimeStamp()
Return the current time in the format used for the command and report time-stamp. ...
Definition of the utility functions for the CORDET Framework.
FwSmDesc_t CrFwOutStreamGet(CrFwDestSrc_t dest)
Getter function for the OutStream corresponding to the argument destination.
CrFwBool_t CrFwOutCmpIsInLoaded(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state LOADED.
CrFwPcktLength_t CrFwPcktGetMaxLength()
Return the maximum length of a packet in number of bytes.
A framework function has been called with a destination attribute which is not associated to any OutS...
void CrFwOutStreamStubSetHandoverFlag(CrFwBool_t flag)
Set the value of the handover flag which determines the outcome of the packet handover in CrFwOutStre...
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
CrFwServSubType_t CrFwPcktGetServSubType(CrFwPckt_t pckt)
Return the service sub-type of the command or report encapsulated in a packet.
CrFwDiscriminant_t CrFwOutCmpGetDiscriminant(FwSmDesc_t smDesc)
Return the discriminant of the OutComponent.
void CrFwCmpExecute(FwSmDesc_t smDesc)
Execute a framework component.
CrFwBool_t CrFwPcktIsProgressAck(CrFwPckt_t pckt)
Return the acknowledge level for command progress for the command encapsulated in the packet...
CrFwBool_t CrFwOutCmpTestCase3()
Check the execution of a "ready" OutComponent with an invalid destination.
CrFwOutFactoryPoolIndex_t CrFwOutFactoryGetNOfAllocatedOutCmp()
Return the number of OutComponents which are currently allocated.
Definition of Base Component.
unsigned int CrFwTimeStamp_t
Type used for the time stamp of a command or report.
User-modifiable parameters for the OutFactory component (see CrFwOutFactory.h).
static CrFwDestSrc_t dest
Destination.
CrFwGroup_t CrFwOutCmpGetGroup(FwSmDesc_t smDesc)
Return the group of the OutComponent.
CrFwBool_t CrFwPcktIsStartAck(CrFwPckt_t pckt)
Return the acknowledge level for command start for the command encapsulated in the packet...
void CrFwOutFactoryReleaseOutCmp(FwSmDesc_t outCmpInstance)
Release function for an OutComponent.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr.h).
CrFwTime_t CrFwGetCurrentTime()
Return the current application time in standard format.
CrFwInstanceId_t CrFwPcktGetCmdRepId(CrFwPckt_t pckt)
Return the command or report identifier of the command or report encapsulated in a packet...
Definition of the OutComponent Component of the framework.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
FwSmDesc_t CrFwOutFactoryMake()
Factory function for the singleton instance of the OutFactory.
static CrFwCmpData_t outCmpData[CR_FW_OUTFACTORY_MAX_NOF_OUTCMP]
The data for the pre-allocated OutComponent instances.
User-modifiable parameters for the OutRegistry component (see CrFwOutRegistry.h). ...
CrFwPckt_t CrFwOutCmpSample1GetPckt(FwSmDesc_t smDesc)
Return the packet associated to the Sample 1 OutComponent.
void CrFwOutCmpSetDiscriminant(FwSmDesc_t smDesc, CrFwDiscriminant_t discriminant)
Set the discriminant of the OutComponent.
CrFwPcktLength_t CrFwPcktGetParLength(CrFwPckt_t pckt)
Return the length in bytes of the packet's parameter area.
CrFwBool_t CrFwPcktIsTermAck(CrFwPckt_t pckt)
Return the acknowledge level for command termination for the command encapsulated in the packet...
void CrFwOutCmpSetDest(FwSmDesc_t smDesc, CrFwDestSrc_t dest)
Set the destination of the OutComponent.
CrFwCounterU2_t CrFwRepErrStubGetPos()
Return the position in the error report array at which the next error report will be written...
unsigned int CrFwTimeCyc_t
Type used for the number of elapsed cycles.
static unsigned char counter
The Sample 1 Counter.
CrFwTimeStamp_t CrFwStdTimeToTimeStamp(CrFwTime_t stdTime)
Convert a time value from standard time format to time-stamp format.
void CrFwOutRegistrySetEnable(CrFwServType_t servType, CrFwServSubType_t servSubType, CrFwDiscriminant_t discriminant, CrFwBool_t isEnabled)
Set the enable state of a set of out-going commands or reports.
CrFwInstanceId_t CrFwRepErrStubGetInstanceId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
No application errors have been detected.
FwSmDesc_t CrFwOutFactoryMakeOutCmp(CrFwServType_t type, CrFwServSubType_t subType, CrFwDiscriminant_t discriminant, CrFwPcktLength_t length)
Make function for an OutComponent.
Declaration of the test cases for the OutComponent Component (see CrFwOutCmp.h).
void CrFwOutCmpSample1SetCounter(unsigned char cnt)
Set the value of Sample 1 Counter (see CrFwOutCmpSample1Serialize).
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
CrFwBool_t CrFwOutCmpIsInPending(FwSmDesc_t smDesc)
Return true if the argument OutComponent is in state PENDING.
CrFwBool_t CrFwPcktIsAcceptAck(CrFwPckt_t pckt)
Return the acknowledge level for command acceptance for the command encapsulated in the packet...