26 #include "FwSmConstants.h" 27 #include "FwSmConfig.h" 29 #include "FwPrConfig.h" 31 #include "FwPrConstants.h" 235 FwSmDesc_t
inLoader, inStream, outStream;
266 FwSmStart(outStream);
344 FwSmStart(outStream);
481 FwSmStart(outStream);
504 if (inRepArray[i]==NULL)
552 if (inCmdArray[i]==NULL)
645 FwSmStart(outStream);
770 FwSmStart(outStream);
933 FwSmStart(outStream);
1038 FwSmStart(outStream);
1143 FwSmStart(outStream);
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
Interface through which framework components access the current time.
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...
An InReport has failed its validity check.
CrFwBool_t CrFwInLoaderTestCase9()
Check the execution function of an InLoader for the case where the packet destination is the host app...
A framework function was called with an illegal type/sub-type/discriminant triplet for an InCommand...
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.
void CrFwInCmdSample1SetValidityFlag(CrFwBool_t flag)
Set the value of the Validity Flag (see CrFwInCmdSample1ValidityCheck).
User-modifiable parameters for the InLoader components (see CrFwInLoader.h).
CrFwCounterU1_t CrFwOutStreamGetNOfPendingPckts(FwSmDesc_t smDesc)
Return the number of packets currently in the packet queue of an OutStream.
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).
#define CR_FW_HOST_APP_ID
The identifier of the host application.
Interface for the OutStream stub.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
The Pending Command/Report List (PCRL) of an InManager is full (see CrFwInManager.h)
CrFwBool_t CrFwCmpIsInCreated(FwSmDesc_t smDesc)
Return true if the argument component is in state CREATED.
The CORDET Framework defines an interface for reporting the outcome of an InCommand (see CrFwRepInCmd...
CrFwInstanceId_t CrFwCmpGetInstanceId(FwSmDesc_t smDesc)
Return the instance identifier of the argument component.
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
static FwSmDesc_t inFactory
The singleton instance of the InFactory.
User-modifiable parameters for the InFactory component (see CrFwInFactory.h).
#define CR_FW_INFACTORY_MAX_NOF_INREP
The maximum number of InReports which may be allocated at any one time.
Definition of the OutStream component.
CrFwBool_t CrFwInLoaderTestCase8()
Check the execution function of an InLoader for the case where the packet destination is the host app...
CrFwCounterU1_t CrFwOutStreamStubGetHandoverCnt()
Return the value of the handover counter which is incremented by the packet handover function in CrFw...
CrFwCounterU1_t CrFwInManagerGetPCRLSize(FwSmDesc_t smDesc)
Return the size of the PCRL of an InManager.
CrFwBool_t CrFwInLoaderTestCase7()
Check the execution function of an InLoader for the case where the packet destination is the host app...
CrFwOutcome_t CrFwRepInCmdOutcomeStubGetFailCode(CrFwCounterU2_t repPos)
Return the failure code of the InCommand Outcome Report at position repPos.
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").
void CrFwInStreamStubSetPcktCollectionCnt(CrFwCounterU1_t cnt)
Set the value of the packet collection counter which defines the number of packets available at the m...
Declaration of the test cases for the InLoader Component (see CrFwInLoader.h).
A framework function was called with an illegal type/sub-type/discriminant triplet for an InReport...
Allocation request for an InReport has failed (see CrFwInFactoryMakeInRep).
CrFwDestSrc_t CrFwRepErrStubGetDest(CrFwCounterU2_t errRepPos)
Return the destination associated to the error report at position errRepPos.
CrFwDestSrc_t CrFwInLoaderDefNoRerouting(CrFwDestSrc_t pcktDest)
Default implementation of the function which checks the legality of a destination and returns the re-...
CrFwCounterU1_t CrFwInStreamGetNOfPendingPckts(FwSmDesc_t smDesc)
Return the number of packets currently in the packet queue of an InStream.
Definition of the InRegistry Component.
CrFwBool_t CrFwInLoaderTestCase3()
Check the execution function of an InLoader for the case where the packet destination is invalid...
CrFwInstanceId_t CrFwRepErrStubGetSecondatyInstanceId(CrFwCounterU2_t errRepPos)
Return the secondary instance identifier associated to the error report at position errRepPos...
CrFwBool_t CrFwCmpIsInInitialized(FwSmDesc_t smDesc)
Return true if the argument component is in state INITIALIZED.
unsigned char CrFwDestSrc_t
Type used for the command or report destination and source.
CrFwServType_t CrFwRepInCmdOutcomeStubGetServType(CrFwCounterU2_t repPos)
Return the service type of the InCommand Outcome Report at position repPos.
Interface for reporting an error detected by a framework component.
CrFwTypeId_t CrFwRepErrStubGetTypeId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwRepInCmdOutcome_t CrFwRepInCmdOutcomeStubGetOutcome(CrFwCounterU2_t repPos)
Return the outcome of the InCommand Outcome Report at position repPos.
void CrFwInStreamStubSetPcktDest(CrFwDestSrc_t d)
Set the value of the destination of the next packet collected (see CrFwInStreamStubPcktCollect).
static CrFwDestSrc_t reroutingDest
Return value of function CrFwInLoaderDefGetReroutingDestination.
CrFwRepErrCode_t CrFwRepErrStubGetErrCode(CrFwCounterU2_t errRepPos)
Return the error code of the error report at position errRepPos.
CrFwBool_t CrFwInLoaderTestCase1()
Check the configuration of a newly created InLoader.
Definition of the InReport Component of the framework.
CrFwBool_t CrFwInLoaderTestCase2()
Check the execution function of an InLoader for the case where there are no pending packet in the InS...
User-modifiable parameters for the InRegistry component (see CrFwInRegistry.h).
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
CrFwBool_t CrFwInLoaderTestCase4()
Check the execution function of an InLoader for the case where the packet must be re-routed to anothe...
FwSmDesc_t CrFwInLoaderMake()
Factory function to retrieve the state machine implementing the InLoader singleton component...
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
FwSmDesc_t CrFwInManagerMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th InManager State Machine instance.
CrFwBool_t CrFwInLoaderTestCase6()
Check the execution function of an InLoader for the case where the packet destination is the host app...
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...
CrFwBool_t CrFwInLoaderTestCase5()
Check the execution function of an InLoader for the case where the packet destination is the host app...
CrFwCounterU2_t CrFwRepInCmdOutcomeStubGetPos()
Return the position in the InCommand Outcome Report array at which the next outcome report will be wr...
Definition of the InFactory component.
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)...
Definition of the utility functions for the CORDET Framework.
static FwSmDesc_t inLoader
The InLoader singleton.
CrFwBool_t CrFwInManagerLoad(FwSmDesc_t smDesc, FwSmDesc_t inCmp)
Load a new InReport or InCommand into the InManager.
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.
CrFwDiscriminant_t CrFwRepInCmdOutcomeStubGetDiscriminant(CrFwCounterU2_t repPos)
Return the discriminant of the InCommand Outcome Report at position repPos.
Interface for reporting the outcome of the processing of an InCommand.
An InReport could not be loaded in its InManager.
Interface for the InStream stub.
An InReport could not be created due to insufficient resources or illegal type/sub-type/discriminant...
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type of the command or report encapsulated in a packet.
void CrFwCmpExecute(FwSmDesc_t smDesc)
Execute a framework component.
void CrFwInFactoryReleaseInRep(FwSmDesc_t inRepInstance)
Release function for an InReport.
The InLoader has retrieved a packet with an invalid destination (see CrFwInLoader.h)
Definition of Base Component.
User-modifiable parameters for the OutFactory component (see CrFwOutFactory.h).
FwSmDesc_t CrFwInFactoryMake()
Factory function for the singleton instance of the InFactory.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr.h).
void CrFwInLoaderSetInStream(FwSmDesc_t inStream)
Set the InStream from which the packets will be retrieved the next time the InLoader is executed...
void CrFwInFactoryReleaseInCmd(FwSmDesc_t inCmdInstance)
Release function for an InCommand.
static void CrFwInLoaderTestCaseSetReroutingDest(CrFwDestSrc_t retValue)
Function to set the return value of function CrFwInLoaderTestCaseGetReroutingDestination.
CrFwBool_t CrFwInLoaderTestCase11()
Check the execution function of an InLoader for the case where the packet destination is the host app...
void CrFwInStreamStubSetPcktCmdRepType(CrFwCmdRepType_t type)
Set the type (command or report) of the next packet collected (see CrFwInStreamStubPcktCollect).
#define CR_FW_INLOADER_TYPE
Type identifier for the InLoader component.
CrFwDestSrc_t CrFwInLoaderTestCaseGetReroutingDestination(CrFwDestSrc_t pcktDest)
Test implementation of the function which checks the legality of a destination and returns the re-rou...
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
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).
CrFwCounterU2_t CrFwRepErrStubGetPos()
Return the position in the error report array at which the next error report will be written...
Sample InReport used in the Test Suite.
FwSmDesc_t CrFwInStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th InStream State Machine instance.
CrFwDestSrc_t CrFwInLoaderDefGetReroutingDestination(CrFwDestSrc_t pcktDest)
Default implementation of the function which checks the legality of a destination and returns the re-...
void CrFwInStreamStubSetPcktCmdRepId(CrFwInstanceId_t id)
Set the value of the command or report identifier of the next packet collected (see CrFwInStreamStubP...
CrFwServSubType_t CrFwRepInCmdOutcomeStubGetServSubType(CrFwCounterU2_t repPos)
Return the service sub-type of the InCommand Outcome Report at position repPos.
CrFwInstanceId_t CrFwRepErrStubGetInstanceId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
void CrFwPcktSetDiscriminant(CrFwPckt_t pckt, CrFwDiscriminant_t discriminant)
Set the discriminant of the command or report encapsulated in a packet.
No application errors have been detected.
Allocation request for a packet for an InCommand has failed (see CrFwInFactoryMakeInCmd).
FwSmDesc_t CrFwInFactoryMakeInCmd(CrFwPckt_t pckt)
Make function for a component encapsulating an incoming command (InCommand).
#define CR_FW_INFACTORY_MAX_NOF_INCMD
The maximum number of components representing an incoming command which may be allocated at any one t...
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
CrFwBool_t CrFwInLoaderTestCase10()
Check the execution function of an InLoader for the case where the packet destination is the host app...
CrFwCounterU1_t CrFwInManagerGetNOfPendingInCmp(FwSmDesc_t smDesc)
Return the number of InReport or InCommands currently in the PCRL of an InManager.
Sample InCommand used in the Test Suite.
Definition of the InCommand Component of the framework.