Struct lorawan::PhyPayload [] [src]

pub struct PhyPayload<'a>(_);

Represents the complete structure for handling lorawan mac layer payload.

Methods

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

[src]

Creates a PhyPayload from bytes.

Argument

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

Examples

let data = vec![0x00u8, 0x04u8, 0x03u8, 0x02u8, 0x01u8, 0x04u8, 0x03u8,
    0x02u8, 0x01u8, 0x05u8, 0x04u8, 0x03u8, 0x02u8, 0x05u8, 0x04u8,
    0x03u8, 0x02u8, 0x2du8, 0x10u8, 0x6au8, 0x99u8, 0x0eu8, 0x12];
let phy = lorawan::PhyPayload::new(&data[..]);

[src]

Gives the MHDR of the PhyPayload.

[src]

Gives the MIC of the PhyPayload.

[src]

Gives the MacPayload of the PhyPayload.

[src]

Verifies that the PhyPayload has correct MIC.

The PhyPayload needs to contain DataPayload.

[src]

Verifies that the PhyPayload has correct MIC.

The PhyPayload needs to contain JoinRequest.

[src]

Decrypts the DataPayload payload.

The PhyPayload needs to contain DataPayload.

Trait Implementations

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

[src]

Formats the value using the given formatter.

impl<'a> PartialEq for PhyPayload<'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 !=.