Skip to main content

pamoja_gateway_network_trust_command

Function pamoja_gateway_network_trust_command 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_gateway_network_trust_command( network: *mut PamojaGatewayNetwork, dev_addr: u32, index: u8, reload_rate: u8, bucket_size: u8, out_command: *mut PamojaLorawanMacCommand, ) -> PamojaStatus
Expand description

Builds the command that tells a relay to trust a device, with the key that lets it verify the device’s wake-on-radio frames, TS011-1.0.1 section 10.4.

§Arguments

  • network - the network.
  • dev_addr - the device the relay should forward for.
  • index - the entry in the relay’s list, 0 to 15.
  • reload_rate - how many of the device’s uplinks the relay forwards an hour, 63 for no limit.
  • bucket_size - the coded bucket size multiplier, table 55.
  • out_command - receives the command, to send with pamoja_gateway_network_command.

§Returns

PamojaStatus::Ok, or PamojaStatus::Codec when no session is held for the address.

§Errors

Returns PamojaStatus::InvalidArgument for a null handle or out pointer.

§Safety

network must be a live handle and out_command writable.