Skip to main content

pamoja_gateway_uplink_add_rxpk

Function pamoja_gateway_uplink_add_rxpk 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_gateway_uplink_add_rxpk( uplink: *mut PamojaGatewayUplink, packet: PamojaGatewayRxpk, payload: *const u8, payload_len: usize, ) -> PamojaStatus
Expand description

Adds a packet the gateway heard.

§Arguments

  • uplink - the uplink being built.
  • packet - the metadata, whose modulation says how to read its link or bitrate.
  • payload - the packet itself.
  • payload_len - its length.

§Returns

PamojaStatus::Ok, or PamojaStatus::InvalidArgument for a null handle or a null payload with a length.

§Safety

uplink must be a live handle from pamoja_gateway_uplink_new, and payload must point at payload_len readable bytes or be null.