24 #include "FwSmConstants.h" 25 #include "FwSmConfig.h" 27 #include "FwPrConfig.h" 29 #include "FwPrConstants.h" 51 if (inStream0 != NULL)
59 if (inStream0 == NULL)
64 if (inStream0 != inStreamBis)
68 if (FwSmCheckRec(inStream0) != smSuccess)
101 if (
CrFwInStreamGet(inStreamSrc[CR_FW_NOF_INSTREAM-2])!=inStream[CR_FW_NOF_INSTREAM-2])
130 FwSmDesc_t inStream0;
135 if (inStream0 == NULL)
210 FwSmDesc_t inStream0;
215 if (inStream0 == NULL)
271 FwSmDesc_t inStream0;
281 if (inStream0 == NULL)
292 FwSmStart(inStream0);
371 for (i=0; i<n; i++) {
406 for (i=0; i<n; i++) {
430 FwSmDesc_t inStream3;
434 if (inStream3 == NULL)
453 FwSmStart(inStream3);
519 FwSmDesc_t inStream1;
523 if (inStream1 == NULL)
536 FwSmStart(inStream1);
563 FwSmDesc_t inStream2;
576 if (inStream2 == NULL)
580 FwSmStart(inStream2);
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
CrFwCounterU1_t CrFwInStreamGetPcktQueueSize(FwSmDesc_t smDesc)
Return the size of the packet queue of the InStream.
Interface through which framework components access the current time.
Declaration of the test cases for the InStream Component (see CrFwInStream.h).
unsigned short CrFwInstanceId_t
Type used for instance identifiers.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
Definition of the Framework Component Data (FCD) Type.
CrFwDestSrc_t CrFwInStreamGetSrc(FwSmDesc_t smDesc)
Get the currently defined packet source of an InStream.
CrFwBool_t CrFwInStreamIsInWaiting(FwSmDesc_t smDesc)
Return true if the argument InStream is in state WAITING.
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.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
CrFwBool_t CrFwCmpIsInCreated(FwSmDesc_t smDesc)
Return true if the argument component is in state CREATED.
CrFwSeqCnt_t CrFwPcktGetSeqCnt(CrFwPckt_t pckt)
Return the sequence counter of the command or report encapsulated in a packet.
#define CR_FW_INSTREAM_TYPE
Type identifier for the InStream components.
CrFwBool_t CrFwInStreamTestCase2()
Test the collection of packets from an InStream.
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...
CrFwCounterU1_t CrFwInStreamGetNOfPendingPckts(FwSmDesc_t smDesc)
Return the number of packets currently in the packet queue of an InStream.
CrFwGroup_t CrFwInStreamGetNOfGroups(FwSmDesc_t smDesc)
Return the number of groups associated to the InStream.
unsigned char CrFwGroup_t
Type used for the destination or source group of a packet.
CrFwCounterU1_t CrFwInStreamStubGetShutdownCnt()
Get the value of the shutdown counter (see CrFwInStreamStubShutdown).
void CrFwInStreamStubSetPcktSeqCnt(CrFwSeqCnt_t cnt)
Set the value of the sequence counter of the next packet collected (see CrFwInStreamStubPcktCollect)...
CrFwSeqCnt_t CrFwInStreamGetSeqCnt(FwSmDesc_t smDesc, CrFwGroup_t group)
Return the value of the sequence counter of the last packet successfully collected by the InStream fo...
void CrFwPcktRelease(CrFwPckt_t pckt)
Release function for command or report packets.
void CrFwRepErrStubReset()
Reset the error reporting interface.
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.
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.
void CrFwInStreamStubSetPcktDest(CrFwDestSrc_t d)
Set the value of the destination of the next packet collected (see CrFwInStreamStubPcktCollect).
#define CR_FW_INSTREAM_SRC
The packet source which is managed by the InStream component.
CrFwRepErrCode_t CrFwRepErrStubGetErrCode(CrFwCounterU2_t errRepPos)
Return the error code of the error report at position errRepPos.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
CrFwSeqCnt_t CrFwRepErrStubGetExpSeqCnt(CrFwCounterU2_t errRepPos)
Return the expected sequence counter associated to the error report at position errRepPos.
CrFwBool_t CrFwInStreamTestCase5()
Test the InStream with checks and actions which may be configured to succeed or fail.
void CrFwInStreamStubSetPcktGroup(CrFwGroup_t group)
Set the value of the group of the next packet collected (see CrFwInStreamStubPcktCollect).
CrFwBool_t CrFwInStreamTestCase4()
Test the error reporting functionalities of an InStream.
An InStream has encountered a sequence counter error (see CrFwInStream.h)
Definition of the utility functions for the CORDET Framework.
CrFwBool_t CrFwInStreamTestCase7()
Test the management of groups by the InStream.
CrFwBool_t CrFwInStreamTestCase1()
Test the initialization and packet queue (PQ) management of the InStream.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
A framework function has been called with an illegal InStream identifier.
Interface for the InStream stub.
void CrFwInStreamSetSeqCnt(FwSmDesc_t smDesc, CrFwGroup_t group, CrFwSeqCnt_t seqCnt)
Overwrites the sequence counter value of the last packet for a group.
#define CR_FW_NOF_INSTREAM
The number of InStream components in the application.
FwSmDesc_t CrFwInStreamGet(CrFwDestSrc_t src)
Getter function for the InStream corresponding to the argument source.
Definition of Base Component.
The packet queue of an InStream is full (see CrFwInStream.h)
CrFwBool_t CrFwCmpIsStarted(FwSmDesc_t smDesc)
Return true if the state machine of the argument component has been started.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr.h).
unsigned short int CrFwPcktLength_t
Type for the packet length.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
CrFwSeqCnt_t CrFwRepErrStubGetActualSeqCnt(CrFwCounterU2_t errRepPos)
Return the actual sequence counter associated to 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...
FwSmDesc_t CrFwInStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th InStream State Machine instance.
void CrFwInStreamStubSetActionFlag(CrFwBool_t flag)
Set the value of the action flag which determines the outcome of the initialization or configuration ...
void CrFwInStreamPcktAvail(FwSmDesc_t smDesc)
Query the middleware for available packets and collect them if they are available.
CrFwPckt_t CrFwInStreamGetPckt(FwSmDesc_t smDesc)
Retrieve a packet from the InStream.
A framework function has been called with a source attribute which is not associated to any InStream...
void CrFwInStreamStubSetCheckFlag(CrFwBool_t flag)
Set the value of the check flag which determines the outcome of the dummy check of CrFwInStreamStubDu...
User-modifiable parameters for the InStream components (see CrFwInStream.h).
CrFwInstanceId_t CrFwRepErrStubGetInstanceId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwBool_t CrFwInStreamTestCase6()
Test the function to override the Shutdown Operation of an InStream and to verify entry into PCKT_AVA...
void CrFwCmpShutdown(FwSmDesc_t smDesc)
Shutdown a framework component.
No application errors have been detected.
CrFwBool_t CrFwInStreamTestCase3()
Test the self-transition on state PCKT_AVAIL and the shutdown of an InStream.
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
unsigned int CrFwSeqCnt_t
Type used for the sequence counter of commands or reports.
An incoming command or report has an illegal group.
static CrFwDestSrc_t inStreamSrc[CR_FW_NOF_INSTREAM]
The sources associated to the InStream components.