Struct lorawan::DataPayload [] [src]

pub struct DataPayload<'a>(_, _);

DataPayload represents a data MacPayload.

Methods

impl<'a> DataPayload<'a>
[src]

[src]

Creates a DataPayload from data.

Argument

  • bytes - the data from which DataPayload is to be built.

  • uplink - whether the packet is uplink or downlink.

Examples

let data = vec![0x04u8, 0x03u8, 0x02u8, 0x01u8, 0x04u8, 0x03u8, 0x02u8,
    0x01u8, 0x05u8, 0x04u8, 0x03u8, 0x02u8, 0x05u8, 0x04u8, 0x03u8,
    0x02u8, 0x2du8, 0x10u8];
let data_payload = lorawan::DataPayload::new(&data[..], true);

[src]

Gives the FHDR of the DataPayload.

[src]

Gives the FPort of the DataPayload if there is one.

[src]

Gives the payload of the DataPayload if there is one.

Trait Implementations

impl<'a> Debug for DataPayload<'a>
[src]

[src]

Formats the value using the given formatter.

impl<'a> PartialEq for DataPayload<'a>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.