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

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

    pub fn fhdr(&self) -> FHDR<'_> { ... }
pub fn is_uplink(&self) -> bool { ... }
pub fn f_port(&self) -> Option<u8> { ... }
pub 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

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

Equivalent to AsRef<u8>.

Loading content...

Provided methods

pub fn fhdr(&self) -> FHDR<'_>[src]

Gives the FHDR of the DataPayload.

Gives whether the payload is uplink or not.

pub fn f_port(&self) -> Option<u8>[src]

Gives the FPort of the DataPayload if there is one.

pub fn fhdr_length(&self) -> usize[src]

Gives the length of the FHDR field.

Loading content...

Implementors

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

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

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

Loading content...