91 return (apid & 0x000f);
126 void CrFwPcktSetPid(
CrFwPckt_t pckt,
unsigned short pid)
134 apid = (apid & 0xf80f) | ((pid<<4) & 0x07f0);
140 apid = (apid & 0xf80f) | ((pid<<4) & 0x07f0);
154 if (pcktLength < 1) {
555 CrFwPcktSetPid(pckt, dest);
579 CrFwPcktSetPid(pckt, src);
647 return (
CrFwPckt_t) &pckt[
sizeof(TmHeader_t)];
651 return (
CrFwPckt_t) &pckt[
sizeof(TcHeader_t)];
669 CrFwPcktSetPcat(pckt, group+1);
674 return CrFwPcktGetPcat(pckt)-1;
static void setTcHeaderAckTermFlag(void *p, One_Bit_t AckTermFlag)
Set "AckTermFlag" in "TcHeader" packet.
CrFwBool_t CrFwPcktIsAvail(CrFwPcktLength_t pcktLength)
Check whether a packet of a specified length is available.
static CrPsEid_t getEvtRep2EventId(void *p)
Get "EventId" from "EvtRep2" packet.
static CrPsEid_t getEvtRep1EventId(void *p)
Get "EventId" from "EvtRep1" 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.
CrFwCounterU4_t i
CrPsCmd5EidStart function definitions.
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.
static void setHkRepStructRepRepStrucId(void *p, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkRepStructRep" packet.
CrFwPckt_t * pckt
The list of packets in the PQ.
static CrFwServSubType_t servSubType
Service sub-type.
static CrPsFailCode_t getVerFailedRoutingRepFailureCode(void *p)
Get "FailureCode" from "VerFailedRoutingRep" 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.
static One_Bit_t getTcHeaderAckStartFlag(void *p)
Get "AckStartFlag" from "TcHeader" 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).
Header file to define all user-configurable constants and types for the IASW Application.
unsigned char CrFwGroup_t
Type used for the destination or source group of a packet.
CrFwCmdRepType_t CrFwPcktGetCmdRepType(CrFwPckt_t pckt)
Return the type of a packet (either a command packet or a report packet).
static CrPsSid_t getHkRepStructRepRepStrucId(void *p)
Get "RepStrucId" from "HkRepStructRep" packet.
static void setTmHeaderServSubType(void *p, uint8_t ServSubType)
Set "ServSubType" in "TmHeader" packet.
CrFwBool_t CrFwPcktIsTermAck(CrFwPckt_t pckt)
Return the acknowledge level for command termination for the command encapsulated in the packet...
static CrPsFailCode_t getVerFailedTermRepFailureCode(void *p)
Get "FailureCode" from "VerFailedTermRep" packet.
static void setEvtRep1EventId(void *p, CrPsEid_t EventId)
Set "EventId" in "EvtRep1" packet.
static void setEvtRep4EventId(void *p, CrPsEid_t EventId)
Set "EventId" in "EvtRep4" packet.
void CrFwPcktSetSrc(CrFwPckt_t pckt, CrFwDestSrc_t src)
Set the source of the command or report encapsulated in a packet.
static void setTmHeaderTime(void *p, const void *src)
Set "Time" array in "TmHeader" packet.
static void setHkCreateCmdRepStrucId(void *p, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkCreateCmd" packet.
#define CR_FW_MAX_NOF_PCKTS
The maximum number of packets which can be created with the default packet implementation.
static CrPsFailCode_t getVerFailedStartRepFailureCode(void *p)
Get "FailureCode" from "VerFailedStartRep" packet.
unsigned short CrFwInstanceId_t
Type used for instance identifiers.
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 FourTeen_Bit_t getTmHeaderSeqCount(void *p)
Get "SeqCount" from "TmHeader" packet.
static void getTmHeaderTime(void *p, void *dest)
Get "Time" array from "TmHeader" packet.
uint16_t CrPsApid_t
Type used for the Application ID of a packet.
int CrFwBool_t
Type used for boolean values (1 represent "true" and 0 represents "false").
static void setTmHeaderAPID(void *p, Eleven_Bit_t APID)
Set "APID" in "TmHeader" packet.
static void setEvtRep3EventId(void *p, CrPsEid_t EventId)
Set "EventId" in "EvtRep3" packet.
unsigned char CrFwServType_t
Type used for the service type of a command or report.
static void setTcHeaderAckProgFlag(void *p, One_Bit_t AckProgFlag)
Set "AckProgFlag" in "TcHeader" packet.
static One_Bit_t getTcHeaderAckTermFlag(void *p)
Get "AckTermFlag" from "TcHeader" packet.
static void setVerFailedRoutingRepFailureCode(void *p, CrPsFailCode_t FailureCode)
Set "FailureCode" in "VerFailedRoutingRep" 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.
Interface for accessing fields in packets of service "ServTest".
void CrFwPcktSetSeqCnt(CrFwPckt_t pckt, CrFwSeqCnt_t seqCnt)
Set the sequence counter of the command or report encapsulated in a packet.
static void setTmHeaderDestId(void *p, uint8_t DestId)
Set "DestId" in "TmHeader" packet.
static CrPsSid_t getHkRepRepStrucId(void *p)
Get "RepStrucId" from "HkRep" packet.
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.
static void setEvtRep2EventId(void *p, CrPsEid_t EventId)
Set "EventId" in "EvtRep2" packet.
Interface for accessing fields in packets of service "ServReqVerif".
static void setVerFailedStartRepFailureCode(void *p, CrPsFailCode_t FailureCode)
Set "FailureCode" in "VerFailedStartRep" packet.
void CrFwPcktSetGroup(CrFwPckt_t pckt, CrFwGroup_t group)
Set the group of the command/report encapsulated in a packet.
unsigned short int CrFwPcktLength_t
Type for the packet length.
static CrPsEid_t getEvtRep4EventId(void *p)
Get "EventId" from "EvtRep4" packet.
static void setTcHeaderSrcId(void *p, uint8_t SrcId)
Set "SrcId" in "TcHeader" packet.
CrFwBool_t CrFwPcktIsProgressAck(CrFwPckt_t pckt)
Return the acknowledge level for command progress for the command encapsulated in the packet...
static Eleven_Bit_t getTmHeaderAPID(void *p)
Get "APID" from "TmHeader" packet.
static uint8_t getTcHeaderSrcId(void *p)
Get "SrcId" from "TcHeader" packet.
static void setVerFailedPrgrRepFailureCode(void *p, CrPsFailCode_t FailureCode)
Set "FailureCode" in "VerFailedPrgrRep" 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.
static Eleven_Bit_t getTcHeaderAPID(void *p)
Get "APID" from "TcHeader" packet.
Definition of the utility functions for the CORDET Framework.
static uint8_t getTmHeaderDestId(void *p)
Get "DestId" from "TmHeader" packet.
static uint8_t getTcHeaderServSubType(void *p)
Get "ServSubType" from "TcHeader" packet.
void CrFwPcktSetServSubType(CrFwPckt_t pckt, CrFwServSubType_t servSubType)
Set the service sub-type of the command or report encapsulated in a packet.
static char pcktArray[CR_FW_MAX_NOF_PCKTS *CR_FW_MAX_PCKT_LENGTH]
The array holding the packets.
static One_Bit_t getTcHeaderAckProgFlag(void *p)
Get "AckProgFlag" from "TcHeader" packet.
static void setTmHeaderServType(void *p, uint8_t ServType)
Set "ServType" in "TmHeader" packet.
static uint16_t getTcHeaderPcktDataLen(void *p)
Get "PcktDataLen" from "TcHeader" packet.
static void setTcHeaderAPID(void *p, Eleven_Bit_t APID)
Set "APID" in "TcHeader" packet.
unsigned short CrFwDiscriminant_t
Type used for the discriminant of a command or report.
static uint8_t getTcHeaderServType(void *p)
Get "ServType" from "TcHeader" packet.
static CrFwServType_t servType
Service type.
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.
static CrPsSid_t getHkCreateCmdRepStrucId(void *p)
Get "RepStrucId" from "HkCreateCmd" packet.
static CrFwDestSrc_t dest
Destination.
static FourTeen_Bit_t getTcHeaderSeqCount(void *p)
Get "SeqCount" from "TcHeader" 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.
Interface for accessing fields in packets of service "ServEvt".
static CrPsFailCode_t getVerFailedAccRepFailureCode(void *p)
Get "FailureCode" from "VerFailedAccRep" packet.
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 One_Bit_t getTcHeaderPcktType(void *p)
Get "PcktType" from "TcHeader" packet.
static uint8_t getTmHeaderServType(void *p)
Get "ServType" from "TmHeader" packet.
char * CrFwPckt_t
Type for packets (see CrFwPckt.h).
static void setTcHeaderAckAccFlag(void *p, One_Bit_t AckAccFlag)
Set "AckAccFlag" in "TcHeader" packet.
static void setVerFailedAccRepFailureCode(void *p, CrPsFailCode_t FailureCode)
Set "FailureCode" in "VerFailedAccRep" 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 void setTcHeaderServType(void *p, uint8_t ServType)
Set "ServType" in "TcHeader" packet.
static void setTcHeaderPcktType(void *p, One_Bit_t PcktType)
Set "PcktType" in "TcHeader" packet.
Interface for accessing fields in packets of service "ServHk".
static void setTmHeaderPcktType(void *p, One_Bit_t PcktType)
Set "PcktType" in "TmHeader" packet.
static void setVerFailedTermRepFailureCode(void *p, CrPsFailCode_t FailureCode)
Set "FailureCode" in "VerFailedTermRep" packet.
static void setTcHeaderServSubType(void *p, uint8_t ServSubType)
Set "ServSubType" in "TcHeader" packet.
A packet release request has encountered an error (see CrFwPcktRelease).
static void setTcHeaderAckStartFlag(void *p, One_Bit_t AckStartFlag)
Set "AckStartFlag" in "TcHeader" packet.
CrFwBool_t CrFwPcktIsStartAck(CrFwPckt_t pckt)
Return the acknowledge level for command start for the command encapsulated in the packet...
static CrPsEid_t getEvtRep3EventId(void *p)
Get "EventId" from "EvtRep3" packet.
unsigned short CrFwCounterU2_t
Type used for unsigned integers with a "medium" range.
static void setHkRepRepStrucId(void *p, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkRep" packet.
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 void setTmHeaderSeqCount(void *p, FourTeen_Bit_t SeqCount)
Set "SeqCount" in "TmHeader" packet.
static uint8_t getTmHeaderServSubType(void *p)
Get "ServSubType" from "TmHeader" packet.
static CrPsFailCode_t getVerFailedPrgrRepFailureCode(void *p)
Get "FailureCode" from "VerFailedPrgrRep" packet.
static uint16_t getTmHeaderPcktDataLen(void *p)
Get "PcktDataLen" from "TmHeader" packet.
static void setTcHeaderSeqCount(void *p, FourTeen_Bit_t SeqCount)
Set "SeqCount" in "TcHeader" packet.
static One_Bit_t getTcHeaderAckAccFlag(void *p)
Get "AckAccFlag" from "TcHeader" packet.
static void setTmHeaderPcktDataLen(void *p, uint16_t PcktDataLen)
Set "PcktDataLen" in "TmHeader" packet.
unsigned int CrFwTimeStamp_t
Type used for the time stamp of a command or report.