#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_gateway_network_command(
network: *mut PamojaGatewayNetwork,
dev_addr: u32,
slot: PamojaGatewayNetworkSlot,
commands: *const PamojaLorawanMacCommand,
commands_len: usize,
buffer: *mut u8,
capacity: usize,
out_txpk: *mut PamojaGatewayTxpk,
out_len: *mut usize,
) -> PamojaStatusExpand description
Builds a downlink carrying MAC commands, which is how a network configures a relay.
The commands ride in the frame options where they fit, and in a frame of their own on port 0 where they do not.
§Arguments
network- the network.dev_addr- the device to configure.slot- where and when to transmit, from the event that reported its uplink.commands- the commands to send.commands_len- how many there are.buffer- where to write the frame to transmit.capacity- how many bytes the buffer holds.out_txpk- receives the packet that carries it.out_len- receives how many bytes were written.
§Returns
PamojaStatus::Ok, PamojaStatus::InvalidArgument for a null argument, a command
the boundary cannot read, or a buffer too small, or PamojaStatus::Codec when no
session is held for the address.
§Safety
network must be a live handle, commands must point at commands_len readable
commands, buffer must point at capacity writable bytes or be null, and both outputs
must be writable.