Skip to main content

pamoja_gateway_station_xtime

Function pamoja_gateway_station_xtime 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_gateway_station_xtime( unit: u8, session: u8, micros: u64, out_value: *mut i64, ) -> PamojaStatus
Expand description

Builds a station clock value from the radio it was read on, the run of the station, and the microseconds that run had counted.

§Arguments

  • unit - the radio unit, 0 to 127.
  • session - the run of the station, which the reference station never leaves at 0.
  • micros - the microseconds the run had counted.
  • out_value - receives the value a message carries as its xtime.

§Returns

PamojaStatus::Ok once written, or PamojaStatus::InvalidArgument when the unit is past 127 or the microseconds do not fit 48 bits.

§Safety

out_value must point to writable storage.