Skip to main content

pamoja_lorawan_mac_encode

Function pamoja_lorawan_mac_encode 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_lorawan_mac_encode( command: *const PamojaLorawanMacCommand, out: *mut u8, capacity: usize, out_written: *mut usize, ) -> PamojaStatus
Expand description

Writes one command out.

§Arguments

  • command - the command to write.
  • out - where to write it.
  • capacity - how much room that is, at least PAMOJA_LORAWAN_MAC_MAX for any command.
  • out_written - where to put how many bytes were written.

§Returns

PamojaStatus::Ok with the bytes written, or PamojaStatus::InvalidArgument when the identifier and direction name no command, a field will not fit what it is carried in, or there is not enough room.

§Safety

command must be readable, out must point to capacity writable bytes, and out_written must be writable.