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)
66 if (outStream0 == NULL)
76 if (outStream0 != outStreamBis)
80 if (FwSmCheckRec(outStream0) != smSuccess)
213 FwSmDesc_t outStream3;
217 if (outStream3 == NULL)
300 FwSmDesc_t outStream0;
308 if (outStream0 == NULL)
312 if (FwSmCheckRec(outStream0) != smSuccess)
316 FwSmStart(outStream0);
534 FwSmDesc_t outStream1;
539 if (outStream1 == NULL)
547 FwSmStart(outStream1);
570 FwSmDesc_t outStream0;
576 if (outStream0 == NULL)
580 if (FwSmCheckRec(outStream0) != smSuccess)
584 FwSmStart(outStream0);
706 FwSmStop(outStream0);
713 FwSmDesc_t outStream1;
720 if (outStream1 == NULL)
724 FwSmStart(outStream1);
736 if (FwSmCheckRec(outStream1) != smSuccess)
755 FwSmStart(outStream1);
956 FwSmStop(outStream1);
CrFwBool_t CrFwCmpIsStarted(FwSmDesc_t smDesc)
Return true if the state machine of the argument component has been started.
FwPrDesc_t CrFwCmpGetResetPr(FwSmDesc_t smDesc)
Return the descriptor of the Reset Procedure of the argument component.
FwPrDesc_t CrFwCmpGetExecPr(FwSmDesc_t smDesc)
Return the descriptor of the Execution Procedure of the argument component.
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.
FwPrDesc_t CrFwCmpGetInitPr(FwSmDesc_t smDesc)
Return the descriptor of the Initialization Procedure of the argument component.
Definition of Base Component.
Definition of the Framework Component Data (FCD) Type.
#define CR_FW_OUTSTREAM_TYPE
Type identifier for the OutStream components.
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").
static CrFwDestSrc_t dest
Destination.
FwSmDesc_t CrFwOutStreamGet(CrFwDestSrc_t dest)
Getter function for the OutStream corresponding to the argument destination.
CrFwCounterU2_t CrFwOutStreamGetNOfTypeCounters()
Return the number of type counters maintained by the OutStreams.
CrFwGroup_t CrFwOutStreamGetNOfGroups()
Return the number of groups associated to the OutStreams.
CrFwTypeCnt_t CrFwOutStreamGetTypeCounter(CrFwDestSrc_t dest, CrFwServType_t servType, CrFwServSubType_t servSubType)
Return the current type counter for a (destination, type, sub-type) triplet or zero if the triplet is...
CrFwCounterU1_t CrFwOutStreamGetNOfPendingPckts(FwSmDesc_t smDesc)
Return the number of packets currently in the packet queue of an OutStream.
CrFwSeqCnt_t CrFwOutStreamGetSeqCnt(CrFwGroup_t group)
Return the value of the sequence counter for one of the groups maintained by the OutStreams.
CrFwBool_t CrFwOutStreamIsInReady(FwSmDesc_t smDesc)
Return true if the argument OutStream is in state READY.
void CrFwOutStreamSetSeqCnt(CrFwGroup_t group, CrFwSeqCnt_t seqCnt)
Sets the value of the sequence counter for one of the groups maintained by the OutStreams.
CrFwDestSrc_t CrFwOutStreamGetDest(FwSmDesc_t outStream, CrFwCounterU1_t i)
Return the i-th destination associated to the argument outStream.
CrFwCounterU1_t CrFwOutStreamGetNOfDest(FwSmDesc_t outStream)
Return the number of destinations associated to the argument outStream.
FwSmDesc_t CrFwOutStreamMake(CrFwInstanceId_t i)
Factory function to retrieve the i-th OutStream State Machine instance.
CrFwCounterU1_t CrFwOutStreamGetPcktQueueSize(FwSmDesc_t smDesc)
Return the size of the packet queue of the OutStream.
void CrFwOutStreamConnectionAvail(FwSmDesc_t smDesc)
Signal that the out-going middleware connection has become available.
CrFwBool_t CrFwOutStreamIsInBuffering(FwSmDesc_t smDesc)
Return true if the argument OutStream is in state BUFFERING.
void CrFwOutStreamSend(FwSmDesc_t smDesc, CrFwPckt_t pckt)
Send a packet to the OutStream.
CrFwBool_t CrFwOutStreamIsInDtsSet(CrFwDestSrc_t dest, CrFwServType_t servType, CrFwServSubType_t servSubType)
Check whether the (destination, type, sub-type) triplet is in DTS_SET.
Definition of the OutStream component.
CrFwCounterU1_t CrFwOutStreamStubGetHandoverSuccCnt()
Return the value of the handover successful counter which is incremented by the packet handover funct...
CrFwSeqCnt_t CrFwOutStreamStubGetTypeCnt(CrFwCounterU1_t n)
Return the type counter of the n-th packet to have been handed over to the OutStream Stub.
void CrFwOutStreamStubSetCheckFlag(CrFwBool_t flag)
Set the value of the check flag which determines the outcome of the dummy check of CrFwOutStreamStubD...
CrFwCounterU1_t CrFwOutStreamStubGetShutdownCnt()
Return the value of the shutdown counter which is incremented by the packet shutdown function in CrFw...
void CrFwOutStreamStubSetActionFlag(CrFwBool_t flag)
Set the value of the action flag which determines the outcome of the initialization of configuration ...
void CrFwOutStreamStubSetHandoverFlag(CrFwBool_t flag)
Set the value of the handover flag which determines the outcome of the packet handover in CrFwOutStre...
Interface for the OutStream stub.
CrFwBool_t CrFwOutStreamTestCase2()
Test the OutStream with overridden initialization check and initialization action.
CrFwBool_t CrFwOutStreamTestCase5()
Test the Shutdown Operation of an OutStream.
CrFwBool_t CrFwOutStreamTestCase7()
Test the management of the sequence counters for different groups and of the type counters.
CrFwBool_t CrFwOutStreamTestCase1()
Test the initialization and packet queue (PQ) management of the OutStream.
CrFwBool_t CrFwOutStreamTestCase3()
Test the packet flushing functionality of an OutStream for a packet originating from the host applica...
CrFwBool_t CrFwOutStreamTestCase4()
Test the registry functionality of an OutStream.
CrFwBool_t CrFwOutStreamTestCase6()
Test the packet flushing functionality of an OutStream for a re-routed packet (as opposed to a packet...
Declaration of the test cases for the OutStream Component (see CrFwOutStream.h).
User-modifiable parameters for the OutStream components (see CrFwOutStream.h).
#define CR_FW_NOF_OUTSTREAM
The number of OutStream components in the application.
#define CR_FW_OUTSTREAM_NOF_DEST
Number of destinations for out-going packets.
static unsigned char pcktArray[CR_FW_MAX_NOF_PCKTS *CR_FW_MAX_PCKT_LENGTH]
The array holding the packets.
Interface for creating and accessing a report or command packet.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
CrFwTypeCnt_t CrFwPcktGetTypeCnt(CrFwPckt_t pckt)
Return the type counter of the command or report encapsulated in a packet.
void CrFwPcktSetSeqCnt(CrFwPckt_t pckt, CrFwSeqCnt_t seqCnt)
Set the sequence counter of the command or report encapsulated in a packet.
CrFwSeqCnt_t CrFwPcktGetSeqCnt(CrFwPckt_t pckt)
Return the sequence counter of the command or report encapsulated in a packet.
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type 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.
CrFwPcktLength_t CrFwPcktGetMaxLength()
Return the maximum length of a packet in number of bytes.
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
void CrFwPcktSetDest(CrFwPckt_t pckt, CrFwDestSrc_t dest)
Set the destination 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.
void CrFwPcktSetTypeCnt(CrFwPckt_t pckt, CrFwTypeCnt_t typeCnt)
Set the type counter of the command or report encapsulated in a packet.
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
void CrFwRepErrStubReset()
Reset the error reporting interface.
CrFwInstanceId_t CrFwRepErrStubGetInstanceId(CrFwCounterU2_t errRepPos)
Return the type identifier of 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 char CrFwDestSrc_t
Type used for the command or report destination and source.
#define CR_FW_MAX_NOF_PCKTS
The maximum number of packets which can be created with the default implementation of the packet acce...
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 char CrFwGroup_t
Type used for the destination or source group of a packet.
@ crOutStreamNoMorePckt
An OutStream cannot buffer an out-going packet because no more packets are available (see CrFwOutStre...
@ crOutStreamIllGroup
An OutComponent has an illegal group.
@ crOutStreamPQFull
The packet queue of an OutStream is full (see CrFwOutStream.h)
@ crNoAppErr
No application errors have been detected.
@ crOutStreamUndefDest
A framework function has been called with a destination attribute which is not associated to any OutS...
@ crOutStreamIllId
A framework function has been called with an illegal OutStream 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.