[][src]Trait lorawan::parser::DataHeader

pub trait DataHeader {
    fn as_data_bytes(&self) -> &[u8];

    fn fhdr(&self) -> FHDR { ... }
fn is_uplink(&self) -> bool { ... }
fn f_port(&self) -> Option<u8> { ... }
fn fhdr_length(&self) -> usize { ... } }

Helper trait for EncryptedDataPayload and DecryptedDataPayload.

NOTE: Does not check the payload size as that should be done prior to building the object of the implementing type.

Required methods

fn as_data_bytes(&self) -> &[u8]

Equivalent to AsRef<u8>.

Loading content...

Provided methods

fn fhdr(&self) -> FHDR

Gives the FHDR of the DataPayload.

Gives whether the payload is uplink or not.

fn f_port(&self) -> Option<u8>

Gives the FPort of the DataPayload if there is one.

fn fhdr_length(&self) -> usize

Gives the length of the FHDR field.

Loading content...

Implementors

impl<T: AsRef<[u8]>, F> DataHeader for DataPayload<T, F>[src]

impl<T: AsRef<[u8]>, F> DataHeader for EncryptedDataPayload<T, F>[src]

impl<T: AsRef<[u8]>> DataHeader for DecryptedDataPayload<T>[src]

Loading content...