Replies: 1 comment
-
The data structures for telemetry are conventionally defined in the typedef struct
{
uint8 CmdAcceptedCounter; /**< \brief Count of valid commands received */
uint8 CmdRejectedCounter; /**< \brief Count of invalid commands received */
uint8 DestTblLoadCounter; /**< \brief Count of destination file table loads */
uint8 DestTblErrCounter; /**< \brief Count of failed attempts to get table data pointer */
uint8 FilterTblLoadCounter; /**< \brief Count of packet filter table loads */
uint8 FilterTblErrCounter; /**< \brief Count of failed attempts to get table data pointer */
uint8 AppEnableState; /**< \brief Application enable/disable state */
uint8 Spare8; /**< \brief Structure alignment padding */
uint16 FileWriteCounter; /**< \brief Count of good destination file writes */
uint16 FileWriteErrCounter; /**< \brief Count of bad destination file writes */
uint16 FileUpdateCounter; /**< \brief Count of good updates to secondary header */
uint16 FileUpdateErrCounter; /**< \brief Count of bad updates to secondary header */
uint32 DisabledPktCounter; /**< \brief Count of packets discarded (DS was disabled) */
uint32 IgnoredPktCounter; /**< \brief Count of packets discarded
*
* Incoming packets will be discarded when:
* - The File and/or Filter Table has failed to load
* - A packet (that is not a DS HK or command packet) has been received
* that is not listed in the Filter Table
*/
uint32 FilteredPktCounter; /**< \brief Count of packets discarded (failed filter test) */
uint32 PassedPktCounter; /**< \brief Count of packets that passed filter test */
char FilterTblFilename[OS_MAX_PATH_LEN]; /**< \brief Name of filter table file */
} DS_HkTlm_Payload_t;
/**
* \brief Application housekeeping packet
*/
typedef struct
{
CFE_MSG_TelemetryHeader_t TelemetryHeader; /**< \brief cFE Software Bus telemetry message header */
DS_HkTlm_Payload_t Payload;
} DS_HkPacket_t; From Then, in typedef struct
{
CCSDS_PrimaryHeader_t Pri; /**< \brief CCSDS Primary Header */
} CCSDS_SpacePacket_t;
/**
* \brief cFS generic base message
*
* This provides the definition of CFE_MSG_Message_t
*/
union CFE_MSG_Message
{
CCSDS_SpacePacket_t CCSDS; /**< \brief CCSDS Header (Pri or Pri + Ext) */
uint8 Byte[sizeof(CCSDS_SpacePacket_t)]; /**< \brief Byte level access */
};
struct CFE_MSG_TelemetryHeader
{
CFE_MSG_Message_t Msg; /**< \brief Base message */
CFE_MSG_TelemetrySecondaryHeader_t Sec; /**< \brief Secondary header */
uint8 Spare[4]; /**< \brief Pad to avoid compiler padding if payload
requires 64 bit alignment */
}; Note that in your old version of cFE, the payload was not aligned to a 64-bit boundary, so the 4 spare bits are not present in the telemetry. The definition for the packet structure underlying the CFE Primary header can be found at CCSDS Space Packet Protocol: https://public.ccsds.org/Pubs/133x0b2e1.pdf , figure 4.2 The corresponding struct definition is at typedef struct CCSDS_PrimaryHeader
{
uint8 StreamId[2]; /**< \brief packet identifier word (stream ID) */
/* bits shift ------------ description ---------------- */
/* 0x07FF 0 : application ID */
/* 0x0800 11 : secondary header: 0 = absent, 1 = present */
/* 0x1000 12 : packet type: 0 = TLM, 1 = CMD */
/* 0xE000 13 : CCSDS version: 0 = ver 1, 1 = ver 2 */
uint8 Sequence[2]; /**< \brief packet sequence word */
/* bits shift ------------ description ---------------- */
/* 0x3FFF 0 : sequence count */
/* 0xC000 14 : segmentation flags: 3 = complete packet */
uint8 Length[2]; /**< \brief packet length word */
/* bits shift ------------ description ---------------- */
/* 0xFFFF 0 : (total packet length) - 7 */
} CCSDS_PrimaryHeader_t; We can see the secondary header defined at: /**
* \brief cFS telemetry secondary header
*/
typedef struct
{
uint8 Time[6]; /**< \brief Time, big endian: 4 byte seconds, 2 byte subseconds */
} CFE_MSG_TelemetrySecondaryHeader_t;
Your second packet starts at the 0x09AB and has a timestamp one second later, but is cut off in the snippet you shared. For automated decoding, checkout the ground station tool packaged with cFS: |
Beta Was this translation helpful? Give feedback.
-
I have a binary dump of housekeeping telemetry data related to DS application. How can I decode the telemetry and learn how it is encoded/decoded?
All i know is the following:
DS application version 2.5.1
cFE version 6.5.0
Example of binary telemetry dump:
09ab c001 0045 2d03 a05d 94bc 0164 c8ff
96ef 0100 02e5 efff df07 ceff 0000 001f
efff ffff dfff ffff d000 02b8 433a 5c64
732e 7462 6c00 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 09ab c002
0045 2d03 a05e 94bc 0263 c9fe 97ee 0100
02ec effe df08 cefe 0000 0020 efff fffe
Beta Was this translation helpful? Give feedback.
All reactions