Skip to main content

pamoja_gateway_station_message_set_payload

Function pamoja_gateway_station_message_set_payload 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_gateway_station_message_set_payload( message: *mut PamojaGatewayStationMessage, bytes: *const u8, bytes_len: usize, ) -> PamojaStatus
Expand description

Sets the bytes a message carries: the payload of a data frame or a proprietary frame, or the frame a downlink transmits.

§Arguments

  • message - the message.
  • bytes - the bytes.
  • bytes_len - how many bytes bytes holds.

§Returns

PamojaStatus::Ok once set, or PamojaStatus::InvalidArgument for a kind that carries none.

§Safety

message must be a live handle, and bytes must point to bytes_len readable bytes.