23 #include "FwSmConstants.h" 24 #include "FwSmConfig.h" 26 #include "FwPrConfig.h" 28 #include "FwPrConstants.h" 207 if (CR_FW_MAX_NOF_PCKTS>1) {
211 pckt[CR_FW_MAX_NOF_PCKTS-1] = NULL;
213 if (extraPckt == NULL)
223 for (i=0; i<CR_FW_MAX_NOF_PCKTS-1; i++) {
263 pcktQueue.
pckt = NULL;
343 free(pcktQueue.
pckt);
CrFwTimeStamp_t CrFwPcktGetTimeStamp(CrFwPckt_t pckt)
Return the time stamp of the command or report encapsulated in a packet.
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
void CrFwPcktSetAckLevel(CrFwPckt_t pckt, CrFwBool_t accept, CrFwBool_t start, CrFwBool_t progress, CrFwBool_t term)
Set the acknowledge level for the command encapsulated in a packet.
void CrFwPcktQueueReset(CrFwPcktQueue_t pcktQueue)
Reset the packet queue.
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
CrFwBool_t CrFwPcktQueueIsEmpty(CrFwPcktQueue_t pcktQueue)
Return 1 if the packet queue is empty and 0 otherwise.
CrFwBool_t CrFwPacketTestCase1()
Test the creation of a packet and the read and write operations on its attributes.
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
CrFwPckt_t CrFwPcktQueuePop(CrFwPcktQueue_t pcktQueue)
Pop a packet from the packet queue.
CrFwPckt_t * pckt
The list of packets in the PQ.
CrFwBool_t CrFwPacketTestCase2()
Test the creation and release functions for a packet.
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
CrFwServType_t CrFwPcktGetServType(CrFwPckt_t pckt)
Return the service type of the command or report encapsulated in a packet.
CrFwDestSrc_t CrFwPcktGetSrc(CrFwPckt_t pckt)
Return the source 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.
A packet release request has encountered an error (see CrFwPcktRelease).
CrFwBool_t CrFwPcktQueuePush(CrFwPcktQueue_t pcktQueue, CrFwPckt_t pckt)
Push a packet onto the packet queue.
void CrFwPcktQueueInit(CrFwPcktQueue_t pcktQueue, CrFwCounterU1_t size)
Initializes the packet queue.
Declaration of the test cases for the default packet implementation of CrFwBaseCmp.h.
CrFwDestSrc_t CrFwPcktGetDest(CrFwPckt_t pckt)
Return the destination of the command or report encapsulated in a packet.
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").
A packet allocation request has failed (see CrFwPcktMake).
void CrFwPcktSetDest(CrFwPckt_t pckt, CrFwDestSrc_t dest)
Set the destination of the command or report encapsulated in a packet.
#define CR_FW_MAX_NOF_PCKTS
The maximum number of packets which can be created with the default packet implementation.
void CrFwPcktSetCmdRepId(CrFwPckt_t pckt, CrFwInstanceId_t id)
Set the command or report identifier in the command or report encapsulated in a packet.
Descriptor for a Packet Queue (PQ) in an OutStream or InStream.
CrFwBool_t CrFwPacketQueueTestCase1()
Test the packet queue functions which are not covered through other tests.
Header file to define all invariant publicly available constants and types for the CORDET Framework...
void CrFwPcktRelease(CrFwPckt_t pckt)
Release function for command or report packets.
CrFwPckt_t CrFwPcktQueueGetOldest(CrFwPcktQueue_t pcktQueue)
Return the oldest packet from the queue without removing it from the queue.
CrFwBool_t CrFwPcktIsAvail(CrFwPcktLength_t pcktLength)
Check whether a packet of a specified length is available.
CrFwCounterU1_t CrFwPcktQueueGetSize(CrFwPcktQueue_t pcktQueue)
Return the size of the packet queue.
void CrFwPcktSetCmdRepType(CrFwPckt_t pckt, CrFwCmdRepType_t type)
Set the type of a packet (either a command packet or a report packet).
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
CrFwCounterU1_t CrFwPcktQueueGetNOfPckts(CrFwPcktQueue_t pcktQueue)
Return the number of packets currently in the packet queue.
Definition and management of packet queues.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
CrFwCmdRepType_t CrFwPcktGetCmdRepType(CrFwPckt_t pckt)
Return the type of a packet (either a command packet or a report packet).
CrFwDiscriminant_t CrFwPcktGetDiscriminant(CrFwPckt_t pckt)
Return the discriminant of the command or report encapsulated in a packet.
Definition of the utility functions for the CORDET Framework.
CrFwPcktLength_t CrFwPcktGetMaxLength()
Return the maximum length of a packet in number of bytes.
CrFwServSubType_t CrFwPcktGetServSubType(CrFwPckt_t pckt)
Return the service sub-type 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.
CrFwBool_t CrFwPcktIsProgressAck(CrFwPckt_t pckt)
Return the acknowledge level for command progress for the command encapsulated in the packet...
Definition of Base Component.
CrFwBool_t CrFwPcktIsStartAck(CrFwPckt_t pckt)
Return the acknowledge level for command start for the command encapsulated in the packet...
CrFwPcktLength_t CrFwPcktGetLength(CrFwPckt_t pckt)
Return the length (in number of bytes) of a packet.
CrFwInstanceId_t CrFwPcktGetCmdRepId(CrFwPckt_t pckt)
Return the command or report identifier of the command or report encapsulated in a packet...
CrFwGroup_t CrFwPcktGetGroup(CrFwPckt_t pckt)
Return the group of the command/report encapsulated in a packet.
unsigned short int CrFwPcktLength_t
Type for the packet length.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
CrFwBool_t CrFwPcktIsTermAck(CrFwPckt_t pckt)
Return the acknowledge level for command termination for the command encapsulated in the packet...
void CrFwPcktSetTimeStamp(CrFwPckt_t pckt, CrFwTimeStamp_t timeStamp)
Set the time stamp 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.
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.
CrFwAppErrCode_t CrFwGetAppErrCode()
Return the value of the application error code.
CrFwBool_t CrFwPcktIsAcceptAck(CrFwPckt_t pckt)
Return the acknowledge level for command acceptance for the command encapsulated in the packet...