#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_lorawan_end_device_heard(
device: *mut PamojaLorawanEndDevice,
frame: *const u8,
frame_len: usize,
snr_db: i8,
out_heard: *mut PamojaLorawanHeard,
out_payload: *mut *mut PamojaBuffer,
) -> PamojaStatusExpand description
Reads a frame heard in one of the receive windows of the last transmission, without saying which.
A downlink may be as long as the faster of the two windows allows. When the radio knows the
window, pamoja_lorawan_end_device_heard_in holds the frame to that window’s own limit.
§Arguments
device- the device.frame- the bytes the radio received.frame_len- their length.snr_db- the frame’s signal-to-noise ratio, which aDevStatusAnsreports.out_heard- receives what the frame was.out_payload- receives the application payload of a data frame, and null for a join.
§Returns
PamojaStatus::Ok on success. A payload buffer, when set, must be released with
pamoja_buffer_free.
§Errors
Returns a failing status with the reason on pamoja_lorawan_end_device_error: nothing
pending, another device’s frame, a replayed or far-ahead counter, a refused join accept,
or a frame that did not decode.
§Safety
device must be a live handle, frame must point to frame_len readable bytes when that
is non-zero, and the out pointers must be writable.