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)
143 FwSmDesc_t inStream0;
148 if (inStream0 == NULL)
227 FwSmDesc_t inStream0;
232 if (inStream0 == NULL)
288 FwSmDesc_t inStream0;
298 if (inStream0 == NULL)
309 FwSmStart(inStream0);
388 for (i=0; i<n; i++) {
423 for (i=0; i<n; i++) {
447 FwSmDesc_t inStream3;
451 if (inStream3 == NULL)
470 FwSmStart(inStream3);
539 FwSmDesc_t inStream1;
543 if (inStream1 == NULL)
556 FwSmStart(inStream1);
583 FwSmDesc_t inStream2;
596 if (inStream2 == NULL)
600 FwSmStart(inStream2);
CrFwBool_t CrFwCmpIsStarted(FwSmDesc_t smDesc)
Return true if the state machine of the argument component has been started.
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.
Definition of Base Component.
Definition of the Framework Component Data (FCD) Type.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
#define CR_FW_INSTREAM_TYPE
Type identifier for the InStream components.
CrFwBool_t CrFwInStreamIsInWaiting(FwSmDesc_t smDesc)
Return true if the argument InStream is in state WAITING.
CrFwCounterU1_t CrFwInStreamGetNOfSrc(FwSmDesc_t smDesc)
Get the number of packet sources of the argument InStream.
static CrFwDestSrc_t inStreamSrcPairs[CR_FW_INSTREAM_NOF_SRCS][2]
The association between sources and inSreams.
CrFwCounterU1_t CrFwInStreamGetPcktQueueSize(FwSmDesc_t smDesc)
Return the size of the packet queue of the InStream.
CrFwCounterU1_t CrFwInStreamGetNOfPendingPckts(FwSmDesc_t smDesc)
Return the number of packets currently in the packet queue of an InStream.
CrFwPckt_t CrFwInStreamGetPckt(FwSmDesc_t smDesc)
Retrieve a packet from the InStream.
CrFwBool_t CrFwInStreamIsInPcktAvail(FwSmDesc_t smDesc)
Return true if the argument InStream is in state PCKT_AVAIL.
void CrFwInStreamSetSeqCnt(CrFwGroup_t group, CrFwSeqCnt_t seqCnt)
Overwrites the sequence counter value of the last packet for a group.
CrFwDestSrc_t CrFwInStreamGetSrc(FwSmDesc_t smDesc, CrFwCounterU1_t i)
Get the i-th packet source of the argument InStream.
FwSmDesc_t CrFwInStreamGet(CrFwDestSrc_t src)
Getter function for the InStream corresponding to the argument source.
CrFwGroup_t CrFwInStreamGetNOfGroups()
Return the number of groups managed by the InStreams.
CrFwSeqCnt_t CrFwInStreamGetSeqCnt(CrFwGroup_t group)
Return the value of the sequence counter of the last packet successfully collected by the InStreams f...
void CrFwInStreamPcktAvail(FwSmDesc_t smDesc)
Query the middleware for available packets and collect them if they are available.
FwSmDesc_t CrFwInStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th InStream State Machine instance.
Definition of the InStream component.
void CrFwInStreamStubSetPcktDest(CrFwDestSrc_t d)
Set the value of the destination of the next packet collected (see CrFwInStreamStubPcktCollect).
void CrFwInStreamStubSetPcktSeqCnt(CrFwSeqCnt_t cnt)
Set the value of the sequence counter of the next packet collected (see CrFwInStreamStubPcktCollect).
void CrFwInStreamStubSetActionFlag(CrFwBool_t flag)
Set the value of the action flag which determines the outcome of the initialization or configuration ...
void CrFwInStreamStubSetPcktCollectionCnt(CrFwCounterU1_t cnt)
Set the value of the packet collection counter which defines the number of packets available at the m...
void CrFwInStreamStubSetPcktGroup(CrFwGroup_t group)
Set the value of the group of the next packet collected (see CrFwInStreamStubPcktCollect).
CrFwCounterU1_t CrFwInStreamStubGetShutdownCnt()
Get the value of the shutdown counter (see CrFwInStreamStubShutdown).
void CrFwInStreamStubSetCheckFlag(CrFwBool_t flag)
Set the value of the check flag which determines the outcome of the dummy check of CrFwInStreamStubDu...
Interface for the InStream stub.
CrFwBool_t CrFwInStreamTestCase3()
Test the self-transition on state PCKT_AVAIL and the shutdown of an InStream.
CrFwBool_t CrFwInStreamTestCase1()
Test the initialization and packet queue (PQ) management of the InStream.
CrFwBool_t CrFwInStreamTestCase7()
Test the management of groups by the InStream.
CrFwBool_t CrFwInStreamTestCase6()
Test the function to override the Shutdown Operation of an InStream and to verify entry into PCKT_AVA...
CrFwBool_t CrFwInStreamTestCase5()
Test the InStream with checks and actions which may be configured to succeed or fail.
CrFwBool_t CrFwInStreamTestCase2()
Test the collection of packets from an InStream.
CrFwBool_t CrFwInStreamTestCase4()
Test the error reporting functionalities of an InStream.
Declaration of the test cases for the InStream Component (see CrFwInStream.h).
User-modifiable parameters for the InStream components (see CrFwInStream.h).
#define CR_FW_NOF_INSTREAM
The number of InStream components in the application.
#define CR_FW_INSTREAM_SRC_PAIRS
The association of sources to InStreams.
#define CR_FW_INSTREAM_NOF_SRCS
The number of distinct sources from which the InStream components may receive packets.
static CrFwSeqCnt_t seqCnt[CR_FW_OUTSTREAM_STUB_MEM_LEN]
Sequence counters of most recently received packets.
Interface for creating and accessing a report or command packet.
CrFwSeqCnt_t CrFwPcktGetSeqCnt(CrFwPckt_t pckt)
Return the sequence counter of the command or report encapsulated in a packet.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
void CrFwPcktRelease(CrFwPckt_t pckt)
Release function for command or report packets.
CrFwSeqCnt_t CrFwRepErrStubGetActualSeqCnt(CrFwCounterU2_t errRepPos)
Return the actual sequence counter associated to the error report at position errRepPos.
void CrFwRepErrStubReset()
Reset the error reporting interface.
CrFwInstanceId_t CrFwRepErrStubGetInstanceId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwSeqCnt_t CrFwRepErrStubGetExpSeqCnt(CrFwCounterU2_t errRepPos)
Return the expected 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.
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 int CrFwSeqCnt_t
Type used for the sequence counter of commands or reports.
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.
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
unsigned short int CrFwPcktLength_t
Type for the packet length.
unsigned char CrFwGroup_t
Type used for the destination or source group of a packet.
@ crInStreamSCErr
An InStream has encountered a sequence counter error (see CrFwInStream.h)
@ crInStreamIllGroup
An incoming command or report has an illegal group.
@ crInStreamPQFull
The packet queue of an InStream is full (see CrFwInStream.h)
@ crInStreamUndefDest
A framework function has been called with a source attribute which is not associated to any InStream.
@ crNoAppErr
No application errors have been detected.
@ crInStreamIllId
A framework function has been called with an illegal InStream identifier.
#define CR_FW_HOST_APP_ID
The identifier of the host application (i.e.
unsigned short CrFwInstanceId_t
Type used for instance identifiers.
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.