Struct prust_core::sp::tc::TcPacketHeader[][src]

pub struct TcPacketHeader { /* fields omitted */ }

Header of the TcPackets, secondary header of a SpacePacket.

Implementations

impl TcPacketHeader[src]

implementation of TcPacketHeader. While creating the TcPacketHeader PUS standard are checked according to TC rules generally.

pub fn new(
    acknowledgement_flags: (bool, bool, bool, bool),
    service_type: u8,
    message_subtype: u8,
    source_id: u16
) -> Result<Self, Error>
[src]

Method to create a TcPacketHeader with specified parameters.

pub fn from_bytes(buffer: &[u8]) -> Result<Self, Error>[src]

Creates TcPacketHeader structure a byte array

Errors

Returns error when packet.len() != 5.

pub fn to_bytes(&self) -> [u8; 5][src]

Encodes the header to a fixed size byte array

Trait Implementations

impl Debug for TcPacketHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.