Trait CcsdsPacket

Source
pub trait CcsdsPacket {
Show 14 methods // Required methods fn ccsds_version(&self) -> u8; fn packet_id(&self) -> PacketId; fn psc(&self) -> PacketSequenceCtrl; fn data_len(&self) -> u16; // Provided methods fn total_len(&self) -> usize { ... } fn packet_id_raw(&self) -> u16 { ... } fn psc_raw(&self) -> u16 { ... } fn ptype(&self) -> PacketType { ... } fn is_tm(&self) -> bool { ... } fn is_tc(&self) -> bool { ... } fn sec_header_flag(&self) -> bool { ... } fn apid(&self) -> u16 { ... } fn seq_count(&self) -> u16 { ... } fn sequence_flags(&self) -> SequenceFlags { ... }
}
Expand description

Generic trait to access fields of a CCSDS space packet header according to CCSDS 133.0-B-2.

Required Methods§

Source

fn ccsds_version(&self) -> u8

Source

fn packet_id(&self) -> PacketId

Source

fn psc(&self) -> PacketSequenceCtrl

Source

fn data_len(&self) -> u16

Retrieve data length field

Provided Methods§

Source

fn total_len(&self) -> usize

Retrieve the total packet size based on the data length field

Source

fn packet_id_raw(&self) -> u16

Retrieve 13 bit Packet Identification field. Can usually be retrieved with a bitwise AND of the first 2 bytes with 0x1FFF.

Source

fn psc_raw(&self) -> u16

Retrieve Packet Sequence Count

Source

fn ptype(&self) -> PacketType

Retrieve Packet Type (TM: 0, TC: 1).

Source

fn is_tm(&self) -> bool

Source

fn is_tc(&self) -> bool

Source

fn sec_header_flag(&self) -> bool

Retrieve the secondary header flag. Returns true if a secondary header is present and false if it is not.

Source

fn apid(&self) -> u16

Retrieve Application Process ID.

Source

fn seq_count(&self) -> u16

Source

fn sequence_flags(&self) -> SequenceFlags

Implementors§