pub fn parse_uplink_mac_commands(
    data: &[u8]
) -> MacCommandIterator<'_, UplinkMacCommand<'_>> 
Expand description

Parses bytes to uplink mac commands if possible.

Could return error if some values are out of range or the payload does not end at mac command boundry.

Argument

  • bytes - the data from which the MAC commands are to be built.

Examples

let mut data = vec![0x02, 0x03, 0x00];
let mac_cmds: Vec<lorawan::maccommands::UplinkMacCommand> =
    lorawan::maccommands::parse_uplink_mac_commands(&data).collect();