GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSD / V0-5-0 > qsdccsds / rhel5-64
#include <QSD/CCSDS_sequenceFlags.h>
#include <PBI/Endianness.h>
#include <netinet/in.h>
Classes | |
struct | _CCSDS_headerPid_bf |
The primary header's packet identifier word as bit fields. More... | |
union | _CCSDS_headerPid |
Union of the primary header's packet identifier word representation as a bit field and a uninterpretted 16-bit integer. More... | |
struct | _CCSDS_headerSeq_bf |
The CCSDS primary header sequence control word as bit fields. More... | |
union | _CCSDS_headerSeq |
Union of the primary header's sequence control word representation as a bit field and a uninterpretted 16-bit integer. More... | |
struct | _CCSDS_header |
Standard 6-byte CCSDS header. More... | |
Typedefs | |
typedef enum _CCSDS_HEADER_VERSION_K | CCSDS_HEADER_VERSION_K |
Typedef for _CCSDS_HEADER_VERSION_K. | |
typedef enum _CCSDS_HEADER_TYPE_K | CCSDS_HEADER_TYPE_K |
Typedef for _CCSDS_HEADER_TYPE_K. | |
typedef struct _CCSDS_headerPid_bf | CCSDS_headerPid_bf |
Typedef for struct _CCSDS_headerPid_bf. | |
typedef union _CCSDS_headerPid | CCSDS_headerPid |
Typedef for union _CCSDS_headerPid. | |
typedef struct _CCSDS_headerSeq_bf | CCSDS_headerSeq_bf |
Typedef for struct _CCSDS_headerSeq_bf. | |
typedef union _CCSDS_headerSeq | CCSDS_headerSeq |
Typedef for union _CCSDS_headerSeq. | |
typedef struct _CCSDS_header | CCSDS_header |
typedef enum _CCSDS_VERIFY_ERR_V | CCSDS_VERIFY_ERR_V |
Typedef for _CCSDS_VERIFY_ERR_V. | |
typedef enum _CCSDS_VERIFY_ERR_M | CCSDS_VERIFY_ERR_M |
Typedef for _CCSDS_VERIFY_ERR_M. | |
Enumerations | |
enum | _CCSDS_HEADER_VERSION_K { CCSDS_HEADER_VERSION_K_1 = 0x0 } |
Enumeration of the current version. More... | |
enum | _CCSDS_HEADER_TYPE_K { CCSDS_HEADER_TYPE_K_TELEMETRY = 0, CCSDS_HEADER_TYPE_K_COMMAND = 1 } |
Enumeration of the packet types (telemetry and command). More... | |
enum | _CCSDS_VERIFY_ERR_V { CCSDS_VERIFY_ERR_V_VERSION = 0, CCSDS_VERIFY_ERR_V_TYPE = 1, CCSDS_VERIFY_ERR_V_SECONDARY = 2, CCSDS_VERIFY_ERR_V_FUNCTION = 3 } |
Enumeration of the verification error bits as right justified bit offsets. More... | |
enum | _CCSDS_VERIFY_ERR_M { CCSDS_VERIFY_ERR_M_VERSION = (1 << CCSDS_VERIFY_ERR_V_VERSION), CCSDS_VERIFY_ERR_M_TYPE = (1 << CCSDS_VERIFY_ERR_V_TYPE), CCSDS_VERIFY_ERR_M_SECONDARY = (1 << CCSDS_VERIFY_ERR_V_SECONDARY), CCSDS_VERIFY_ERR_M_FUNCTION = (1 << CCSDS_VERIFY_ERR_V_FUNCTION) } |
Enumeration of the verification error bits as in place masks. More... | |
Functions | |
static __inline unsigned | CCSDS__headerVersionIsWrong (const CCSDS_header *header) |
Checks if the CCSDS header format version matches the expectation. | |
static __inline unsigned | CCSDS__headerApid (const CCSDS_header *header) |
Returns the application identifier. | |
static __inline unsigned | CCSDS__headerSecondaryFlag (const CCSDS_header *header) |
Returns the value of the secondary header present flag. | |
static __inline unsigned | CCSDS__headerType (const CCSDS_header *header) |
Returns the type of the packet. | |
static __inline unsigned | CCSDS__headerVersion (const CCSDS_header *header) |
Returns the CCSDS header format version. | |
static __inline unsigned | CCSDS__headerSequenceNumber (const CCSDS_header *header) |
Returns the packet sequence number. | |
static __inline unsigned | CCSDS__headerSequenceFlags (const CCSDS_header *header) |
Returns the packet sequence flagnumber. | |
static __inline unsigned | CCSDS__headerLength_m1 (const CCSDS_header *header) |
Returns the value of length_m1 field, in bytes. | |
static __inline void | ccsds_bswp1_16 (void *buf, int nshorts) |
On little-endian machines, swaps the buffer to big-endian format. | |
static __inline void | ccsds_bswp2_16 (void *dst, const void *src, int nshorts) |
On little-endian machines, swaps the buffer to big-endian format. On big-endian machines, this is a copy. |
CVS $Id: CCSDS_header.h,v 1.5 2011/03/26 21:06:58 russell Exp $
Typedef for _CCSDS_HEADER_VERSION_K.
Typedef for _CCSDS_VERIFY_ERR_M.
Typedef for _CCSDS_VERIFY_ERR_V.
enum _CCSDS_HEADER_TYPE_K |
enum _CCSDS_VERIFY_ERR_M |
Enumeration of the verification error bits as in place masks.
enum _CCSDS_VERIFY_ERR_V |
Enumeration of the verification error bits as right justified bit offsets.
static __inline unsigned CCSDS__headerApid | ( | const CCSDS_header * | header | ) | [static] |
Returns the application identifier.
header | The packet header |
References _CCSDS_headerPid::bf, and _CCSDS_header::pid.
Referenced by CCSDS_apidDscFind().
static __inline unsigned CCSDS__headerLength_m1 | ( | const CCSDS_header * | header | ) | [static] |
Returns the value of length_m1 field, in bytes.
header | The packet header |
References _CCSDS_header::length_m1.
static __inline unsigned CCSDS__headerSecondaryFlag | ( | const CCSDS_header * | header | ) | [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 |
header | The packet header |
References _CCSDS_headerPid::bf, and _CCSDS_header::pid.
static __inline unsigned CCSDS__headerSequenceFlags | ( | const CCSDS_header * | header | ) | [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 |
header | The packet header |
References _CCSDS_headerSeq::bf, and _CCSDS_header::seq.
static __inline unsigned CCSDS__headerSequenceNumber | ( | const CCSDS_header * | header | ) | [static] |
Returns the packet sequence number.
header | The packet header |
References _CCSDS_headerSeq::bf, and _CCSDS_header::seq.
static __inline unsigned CCSDS__headerType | ( | const CCSDS_header * | header | ) | [static] |
Returns the type of the packet.
==0,if | the packet is a telemetry packet | |
!=0,if | the packet is a command packet |
header | The packet header |
References _CCSDS_headerPid::bf, and _CCSDS_header::pid.
static __inline unsigned CCSDS__headerVersion | ( | const CCSDS_header * | header | ) | [static] |
Returns the CCSDS header format version.
header | The packet header |
References _CCSDS_headerPid::bf, and _CCSDS_header::pid.
static __inline unsigned CCSDS__headerVersionIsWrong | ( | const CCSDS_header * | header | ) | [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 |
header | The packet header |
References _CCSDS_headerPid::bf, CCSDS_HEADER_VERSION_K_1, and _CCSDS_header::pid.
static __inline void ccsds_bswp1_16 | ( | void * | buf, | |
int | nshorts | |||
) | [static] |
On little-endian machines, swaps the buffer to big-endian format.
On big-endian machines, this is a NOOP
buf | The buffer to swap | |
nshorts | The number of 16-bit words to swap |
Referenced by CCSDS__telemetrySsrSwapb(), and CCSDS__telemetrySwapb().
static __inline const ccsds_bswp2_16 | ( | void * | dst, | |
const void * | src, | |||
int | nshorts | |||
) | [static] |
On little-endian machines, swaps the buffer to big-endian format. On big-endian machines, this is a copy.
dst | The destination buffer | |
src | The source buffer | |
nshorts | The number of 16-bit words to swap |
Referenced by CCSDS__telemetrySsrSwap2b(), and CCSDS__telemetrySwap2b().