Skip to main content

pamoja_lorawan_mac_count

Function pamoja_lorawan_mac_count 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_lorawan_mac_count( direction: PamojaLorawanDirection, bytes: *const u8, len: usize, out_count: *mut usize, ) -> PamojaStatus
Expand description

Counts 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.
  • out_count - where to put the count.

§Returns

PamojaStatus::Ok, with the count written. Counting stops at an identifier this build does not know, because nothing says how long it is, so the count is what was readable.

§Safety

bytes must point to len readable bytes or be null when len is zero, and out_count must be writable.