#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_lorawan_end_device_send(
device: *mut PamojaLorawanEndDevice,
port: u8,
payload: *const u8,
payload_len: usize,
confirmed: u8,
now_us: u64,
out_frame: *mut *mut PamojaBuffer,
out_transmission: *mut PamojaLorawanTransmission,
) -> PamojaStatusExpand description
Builds an uplink carrying a payload.
§Arguments
device- the device.port- the application port, 1 to 223, or 224 for the certification test port.payload- the application payload.payload_len- its length.confirmed-1to ask the network to acknowledge it.now_us- the time, in microseconds.out_frame- receives the frame to transmit.out_transmission- receives where and how to transmit it, and its windows.
§Returns
PamojaStatus::Ok on success, with *out_frame set to a buffer the caller must release
with pamoja_buffer_free.
§Errors
Returns PamojaStatus::InvalidArgument for port 0, which belongs to MAC commands, and
a failing status with the reason on pamoja_lorawan_end_device_error otherwise: not
joined, busy, a wait for the air, or a payload too long.
§Safety
device must be a live handle, payload must point to payload_len readable bytes when
that is non-zero, and the out pointers must be writable.