Skip to main content

pamoja_gateway_station_heard

Function pamoja_gateway_station_heard 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_gateway_station_heard( frame: *const u8, frame_len: usize, data_rate: u8, frequency_hz: u32, levels: PamojaGatewayStationLevels, ) -> *mut PamojaGatewayStationMessage
Expand description

Reads a frame the radio heard into the message that reports it.

§Arguments

  • frame - the bytes as they arrived, header through integrity code.
  • frame_len - how many bytes frame holds.
  • data_rate - the data rate it arrived at.
  • frequency_hz - the frequency it arrived on, in hertz.
  • levels - how it was heard.

§Returns

A handle the caller must release with pamoja_gateway_station_message_free, or null on failure with the reason available from pamoja_last_error_message.

§Safety

frame must point to frame_len readable bytes.