57 #define CR_FW_MAX_PACKET_LENGTH 100 60 #define CR_FW_MAX_PCKT_LENGTH 100 135 if (pcktLength < 1) {
253 (*loc) = discriminant;
CrFwBool_t CrFwPcktIsAvail(CrFwPcktLength_t pcktLength)
Check whether a packet of a specified length is available.
static const CrFwPcktLength_t offsetServSubType
Offset of the service sub-type field in a packet.
CrFwDestSrc_t CrFwPcktGetSrc(CrFwPckt_t pckt)
Return the source of the command or report encapsulated in a packet.
CrFwTimeStamp_t CrFwPcktGetTimeStamp(CrFwPckt_t pckt)
Return the time stamp of the command or report encapsulated in a packet.
A packet allocation request has failed (see CrFwPcktMake).
CrFwServType_t CrFwPcktGetServType(CrFwPckt_t pckt)
Return the service type of the command or report encapsulated in a packet.
void CrFwPcktRelease(CrFwPckt_t pckt)
Release function for command or report packets.
CrFwDiscriminant_t CrFwPcktGetDiscriminant(CrFwPckt_t pckt)
Return the discriminant of the command or report encapsulated in a packet.
CrFwPckt_t * pckt
The list of packets in the PQ.
static const CrFwPcktLength_t offsetAcceptAckLev
Offset of the acceptance acknowledge level field in a packet.
CrFwInstanceId_t CrFwPcktGetCmdRepId(CrFwPckt_t pckt)
Return the command or report identifier of the command or report encapsulated in a packet...
#define CR_FW_MAX_PCKT_LENGTH
The maximum size in number of bytes of a packet.
void CrFwPcktSetServType(CrFwPckt_t pckt, CrFwServType_t servType)
Set the service type of the command or report encapsulated in a packet.
unsigned char CrFwServSubType_t
Type used for the command or report sub-type.
void CrFwSetAppErrCode(CrFwAppErrCode_t errCode)
Set the value of the application error code (see CrFwGetAppErrCode).
unsigned char CrFwGroup_t
Type used for the destination or source group of a packet.
unsigned char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
CrFwCmdRepType_t CrFwPcktGetCmdRepType(CrFwPckt_t pckt)
Return the type of a packet (either a command packet or a report packet).
CrFwBool_t CrFwPcktIsTermAck(CrFwPckt_t pckt)
Return the acknowledge level for command termination for the command encapsulated in the packet...
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source 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.
unsigned short CrFwInstanceId_t
Type used for instance identifiers.
static const CrFwPcktLength_t offsetStartAckLev
Offset of the start acknowledge level field in a packet.
unsigned char CrFwDestSrc_t
Type used for the command or report destination and source.
CrFwCmdRepType_t
Enumerated type for command and reports.
CrFwPckt_t CrFwPcktMake(CrFwPcktLength_t pcktLength)
Make function for command or report packets.
void CrFwPcktSetCmdRepId(CrFwPckt_t pckt, CrFwInstanceId_t id)
Set the command or report identifier in the command or report encapsulated in a packet.
Interface for creating and accessing a report or command packet.
static const CrFwPcktLength_t offsetTermAckLev
Offset of the termination acknowledge level field in a packet.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
static CrFwServSubType_t servSubType
Service sub-type.
unsigned char CrFwServType_t
Type used for the service type of a command or report.
static const CrFwPcktLength_t offsetServType
Offset of the service type field in a packet.
void CrFwPcktSetCmdRepType(CrFwPckt_t pckt, CrFwCmdRepType_t type)
Set the type of a packet (either a command packet or a report packet).
Header file to define all invariant publicly available constants and types for the CORDET Framework...
CrFwSeqCnt_t CrFwPcktGetSeqCnt(CrFwPckt_t pckt)
Return the sequence 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.
static const CrFwPcktLength_t offsetSrc
Offset of the source field in a packet.
static const CrFwPcktLength_t offsetCmdRepType
Offset of the flag defining the type of packet (1 for a command, 2 for a report)
CrFwDestSrc_t CrFwPcktGetDest(CrFwPckt_t pckt)
Return the destination of the command or report encapsulated in a packet.
CrFwPcktLength_t CrFwPcktGetLength(CrFwPckt_t pckt)
Return the length (in number of bytes) of a packet.
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
static const CrFwPcktLength_t offsetPar
Offset of the parameter area in a packet.
unsigned short int CrFwPcktLength_t
Type for the packet length.
CrFwBool_t CrFwPcktIsProgressAck(CrFwPckt_t pckt)
Return the acknowledge level for command progress for the command encapsulated in the packet...
static const CrFwPcktLength_t offsetGroup
Offset of the group in a packet.
static CrFwCounterU2_t nOfAllocatedPckts
The number of currently allocated packets.
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.
CrFwPcktLength_t CrFwPcktGetMaxLength()
Return the maximum length of a packet in number of bytes.
char * CrFwPcktGetParStart(CrFwPckt_t pckt)
Return the start address of the packet's parameter area.
Definition of the utility functions for the CORDET Framework.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
static const CrFwPcktLength_t offsetProgressAckLev
Offset of the progress acknowledge level field in a packet.
static char pcktArray[CR_FW_MAX_NOF_PCKTS *CR_FW_MAX_PCKT_LENGTH]
The array holding the packets.
static const CrFwPcktLength_t offsetLength
Offset of the length field in a packet.
static const CrFwPcktLength_t offsetCmdRepId
Offset of the command or report identifier in a packet.
unsigned short CrFwDiscriminant_t
Type used for the discriminant of a command or report.
static CrFwBool_t pcktInUse[CR_FW_MAX_NOF_PCKTS]
The array holding the "in use" status of the packets.
CrFwServSubType_t CrFwPcktGetServSubType(CrFwPckt_t pckt)
Return the service sub-type 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.
CrFwCounterU2_t CrFwPcktGetNOfAllocated()
Return the number of packets which are currently allocated.
void CrFwPcktSetDest(CrFwPckt_t pckt, CrFwDestSrc_t dest)
Set the destination of the command or report encapsulated in a packet.
Definition of Base Component.
static CrFwServType_t servType
The InCommand type as computed in the Validity Check.
static CrFwDestSrc_t dest
Destination.
static const CrFwPcktLength_t offsetDiscriminant
Offset of the discriminant field in a packet.
CrFwPcktLength_t CrFwPcktGetParLength(CrFwPckt_t pckt)
Return the length in bytes of the packet's parameter area.
CrFwBool_t CrFwPcktIsAcceptAck(CrFwPckt_t pckt)
Return the acknowledge level for command acceptance 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.
static const CrFwPcktLength_t offsetSeqCnt
Offset of the sequence counter field in a packet.
A packet release request has encountered an error (see CrFwPcktRelease).
CrFwBool_t CrFwPcktIsStartAck(CrFwPckt_t pckt)
Return the acknowledge level for command start for the command encapsulated in the packet...
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
unsigned int CrFwSeqCnt_t
Type used for the sequence counter of commands or reports.
void CrFwPcktSetDiscriminant(CrFwPckt_t pckt, CrFwDiscriminant_t discriminant)
Set the discriminant of the command or report encapsulated in a packet.
static const CrFwPcktLength_t offsetTimeStamp
Offset of the time stamp field in a packet.
unsigned int CrFwTimeStamp_t
Type used for the time stamp of a command or report.
static const CrFwPcktLength_t offsetDest
Offset of the destination field in a packet.