GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSD / dev > qsd_print / sun-gcc
#include <QSD/CCSDS_header.h>
#include <PBI/Endianness.h>
Classes | |
struct | _CCSDS_telemetrySecondary |
The secondary header for the CCSDS telemetry packets. More... | |
struct | _CCSDS_telemetry |
Standard CCSDS telemetry packet (with only a placeholder for the payload). More... | |
Typedefs | |
typedef enum _CCSDS_TELEMETRY_VERSION_K | CCSDS_TELEMETRY_VERSION_K |
Typedef for _CCSDS_TELEMETRY_VERSION_K. | |
typedef struct _CCSDS_telemetrySecondary | CCSDS_telemetrySecondary |
Typedef for struct _CCSDS_telemetrySecondary. | |
typedef struct _CCSDS_telemetry | CCSDS_telemetry |
Typedef for struct _CCSDS_telemetry. | |
Enumerations | |
enum | _CCSDS_TELEMETRY_VERSION_K { CCSDS_TELEMETRY_VERSION_K_EXPECTED = CCSDS_HEADER_VERSION_K_1 } |
Enumeration of the current version. More... | |
Functions | |
static __inline unsigned | CCSDS__telemetryVersionIsWrong (const CCSDS_telemetry *packet) |
Checks if the CCSDS header format version matches the expectation. | |
static __inline unsigned | CCSDS__telemetryApid (const CCSDS_telemetry *packet) |
Returns the application identifier. | |
static __inline unsigned | CCSDS__telemetrySecondaryFlag (const CCSDS_telemetry *packet) |
Returns the value of the secondary header present flag. | |
static __inline unsigned | CCSDS__telemetryType (const CCSDS_telemetry *packet) |
Returns the type of the packet. | |
static __inline unsigned | CCSDS__telemetryVersion (const CCSDS_telemetry *packet) |
Returns the CCSDS header format version. | |
static __inline unsigned | CCSDS__telemetrySequenceNumber (const CCSDS_telemetry *packet) |
Returns the packet sequence number. | |
static __inline unsigned | CCSDS__telemetrySequenceFlags (const CCSDS_telemetry *packet) |
Returns the packet sequence flagnumber. | |
static __inline unsigned | CCSDS__telemetryLength_m1 (const CCSDS_telemetry *packet) |
Returns the value of length_m1 field, in bytes. | |
static __inline unsigned | CCSDS__telemetryVerify (const CCSDS_telemetry *packet) |
Verifies that a telemetry packet is properly formated. | |
static __inline unsigned | CCSDS__telemetrySeconds (const CCSDS_telemetry *packet) |
Returns the seconds part of the time field in the secondary header of a telemetry packet. | |
static __inline unsigned | CCSDS__telemetryUseconds (const CCSDS_telemetry *packet) |
Returns the micros seconds part of the time field in the secondary header of a telemetry packet. | |
static __inline unsigned | CCSDS__telemetryBridge (const CCSDS_telemetry *packet) |
Returns the bridge word of in the telemetry payload. | |
static __inline unsigned | CCSDS__telemetryLength (const CCSDS_telemetry *packet) |
Returns the number of bytes in the telemetry payload. | |
static __inline const void * | CCSDS__telemetryPayload (const CCSDS_telemetry *packet) |
Returns a pointer to the telemetry payload. | |
static __inline void | CCSDS__telemetrySwapb (CCSDS_telemetry *packet) |
On little-endian machines, swaps the header to big-endian format. On big-endian machines, this is a NOOP. | |
static __inline void | CCSDS__telemetrySwap2b (CCSDS_telemetry *packet, const CCSDS_telemetry *src) |
On little-endian machines, swaps the header to big-endian format. On big-endian machines, this is a copy. | |
static __inline void | CCSDS__telemetrySsrSwapb (CCSDS_telemetry *packet) |
On little-endian machines, swaps the header to big-endian format. On big-endian machines, this is a NOOP. | |
static __inline void | CCSDS__telemetrySsrSwap2b (CCSDS_telemetry *packet, const CCSDS_telemetry *src) |
On little-endian machines, swaps the header + the first payload word (the number of pad bytes) to big-endian format. On big-endian machines, this is a copy. | |
static __inline unsigned | CCSDS__telemetrySsrPad (const CCSDS_telemetry *packet) |
Returns the number of pad bytes in the telemetry SSR payload. | |
static __inline unsigned | CCSDS__telemetrySsrLength (const CCSDS_telemetry *packet) |
Returns the number of bytes in the telemetry SSR payload. | |
static __inline unsigned | CCSDS__telemetrySsrActiveLength (const CCSDS_telemetry *packet) |
Returns the number of bytes in the telemetry SSR payload, not including the pad bytes. | |
static __inline const void * | CCSDS__telemetrySsrPayload (const CCSDS_telemetry *packet) |
Returns a pointer to the telemetry payload when the packet is from the SSR. |
CVS $Id: CCSDS_telemetry.h,v 1.6 2011/03/26 21:06:58 russell Exp $
i
Typedef for _CCSDS_TELEMETRY_VERSION_K.
static __inline unsigned CCSDS__telemetryApid | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the application identifier.
packet | The telemetry packet |
References _CCSDS_headerPid::bf, _CCSDS_telemetry::header, and _CCSDS_header::pid.
static __inline unsigned CCSDS__telemetryBridge | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the bridge word of in the telemetry payload.
packet | The telemetry packet. |
References _CCSDS_telemetry::payload.
static __inline unsigned CCSDS__telemetryLength | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the number of bytes in the telemetry payload.
packet | The telemetry packet |
References _CCSDS_telemetry::header, _CCSDS_header::length_m1, and _CCSDS_telemetry::secondary.
static __inline unsigned CCSDS__telemetryLength_m1 | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the value of length_m1 field, in bytes.
packet | The telemetry packet |
References _CCSDS_telemetry::header, and _CCSDS_header::length_m1.
static __inline const void * CCSDS__telemetryPayload | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns a pointer to the telemetry payload.
packet | The telemetry packet |
References _CCSDS_telemetry::payload.
static __inline unsigned CCSDS__telemetrySecondaryFlag | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the value of the secondary header present flag.
==0,if | a secondary header is not present | |
!=0,if | a secondary header is present |
packet | The telemetry packet |
References _CCSDS_headerPid::bf, _CCSDS_telemetry::header, and _CCSDS_header::pid.
static __inline unsigned CCSDS__telemetrySeconds | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the seconds part of the time field in the secondary header of a telemetry packet.
packet | The telemetry packet |
References _CCSDS_telemetry::secondary, _CCSDS_telemetrySecondary::secs_hi, and _CCSDS_telemetrySecondary::secs_lo.
static __inline unsigned CCSDS__telemetrySequenceFlags | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the packet sequence flagnumber.
0 | (00b) If the packet contains a continuation segment of user data | |
1 | (01b) If the packet contains the first segment of user data | |
2 | (10b) If the packet contains the last segment of user data | |
3 | (11b) If the packet contains unsegmented user data |
packet | The telemetry packet |
References _CCSDS_headerSeq::bf, _CCSDS_telemetry::header, and _CCSDS_header::seq.
static __inline unsigned CCSDS__telemetrySequenceNumber | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the packet sequence number.
packet | The telemetry packet |
References _CCSDS_headerSeq::bf, _CCSDS_telemetry::header, and _CCSDS_header::seq.
static __inline unsigned CCSDS__telemetrySsrActiveLength | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the number of bytes in the telemetry SSR payload, not including the pad bytes.
packet | The telemetry packet |
References _CCSDS_telemetry::header, _CCSDS_header::length_m1, _CCSDS_telemetry::payload, and _CCSDS_telemetry::secondary.
static __inline unsigned CCSDS__telemetrySsrLength | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the number of bytes in the telemetry SSR payload.
packet | The telemetry packet |
References _CCSDS_telemetry::header, _CCSDS_header::length_m1, and _CCSDS_telemetry::secondary.
static __inline unsigned CCSDS__telemetrySsrPad | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the number of pad bytes in the telemetry SSR payload.
packet | The telemetry packet. This must be a telemetry packet that was placed on the SSR. |
References _CCSDS_telemetry::payload.
static __inline const void * CCSDS__telemetrySsrPayload | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns a pointer to the telemetry payload when the packet is from the SSR.
packet | The telemetry packet |
References _CCSDS_telemetry::payload.
static __inline void CCSDS__telemetrySsrSwap2b | ( | CCSDS_telemetry * | dst_packet, | |
const CCSDS_telemetry * | src_packet | |||
) | [static] |
On little-endian machines, swaps the header + the first payload word (the number of pad bytes) to big-endian format. On big-endian machines, this is a copy.
dst_packet | The telemetry destination packet to swap | |
src_packet | The telemetry source packet |
References ccsds_bswp2_16().
static __inline void CCSDS__telemetrySsrSwapb | ( | CCSDS_telemetry * | packet | ) | [static] |
On little-endian machines, swaps the header to big-endian format. On big-endian machines, this is a NOOP.
packet | The telemetry packet to swap |
References ccsds_bswp1_16().
static __inline void CCSDS__telemetrySwap2b | ( | CCSDS_telemetry * | dst_packet, | |
const CCSDS_telemetry * | src_packet | |||
) | [static] |
On little-endian machines, swaps the header to big-endian format. On big-endian machines, this is a copy.
dst_packet | The telemetry destination packet to swap | |
src_packet | The telemetry source packet |
References ccsds_bswp2_16(), and _CCSDS_telemetry::payload.
static __inline void CCSDS__telemetrySwapb | ( | CCSDS_telemetry * | packet | ) | [static] |
On little-endian machines, swaps the header to big-endian format. On big-endian machines, this is a NOOP.
packet | The telemetry packet to swap |
References ccsds_bswp1_16(), and _CCSDS_telemetry::payload.
static __inline unsigned CCSDS__telemetryType | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the type of the packet.
==0,if | the packet is a telemetry packet | |
!=0,if | the packet is a command packet |
packet | The telemetry packet |
References _CCSDS_headerPid::bf, _CCSDS_telemetry::header, and _CCSDS_header::pid.
static __inline unsigned CCSDS__telemetryUseconds | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the micros seconds part of the time field in the secondary header of a telemetry packet.
packet | The telemetry packet |
References _CCSDS_telemetry::secondary, _CCSDS_telemetrySecondary::usecs_hi, and _CCSDS_telemetrySecondary::usecs_lo.
static __inline unsigned CCSDS__telemetryVerify | ( | const CCSDS_telemetry * | packet | ) | [static] |
Verifies that a telemetry packet is properly formated.
==0 | The telemetry packet is properly formatted | |
!=0 | A bit mask of items that are incorrectly formatted, see |
packet | The telemetry packet |
References _CCSDS_headerPid::bf, CCSDS_HEADER_TYPE_K_TELEMETRY, CCSDS_HEADER_VERSION_K_1, CCSDS_VERIFY_ERR_M_SECONDARY, CCSDS_VERIFY_ERR_M_TYPE, CCSDS_VERIFY_ERR_M_VERSION, _CCSDS_telemetry::header, and _CCSDS_header::pid.
static __inline unsigned CCSDS__telemetryVersion | ( | const CCSDS_telemetry * | packet | ) | [static] |
Returns the CCSDS header format version.
packet | The telemetry packet |
References _CCSDS_headerPid::bf, _CCSDS_telemetry::header, and _CCSDS_header::pid.
static __inline unsigned CCSDS__telemetryVersionIsWrong | ( | const CCSDS_telemetry * | packet | ) | [static] |
Checks if the CCSDS header format version matches the expectation.
==0 | if it does | |
!=0 | if it does not (actually the difference expected - actual |
packet | The telemetry packet |
References _CCSDS_headerPid::bf, CCSDS_TELEMETRY_VERSION_K_EXPECTED, _CCSDS_telemetry::header, and _CCSDS_header::pid.