pub struct SpacePacketBytes<'a> { /* private fields */ }Expand description
A view of one CCSDS packet, with its primary header fields decoded.
Implementations§
Source§impl<'a> SpacePacketBytes<'a>
impl<'a> SpacePacketBytes<'a>
Sourcepub const fn new(bytes: &'a [u8]) -> Self
pub const fn new(bytes: &'a [u8]) -> Self
Wraps a byte slice that starts with a CCSDS primary header.
Sourcepub fn packet_type(self) -> u8
pub fn packet_type(self) -> u8
Packet type: 0 for telemetry, 1 for telecommand.
Sourcepub fn secondary_header_flag(self) -> bool
pub fn secondary_header_flag(self) -> bool
Secondary header flag.
Sourcepub fn sequence_flags(self) -> u8
pub fn sequence_flags(self) -> u8
Sequence flags, bits 16–17.
Sourcepub fn sequence_count(self) -> u16
pub fn sequence_count(self) -> u16
Packet sequence count, bits 18–31.
Sourcepub fn data_length(self) -> u16
pub fn data_length(self) -> u16
The length count C as it appears in the header.
Trait Implementations§
Source§impl<'a> Clone for SpacePacketBytes<'a>
impl<'a> Clone for SpacePacketBytes<'a>
impl<'a> Copy for SpacePacketBytes<'a>
Source§impl Debug for SpacePacketBytes<'_>
impl Debug for SpacePacketBytes<'_>
impl<'a> Eq for SpacePacketBytes<'a>
Source§impl<'a> PartialEq for SpacePacketBytes<'a>
impl<'a> PartialEq for SpacePacketBytes<'a>
impl<'a> StructuralPartialEq for SpacePacketBytes<'a>
Auto Trait Implementations§
impl<'a> Forget for SpacePacketBytes<'a>
impl<'a> Freeze for SpacePacketBytes<'a>
impl<'a> Move for SpacePacketBytes<'a>
impl<'a> RefUnwindSafe for SpacePacketBytes<'a>
impl<'a> Send for SpacePacketBytes<'a>
impl<'a> Sync for SpacePacketBytes<'a>
impl<'a> Unpin for SpacePacketBytes<'a>
impl<'a> UnsafeUnpin for SpacePacketBytes<'a>
impl<'a> UnwindSafe for SpacePacketBytes<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more