#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_lorawan_mac_at(
direction: PamojaLorawanDirection,
bytes: *const u8,
len: usize,
index: usize,
out_command: *mut PamojaLorawanMacCommand,
) -> PamojaStatusExpand description
Reads one of the commands packed into a field.
§Arguments
direction- which way the frame carrying them travels.bytes- the options field, or a payload sent on port zero.len- how many bytes that is.index- which command, counting from zero.out_command- where to put it.
§Returns
PamojaStatus::Ok with the command written, or
PamojaStatus::InvalidArgument when there is no command at that position, which
includes one cut short and one this build does not know.
§Safety
bytes must point to len readable bytes or be null when len is zero, and
out_command must be writable.