#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_lorawan_grant_accept(
grant: PamojaLorawanGrant,
cflist: *const u8,
cflist_len: usize,
app_key: *const u8,
app_key_len: usize,
dev_nonce: u16,
out_frame: *mut *mut PamojaBuffer,
) -> PamojaStatusExpand description
Builds the signed join-accept a network sends to admit a device.
§Arguments
grant- the address and settings to grant.cflist- the optional 16-byte channel list, or null for none.cflist_len- its length, either 0 or 16.app_key- the 16-byte application root key the device shares.app_key_len- its length, which must bePAMOJA_LORAWAN_KEY_LEN.dev_nonce- the nonce the matching join-request carried.out_frame- receives the encoded join-accept.
§Returns
PamojaStatus::Ok on success, with *out_frame set to a buffer the caller
must release with pamoja_buffer_free, or
PamojaStatus::InvalidArgument if the key or the channel list is the wrong
length.
§Safety
cflist and app_key must each point to at least their stated lengths in
readable bytes, and out_frame must point to a writable *mut PamojaBuffer.