Crate ccsds_primary_header[][src]

This crate provides an implementation of the CCSDS Primary Header defined in the CCSDS Space Packet Protocol standards document.

This packet header is used in space applications, including the International Space Station and many cubsat applications, among many other.

The PrimaryHeader struct is defined in such a way that it is laid out in memory as defined by the standard, including bitfields and big endian byte order. To support this layout the fields are accessed through getters/setters rather then through direct access.

Header fields that have enumerations are retrieved as enums.

Structs

ControlWord

The control word is the first word of the primary header. This word contains:

LengthWord

The length word of the CCSDS header. This is just a u16, but it is wrapped in a struct for consistency with the other fields.

PrimaryHeader

The PrimaryHeader struct represents a CCSDS Primary header. Its representation in memory matches the CCSDS standard.

SequenceWord

The sequence word is the second word of the primary header. It contains a sequence count and an enum that determines how to interpret the sequence count.

Enums

PacketType

The PacketType indicates whether the packet is a command (Command) or a telemetry (Data) packet.

SecondaryHeaderFlag

The secondary header flag indicates whether there is another header following the primary header (Present) or not (NotPresent).

SeqFlag

The sequence flag indicates the interpretation of the sequence count. Continuation- the sequence count indicates the block in a series of packets containing segmented data FirstSegement- the packet is the first in a series of segemented packets. LastSegement- the packet is the last in a series of segemented packets. Unsegmented- the sequence count is an incrementing counter used to distinguish packets.

Constants

CCSDS_MIN_DATA_LENGTH_BYTES

The minimum size of a CCSDS packet's data section.

CCSDS_MIN_LENGTH

The minimum packet length of a CCSDS packet. This is the primary header size plus 1 byte.

CCSDS_PRI_HEADER_SIZE_BYTES

The CCSDS primary header size in bytes.

CCSDS_VERSION

The CCSDS Version (always 0 currently).