Trait spacepackets::CcsdsPacket
source · pub trait CcsdsPacket {
Show 14 methods
fn ccsds_version(&self) -> u8;
fn packet_id(&self) -> PacketId;
fn psc(&self) -> PacketSequenceCtrl;
fn data_len(&self) -> u16;
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§
fn ccsds_version(&self) -> u8
fn packet_id(&self) -> PacketId
fn psc(&self) -> PacketSequenceCtrl
Provided Methods§
sourcefn packet_id_raw(&self) -> u16
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.
sourcefn ptype(&self) -> PacketType
fn ptype(&self) -> PacketType
Retrieve Packet Type (TM: 0, TC: 1).
fn is_tm(&self) -> bool
fn is_tc(&self) -> bool
sourcefn sec_header_flag(&self) -> bool
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.