24 #include "FwSmConstants.h" 25 #include "FwSmConfig.h" 27 #include "FwPrConfig.h" 29 #include "FwPrConstants.h" 43 FwSmDesc_t outStream0, outStreamBis;
54 if (outStream0 != NULL)
62 if (outStream0 == NULL)
67 if (outStream0 != outStreamBis)
71 if (FwSmCheckRec(outStream0) != smSuccess)
189 FwSmDesc_t outStream3;
193 if (outStream3 == NULL)
264 FwSmDesc_t outStream0;
272 if (outStream0 == NULL)
276 if (FwSmCheckRec(outStream0) != smSuccess)
280 FwSmStart(outStream0);
369 if (pcktArray[i] != NULL)
440 if (pcktArray[i] != NULL)
500 FwSmDesc_t outStream1;
505 if (outStream1 == NULL)
513 FwSmStart(outStream1);
536 FwSmDesc_t outStream0;
542 if (outStream0 == NULL)
546 if (FwSmCheckRec(outStream0) != smSuccess)
550 FwSmStart(outStream0);
675 FwSmStop(outStream0);
682 FwSmDesc_t outStream1;
688 if (outStream1 == NULL)
695 if (FwSmCheckRec(outStream1) != smSuccess)
703 FwSmStart(outStream1);
836 FwSmStop(outStream1);
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
CrFwBool_t CrFwOutStreamTestCase1()
Test the initialization and packet queue (PQ) management of the OutStream.
Interface through which framework components access the current time.
void CrFwOutStreamSend(FwSmDesc_t smDesc, CrFwPckt_t pckt)
Send a packet to the OutStream.
unsigned short CrFwInstanceId_t
Type used for instance identifiers.
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
CrFwBool_t CrFwOutStreamTestCase2()
Test the OutStream with overridden initialization check and initialization action.
void CrFwCmpInit(FwSmDesc_t smDesc)
Initialize a framework component.
Definition of the Framework Component Data (FCD) Type.
CrFwCounterU1_t CrFwOutStreamGetNOfPendingPckts(FwSmDesc_t smDesc)
Return the number of packets currently in the packet queue of an OutStream.
CrFwGroup_t CrFwOutStreamGetNOfGroups(FwSmDesc_t smDesc)
Return the number of groups associated to the OutStream.
#define CR_FW_NOF_OUTSTREAM
The number of OutStream components in the application.
FwPrDesc_t CrFwCmpGetExecPr(FwSmDesc_t smDesc)
Return the descriptor of the Execution Procedure of the argument component.
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).
CrFwBool_t CrFwCmpIsInCreated(FwSmDesc_t smDesc)
Return true if the argument component is in state CREATED.
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
CrFwSeqCnt_t CrFwPcktGetSeqCnt(CrFwPckt_t pckt)
Return the sequence counter of the command or report encapsulated in a packet.
Definition of the OutStream component.
Interface for creating and accessing a report or command packet.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
#define CR_FW_MAX_NOF_PCKTS
The maximum number of packets which can be created with the default packet implementation.
unsigned char CrFwGroup_t
Type used for the destination or source group of a packet.
static unsigned char pcktArray[CR_FW_MAX_NOF_PCKTS *CR_FW_MAX_PCKT_LENGTH]
The array holding the packets.
CrFwBool_t CrFwOutStreamTestCase3()
Test the packet flushing functionality of an OutStream for a packet originating from the host applica...
void CrFwPcktRelease(CrFwPckt_t pckt)
Release function for command or report packets.
A framework function has been called with an illegal OutStream identifier.
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.
An OutComponent has an illegal group.
An OutStream cannot buffer an out-going packet because no more packets are available (see CrFwOutStre...
void CrFwOutStreamConnectionAvail(FwSmDesc_t smDesc)
Signal that the out-going middleware connection has become available.
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.
CrFwBool_t CrFwOutStreamIsInBuffering(FwSmDesc_t smDesc)
Return true if the argument OutStream is in state BUFFERING.
CrFwCounterU1_t CrFwOutStreamGetPcktQueueSize(FwSmDesc_t smDesc)
Return the size of the packet queue of the OutStream.
CrFwRepErrCode_t CrFwRepErrStubGetErrCode(CrFwCounterU2_t errRepPos)
Return the error code of the error report at position errRepPos.
The packet queue of an OutStream is full (see CrFwOutStream.h)
CrFwSeqCnt_t CrFwOutStreamGetSeqCnt(FwSmDesc_t smDesc, CrFwGroup_t group)
Return the value of the sequence counter for one of the groups maintained by an OutStream.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
void CrFwOutStreamStubSetCheckFlag(CrFwBool_t flag)
Set the value of the check flag which determines the outcome of the dummy check of CrFwOutStreamStubD...
Declaration of the test cases for the OutStream Component (see CrFwOutStream.h).
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.
CrFwPcktLength_t CrFwPcktGetMaxLength()
Return the maximum length of a packet in number of bytes.
FwPrDesc_t CrFwCmpGetInitPr(FwSmDesc_t smDesc)
Return the descriptor of the Initialization Procedure of the argument component.
FwPrDesc_t CrFwCmpGetResetPr(FwSmDesc_t smDesc)
Return the descriptor of the Reset Procedure of the argument component.
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 CrFwOutStreamSetSeqCnt(FwSmDesc_t smDesc, CrFwGroup_t group, CrFwSeqCnt_t seqCnt)
Sets the value of the sequence counter for one of the groups maintained by an OutStream.
CrFwBool_t CrFwOutStreamTestCase5()
Test the Shutdown Operation of an OutStream.
void CrFwCmpReset(FwSmDesc_t smDesc)
Reset a framework component.
Definition of Base Component.
CrFwBool_t CrFwCmpIsStarted(FwSmDesc_t smDesc)
Return true if the state machine of the argument component has been started.
static CrFwDestSrc_t dest
Destination.
The CORDET Framework defines an interface for generating error reports (see CrFwRepErr.h).
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
CrFwDestSrc_t CrFwOutStreamGetDest(FwSmDesc_t smDesc)
Get the destination for an OutStream.
CrFwBool_t CrFwOutStreamTestCase4()
Test the registry functionality of an OutStream.
FwSmDesc_t CrFwOutStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th OutStream State Machine instance.
CrFwBool_t CrFwOutStreamTestCase7()
Test the management of the sequence counters for different groups.
CrFwCounterU2_t CrFwRepErrStubGetPos()
Return the position in the error report array at which the next error report will be written...
CrFwBool_t CrFwOutStreamIsInReady(FwSmDesc_t smDesc)
Return true if the argument OutStream is in state READY.
void CrFwOutStreamStubSetActionFlag(CrFwBool_t flag)
Set the value of the action flag which determines the outcome of the initialization of configuration ...
void CrFwPcktSetSeqCnt(CrFwPckt_t pckt, CrFwSeqCnt_t seqCnt)
Set the sequence counter of the command or report encapsulated in a packet.
#define CR_FW_OUTSTREAM_TYPE
Type identifier for the OutStream components.
User-modifiable parameters for the OutStream components (see CrFwOutStream.h).
CrFwInstanceId_t CrFwRepErrStubGetInstanceId(CrFwCounterU2_t errRepPos)
Return the type identifier of the error report at position errRepPos.
CrFwCounterU1_t CrFwOutStreamStubGetShutdownCnt()
Return the value of the shutdown counter which is incremented by the packet shutdown function in CrFw...
void CrFwCmpShutdown(FwSmDesc_t smDesc)
Shutdown a framework component.
No application errors have been detected.
CrFwBool_t CrFwOutStreamTestCase6()
Test the packet flushing functionality of an OutStream for a re-routed packet (as opposed to a packet...
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.