23 #include "CrFwUserConstants.h" 42 CrFwCounterU4_t N1,
i;
95 memcpy(&ret, &((uint8_t*)p)[pos],
sizeof(CrFwCounterU4_t));
96 return __builtin_bswap32(ret);
109 NFA = __builtin_bswap32(NFA);
110 memcpy(&((uint8_t*)p)[pos], &NFA,
sizeof(NFA));
130 return __builtin_bswap16(ret);
148 N1ParamId = __builtin_bswap16(N1ParamId);
149 memcpy(&((uint8_t*)p)[pos], &N1ParamId,
sizeof(N1ParamId));
163 return __builtin_bswap32(ret);
174 N2 = __builtin_bswap32(N2);
189 return __builtin_bswap32(ret);
200 SCSampleRepNum = __builtin_bswap32(SCSampleRepNum);
216 return __builtin_bswap16(ret);
229 N2ParamId = __builtin_bswap16(N2ParamId);
243 CrFwCounterU4_t
i, N1;
252 pos = pos +
sizeof(CrFwCounterU4_t) + n2val*
sizeof(
CrPsParamId_t);
297 memcpy(&ret, &((uint8_t*)p)[pos],
sizeof(CrFwCounterU4_t));
298 return __builtin_bswap32(ret);
311 src = __builtin_bswap32(src);
312 memcpy(&((uint8_t*)p)[pos], &src,
sizeof(CrFwCounterU4_t));
332 return __builtin_bswap16(ret);
350 src = __builtin_bswap16(src);
365 return __builtin_bswap32(ret);
377 N2 = __builtin_bswap32(N2);
392 return __builtin_bswap32(ret);
403 src = __builtin_bswap32(src);
419 return __builtin_bswap16(ret);
431 src = __builtin_bswap16(src);
445 memcpy(&dest, &((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N],
sizeof(
CrPsSid_t));
457 memcpy(&((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N], &RepStrucId,
sizeof(
CrPsSid_t));
470 memcpy(&dest, &((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N],
sizeof(
CrPsSid_t));
482 memcpy(&((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N], &RepStrucId,
sizeof(CrFwCounterU4_t));
495 memcpy(&dest, &((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N],
sizeof(
CrPsSid_t));
507 memcpy(&((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N], &RepStrucId,
sizeof(CrFwCounterU4_t));
520 memcpy(&dest, &((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N],
sizeof(
CrPsSid_t));
532 memcpy(&((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N], &RepStrucId,
sizeof(CrFwCounterU4_t));
545 memcpy(&dest, &((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N],
sizeof(
CrPsSid_t));
557 memcpy(&((uint8_t*)p)[
sizeof(TcHeader_t)-1+
sizeof(CrFwCounterU4_t)+
sizeof(
CrPsSid_t)*N], &RepStrucId,
sizeof(CrFwCounterU4_t));
569 CrFwCounterU4_t N1, N2, NFA,
i;
588 s+=
sizeof(
unsigned int) +
sizeof(
unsigned int);
601 CrFwCounterU4_t N1, N2, NFA,
i, k;
615 s=
sizeof(TmHeader_t) +
sizeof(
CrPsSid_t) + 2;
637 for (k=0; k<NFA; k++)
645 for (i=0; i<SCSampleRepNum; i++)
649 N2ParamId =
getDplstIdItem(rdlSlot*HK_MAX_N_ITEMS + N1 + offset + j);
670 size_t s, N2ParamIdSize;
671 CrFwCounterU4_t N1, NFA, N2, j, k;
675 s=
sizeof(TmHeader_t) +
sizeof(
CrPsSid_t) + 2;
691 s+=SCSampleRepNum*N2ParamIdSize;
707 CrFwCounterU4_t j, k, N, N1, NFA, N2;
723 s+=
sizeof(CrFwCounterU4_t);
737 s=
sizeof(TcHeader_t) +
sizeof(CrFwCounterU4_t);
746 s=
sizeof(TcHeader_t) +
sizeof(CrFwCounterU4_t);
756 s=
sizeof(TcHeader_t) +
sizeof(CrFwCounterU4_t);
764 s=
sizeof(TcHeader_t) +
sizeof(CrFwCounterU4_t);
779 s+=
sizeof(CrFwCounterU4_t);
793 s=
sizeof(TmHeader_t) +
sizeof(
CrPsSid_t);
819 s=
sizeof(TcHeader_t) +
sizeof(CrFwCounterU4_t);
CrFwCounterU4_t getHkRepStructRepN2(void *p, CrFwCounterU4_t NFA)
Get "N2" from "HkRepStructRep" packet.
void setHkRepStructRepNFA(void *p, CrFwCounterU4_t src)
Set "NFA" in "HkRepStructRep" packet.
uint32_t CrPsRepNum_t
Type used for the Repetition Number of a packet.
void setHkEnableCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkEnableCmd" packet.
void setHkRepStructRepSCSampleRepNumItem(void *p, CrFwCounterU4_t NFA, CrPsRepNum_t src)
Set "SCSampleRepNum" in "HkRepStructRep" packet.
CrFwCounterU4_t i
CrPsCmd5EidStart function definitions.
CrPsParamId_t getHkRepStructRepN1ParamIdItem(void *p, CrFwCounterU4_t N)
Get "N1ParamId" arrayItem from "HkRepStructRep" packet.
CrFwDiscriminant_t CrFwPcktGetDiscriminant(CrFwPckt_t pckt)
Return the discriminant of the command or report encapsulated in a packet.
void setHkRepStructCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkRepStructCmd" packet.
CrPsSid_t getHkOneShotCmdRepStrucIdItem(void *p, CrFwCounterU4_t N)
Get "RepStrucId" from "HkOneShotCmd" packet.
unsigned char CrFwServSubType_t
Type used for the command or report sub-type.
Header file to define all user-configurable constants and types for the IASW Application.
uint16_t CrPsParamId_t
Type used for the Parameter ID of a packet.
void setHkDeleteCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkDeleteCmd" packet.
uint32_t getPcktInt(void *p, uint32_t pos)
Generic Getter for Int Values from a Packet.
Interface for accessing data pool items.
CrPsSid_t getHkDeleteCmdRepStrucIdItem(void *p, CrFwCounterU4_t N)
Get "RepStrucId" from "HkDeleteCmd" packet.
static CrFwCounterU4_t getHkEnableCmdN(void *p)
Get "N" from "HkEnableCmd" packet.
void setHkDisableCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkDisableCmd" packet.
void setHkRepStructRepN2ParamIdItem(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2, CrPsParamId_t src)
Set "N2ParamID" in "HkRepStructRep" packet.
size_t getDpSize(ParameterId_t id)
Get the size of a datapool item by identifier.
Interface for creating and accessing a report or command packet.
CrPsRepNum_t getHkRepStructRepSCSampleRepNumItem(void *p, CrFwCounterU4_t NFA)
Get "SCSampleRepNum" from "HkRepStructRep" packet.
void setHkOneShotCmdRepStrucIdItem(void *p, CrFwCounterU4_t N, CrPsSid_t RepStrucId)
Set "RepStrucId" in "HkOneShotCmd" packet.
void setHkCreateCmdN1ParamIdItem(void *p, CrFwCounterU4_t N, CrPsParamId_t N1ParamId)
Set "N1ParamId" arrayItem in "HkCreateCmd" packet.
uint32_t getHkRepStructRepOffsetSCS(void *p, CrFwCounterU4_t NFA)
Get the offset of the "SCSampleRepNum" field in a HkRepStruct packet.
CrPsRepNum_t getHkCreateCmdOffsetSCS(void *p, CrFwCounterU4_t NFA)
Get the offset of the "SCSampleRepNum" field in a HkCreate packet.
size_t getHkRepSizeFromPckt(void *p)
Get the size of a HkRep Housekeeping packet.
void setHkCreateCmdN2ParamIdItem(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2, CrPsParamId_t N2ParamId)
Set "N2ParamID" in "HkCreateCmd" packet.
CrPsSid_t getHkDisableCmdRepStrucIdItem(void *p, CrFwCounterU4_t N)
Get "RepStrucId" from "HkDisableCmd" packet.
static CrFwCounterU4_t getHkDeleteCmdN(void *p)
Get "N" from "HkDeleteCmd" packet.
uint32_t getHkCreateCmdOffsetN2(void *p, CrFwCounterU4_t NFA)
Get the offset of the "N2" field in a HkCreate packet.
static CrPsSid_t getDpsidItem(int i)
Gets the value of the i-th element in the datapool array sid.
CrFwCounterU4_t getHkRepStructRepNFA(void *p)
Get "NFA" from "HkCreateDiagParCmd" packet.
auxiliary Interface for accessing fields in packets of service "ServHk".
uint32_t CrPsCollectInterval_t
Type used for the Collection Interval of a packet.
static CrFwCounterU4_t getHkRepStructRepN1(void *p)
Get "N1" from "HkRepStructRep" packet.
CrFwCounterU4_t getHkCreateCmdN2(void *p, CrFwCounterU4_t NFA)
Get "N2" from "HkCreateCmd" packet.
CrPsSid_t getHkRepStructCmdRepStrucIdItem(void *p, CrFwCounterU4_t N)
Get "RepStrucId" from "HkRepStructCmd" packet.
static CrFwCounterU4_t getNFA(int i)
Gets the number of super-commutated groups (NFA) from number of sample repetition numbers (rep[]) ...
generic Interface for accessing fields in packets.
CrPsSid_t getHkEnableCmdRepStrucIdItem(void *p, CrFwCounterU4_t N)
Get "RepStrucId" from "HkEnableCmd" packet.
void setHkRepStructRepN1ParamIdItem(void *p, CrFwCounterU4_t N, CrPsParamId_t src)
Set "N1ParamId" arrayItem in "HkRepStructRep" packet.
size_t getHkRepStructSize(CrPsSid_t sid)
Get "RepStrucSize by SID".
CrPsParamId_t getHkRepStructRepN2ParamIdItem(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2)
Get "N2ParamID" from "HkRepStructRep" packet.
static CrFwCounterU4_t getHkRepStructCmdN(void *p)
Get "N" from "HkRepStructCmd" packet.
void setHkCreateCmdN2(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2)
Set "N2" in "HkCreateCmd" packet.
static CrPsNumberU2_t getDplstNSampRepItem(int i)
Gets the value of the i-th element in the datapool array lstNSampRep.
CrFwServSubType_t CrFwPcktGetServSubType(CrFwPckt_t pckt)
Return the service sub-type of the command or report encapsulated in a packet.
static CrFwDestSrc_t dest
Destination.
size_t getHkPcktSize(void *p)
Get the size of a Housekeeping packet.
CrPsRepNum_t getHkCreateCmdSCSampleRepNumItem(void *p, CrFwCounterU4_t NFA)
Get "SCSampleRepNum" from "HkCreateCmd" packet.
#define HK_N_REP_DEF
Number of Report Definitions in the Report Definition List (maximum number of housekeeping/diagnostic...
CrPsParamId_t getHkCreateCmdN2ParamIdItem(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2)
Get "N2ParamID" from "HkCreateCmd" packet.
uint8_t CrPsSid_t
Type used for the Parameter Report Structure ID of a packet.
uint32_t getHkCreateCmdOffsetN2ParamId(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2)
Get the offset of the "N2ParamId" field in a HkCreate packet.
static CrFwCounterU4_t getHkDisableCmdN(void *p)
Get "N" from "HkDisableCmd" packet.
#define HK_MAX_N_GR
Maximum number of super-commutated groups in a house- keeping/diagnostic report.
static uint16_t getDplstSampleRepItem(int i)
Gets the value of the i-th element in the datapool array lstSampleRep.
void setHkRepStructRepN2(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2)
Set "N2" in "HkRepStructRep" packet.
Interface for accessing fields in packets of service "ServHk".
uint32_t getHkRepStructRepOffsetN2ParamId(void *p, CrFwCounterU4_t NFA, CrFwCounterU4_t N2)
Get the offset of the "N2ParamId" field in a HkCreate packet.
uint8_t CrPsStatus_t
Type used for the Status of a packet.
void setHkCreateCmdNFA(void *p, CrFwCounterU4_t NFA)
Set "NFA" in "HkCreateCmd" packet.
static CrPsParamId_t getDplstIdItem(int i)
Gets the value of the i-th element in the datapool array lstId.
CrFwCounterU4_t getHkCreateCmdNFA(void *p)
Get "NFA" from "HkCreateCmd" packet.
CrPsParamId_t getHkCreateCmdN1ParamIdItem(void *p, CrFwCounterU4_t N)
Get "N1ParamId" arrayItem from "HkCreateCmd" packet.
Interface for accessing data pool items.
unsigned char CrFwCounterU1_t
Type used for unsigned integers with a "short" range.
static CrFwCounterU4_t getHkCreateCmdN1(void *p)
Get "N1" from "HkCreateCmd" packet.
void setHkCreateCmdSCSampleRepNumItem(void *p, CrFwCounterU4_t NFA, CrPsRepNum_t SCSampleRepNum)
Set "SCSampleRepNum" in "HkCreateCmd" packet.
static CrPsNumberU2_t getDpnSimpleItem(int i)
Gets the value of the i-th element in the datapool array nSimple.
uint32_t getHkRepStructRepOffsetN2(void *p, CrFwCounterU4_t NFA)
Get the offset of the "N2" field in a HkRepStruct packet.