Skip to main content

pamoja_can_bus_receive

Function pamoja_can_bus_receive 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_can_bus_receive( bus: *const PamojaCanBus, timeout_micros: u64, out_frame: *mut *mut PamojaCanFrame, ) -> PamojaStatus
Expand description

Takes the next frame the node keeps, waiting up to a timeout for one.

§Arguments

  • bus - the node.
  • timeout_micros - how long to wait.
  • out_frame - receives a new frame handle, which the caller releases with pamoja_can_frame_free, or null when the timeout passed with nothing.

§Returns

As pamoja_can_bus_send.

§Safety

bus must be a live handle or null, and out_frame a writable pointer or null.