21 #include "CrFwInLoaderTestCases.h" 24 #include "CrFwRepInCmdOutcomeStub.h" 26 #include "FwSmConstants.h" 27 #include "FwSmConfig.h" 29 #include "FwPrConfig.h" 31 #include "FwPrConstants.h" 45 #include "CrFwInRegistryUserPar.h" 46 #include "CrFwInLoaderUserPar.h" 47 #include "CrFwInStreamStub.h" 48 #include "CrFwOutStreamStub.h" 49 #include "CrFwRepErrStub.h" 50 #include "CrFwInFactoryUserPar.h" 51 #include "CrFwOutFactoryUserPar.h" 52 #include "CrFwCmpData.h" 235 FwSmDesc_t
inLoader, inStream, outStream;
266 FwSmStart(outStream);
344 FwSmStart(outStream);
485 FwSmStart(outStream);
508 if (inRepArray[i]==NULL)
560 if (inCmdArray[i]==NULL)
653 FwSmStart(outStream);
782 FwSmStart(outStream);
947 FwSmStart(outStream);
1052 FwSmStart(outStream);
1157 FwSmStart(outStream);
void CrFwInStreamStubSetPcktAckLevel(CrFwBool_t acc, CrFwBool_t str, CrFwBool_t prg, CrFwBool_t trm)
Set the value of the acknowledge level of the next packet collected (see CrFwInStreamStubPcktCollect)...
CrFwDestSrc_t CrFwRepErrStubGetDest(CrFwCounterU2_t errRepPos)
Return the destination associated to the error report at position errRepPos.
CrFwCounterU2_t CrFwRepInCmdOutcomeStubGetPos()
Return the position in the InCommand Outcome Report array at which the next outcome report will be wr...
Interface through which framework components access the current time.
static void CrFwInLoaderTestCaseSetReroutingDest(CrFwDestSrc_t retValue)
Function to set the return value of function CrFwInLoaderTestCaseGetReroutingDestination.
CrFwInstanceId_t CrFwInLoaderDefGetInManager(CrFwServType_t servType, CrFwServSubType_t servSubType, CrFwDiscriminant_t discriminant, CrFwCmdRepType_t cmdRepFlag)
Default implementation of the function which selects the InManager to which an incoming InReport or I...
CrFwCounterU4_t i
CrPsCmd5EidStart function definitions.
Allocation request for a packet for an InCommand has failed (see CrFwInFactoryMakeInCmd).
CrFwTypeId_t CrFwCmpGetTypeId(FwSmDesc_t smDesc)
Return the type identifier of the argument component.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
void CrFwInCmdSample1SetValidityFlag(CrFwBool_t flag)
Set the value of the Validity Flag (see CrFwInCmdSample1ValidityCheck).
CrFwInstanceId_t CrFwRepErrStubGetInstanceId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwCounterU1_t CrFwOutStreamGetNOfPendingPckts(FwSmDesc_t smDesc)
Return the number of packets currently in the packet queue of an OutStream.
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type of the command or report encapsulated in a packet.
#define CR_FW_INFACTORY_MAX_NOF_INCMD
The maximum number of components representing an incoming command which may be allocated at any one t...
CrFwBool_t CrFwCmpIsInConfigured(FwSmDesc_t smDesc)
Return true if the argument component is in state CONFIGURED.
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
CrFwBool_t CrFwCmpIsInCreated(FwSmDesc_t smDesc)
Return true if the argument component is in state CREATED.
CrFwInstanceId_t CrFwCmpGetInstanceId(FwSmDesc_t smDesc)
Return the instance identifier of the argument component.
static FwSmDesc_t inFactory
The singleton instance of the InFactory.
An InReport or InCommand has failed its acceptance check.
The Pending Command/Report List (PCRL) of an InManager is full (see CrFwInManager.h)
Definition of the OutStream component.
unsigned char CrFwDestSrc_t
Type used for the command or report destination and source.
CrFwInstanceId_t CrFwRepErrStubGetSecondatyInstanceId(CrFwCounterU2_t errRepPos)
Return the secondary instance identifier associated to the error report at position errRepPos...
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
CrFwCounterU1_t CrFwInManagerGetPCRLSize(FwSmDesc_t smDesc)
Return the size of the PCRL of an InManager.
Interface for creating and accessing a report or command packet.
Definition of the InStream component.
CrFwBool_t CrFwInStreamIsInPcktAvail(FwSmDesc_t smDesc)
Return true if the argument InStream is in state PCKT_AVAIL.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
CrFwDestSrc_t CrFwInLoaderDefNoRerouting(CrFwDestSrc_t pcktDest)
Default implementation of the function which checks the legality of a destination and returns the re-...
CrFwBool_t CrFwInLoaderTestCase2()
Check the execution function of an InLoader for the case where there are no pending packet in the InS...
CrFwCounterU1_t CrFwInStreamGetNOfPendingPckts(FwSmDesc_t smDesc)
Return the number of packets currently in the packet queue of an InStream.
Allocation request for an InReport has failed (see CrFwInFactoryMakeInRep).
CrFwBool_t CrFwInLoaderTestCase3()
Check the execution function of an InLoader for the case where the packet destination is invalid...
Definition of the InRegistry Component.
CrFwDestSrc_t CrFwInLoaderTestCaseGetReroutingDestination(CrFwDestSrc_t pcktDest)
Test implementation of the function which checks the legality of a destination and returns the re-rou...
CrFwBool_t CrFwCmpIsInInitialized(FwSmDesc_t smDesc)
Return true if the argument component is in state INITIALIZED.
CrFwBool_t CrFwInLoaderTestCase10()
Check the execution function of an InLoader for the case where the packet destination is the host app...
CrFwBool_t CrFwInLoaderTestCase4()
Check the execution function of an InLoader for the case where the packet must be re-routed to anothe...
Interface for reporting an error detected by a framework component.
static CrFwDestSrc_t reroutingDest
Return value of function CrFwInLoaderDefGetReroutingDestination.
CrFwRepInCmdOutcome_t CrFwRepInCmdOutcomeStubGetOutcome(CrFwCounterU2_t repPos)
Return the outcome of the InCommand Outcome Report at position repPos.
void CrFwInStreamStubSetPcktCmdRepType(CrFwCmdRepType_t type)
Set the type (command or report) of the next packet collected (see CrFwInStreamStubPcktCollect).
CrFwCounterU1_t CrFwOutStreamStubGetHandoverCnt()
Return the value of the handover counter which is incremented by the packet handover function in CrFw...
Definition of the InReport Component of the framework.
The InLoader has retrieved a packet with an invalid destination (see CrFwInLoader.h)
FwSmDesc_t CrFwInLoaderMake()
Factory function to retrieve the state machine implementing the InLoader singleton component...
CrFwBool_t CrFwInLoaderTestCase8()
Check the execution function of an InLoader for the case where the packet destination is the host app...
FwSmDesc_t CrFwInManagerMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th InManager State Machine instance.
CrFwBool_t CrFwInLoaderTestCase1()
Check the configuration of a newly created InLoader.
Definition of the InFactory component.
CrFwRepErrCode_t CrFwRepErrStubGetErrCode(CrFwCounterU2_t errRepPos)
Return the error code of the error report at position errRepPos.
Definition of the utility functions for the CORDET Framework.
CrFwServSubType_t CrFwRepInCmdOutcomeStubGetServSubType(CrFwCounterU2_t repPos)
Return the service sub-type of the InCommand Outcome Report at position repPos.
static FwSmDesc_t inLoader
The InLoader singleton.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
#define CR_FW_INFACTORY_MAX_NOF_INREP
The maximum number of InReports which may be allocated at any one time.
CrFwBool_t CrFwInManagerLoad(FwSmDesc_t smDesc, FwSmDesc_t inCmp)
Load a new InReport or InCommand into the InManager.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
A framework function was called with an illegal type/sub-type/discriminant triplet for an InReport...
CrFwBool_t CrFwInLoaderTestCase11()
Check the execution function of an InLoader for the case where the packet destination is the host app...
Interface for reporting the outcome of the processing of an InCommand.
void CrFwInStreamStubSetPcktType(CrFwServType_t sType, CrFwServSubType_t sSubType, CrFwDiscriminant_t d)
Set the value of the service type, sub-type and discriminant of the next packet collected (see CrFwIn...
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
void CrFwCmpExecute(FwSmDesc_t smDesc)
Execute a framework component.
void CrFwInFactoryReleaseInRep(FwSmDesc_t inRepInstance)
Release function for an InReport.
CrFwBool_t CrFwInLoaderTestCase9()
Check the execution function of an InLoader for the case where the packet destination is the host app...
void CrFwInStreamStubSetPcktCollectionCnt(CrFwCounterU1_t cnt)
Set the value of the packet collection counter which defines the number of packets available at the m...
Definition of Base Component.
A framework function was called with an illegal type/sub-type/discriminant triplet for an InCommand...
CrFwBool_t CrFwInLoaderTestCase6()
Check the execution function of an InLoader for the case where the packet destination is the host app...
FwSmDesc_t CrFwInFactoryMake()
Factory function for the singleton instance of the InFactory.
void CrFwInStreamStubSetPcktDest(CrFwDestSrc_t d)
Set the value of the destination of the next packet collected (see CrFwInStreamStubPcktCollect).
void CrFwInLoaderSetInStream(FwSmDesc_t inStream)
Set the InStream from which the packets will be retrieved the next time the InLoader is executed...
CrFwServType_t CrFwRepInCmdOutcomeStubGetServType(CrFwCounterU2_t repPos)
Return the service type of the InCommand Outcome Report at position repPos.
void CrFwInFactoryReleaseInCmd(FwSmDesc_t inCmdInstance)
Release function for an InCommand.
char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
void CrFwInStreamStubSetPcktCmdRepId(CrFwInstanceId_t id)
Set the value of the command or report identifier of the next packet collected (see CrFwInStreamStubP...
CrFwBool_t CrFwInLoaderTestCase7()
Check the execution function of an InLoader for the case where the packet destination is the host app...
#define CR_FW_INLOADER_TYPE
Type identifier for the InLoader component.
CrFwOutcome_t CrFwRepErrStubGetOutcome(CrFwCounterU2_t errRepPos)
Return the outcome associated to the error report at position errRepPos.
CrFwDestSrc_t CrFwOutStreamGetDest(FwSmDesc_t smDesc)
Get the destination for an OutStream.
FwSmDesc_t CrFwInFactoryMakeInRep(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming report (InReport).
FwSmDesc_t CrFwOutStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th OutStream State Machine instance.
void CrFwInRepSample1SetValidityFlag(CrFwBool_t flag)
Set the value of the Validity Flag (see CrFwInRepSample1ValidityCheck).
Sample InReport used in the Test Suite.
FwSmDesc_t CrFwInStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th InStream State Machine instance.
CrFwBool_t CrFwInLoaderTestCase5()
Check the execution function of an InLoader for the case where the packet destination is the host app...
CrFwDestSrc_t CrFwInLoaderDefGetReroutingDestination(CrFwDestSrc_t pcktDest)
Default implementation of the function which checks the legality of a destination and returns the re-...
CrFwDiscriminant_t CrFwRepInCmdOutcomeStubGetDiscriminant(CrFwCounterU2_t repPos)
Return the discriminant of the InCommand Outcome Report at position repPos.
#define CR_FW_HOST_APP_ID
The identifier of the Master Application of the CORDET Demo.
No application errors have been detected.
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
CrFwCounterU2_t CrFwRepErrStubGetPos()
Return the position in the error report array at which the next error report will be written...
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
void CrFwOutStreamStubSetHandoverFlag(CrFwBool_t flag)
Set the value of the handover flag which determines the outcome of the packet handover in CrFwOutStre...
FwSmDesc_t CrFwInFactoryMakeInCmd(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming command (InCommand).
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
void CrFwPcktSetDiscriminant(CrFwPckt_t pckt, CrFwDiscriminant_t discriminant)
Set the discriminant of the command or report encapsulated in a packet.
CrFwTypeId_t CrFwRepErrStubGetTypeId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwCounterU1_t CrFwInManagerGetNOfPendingInCmp(FwSmDesc_t smDesc)
Return the number of InReport or InCommands currently in the PCRL of an InManager.
CrFwOutcome_t CrFwRepInCmdOutcomeStubGetFailCode(CrFwCounterU2_t repPos)
Return the failure code of the InCommand Outcome Report at position repPos.
Sample InCommand used in the Test Suite.
Definition of the InCommand Component of the framework.