Skip to main content

pamoja_replay_new

Function pamoja_replay_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_replay_new( readings: *const f32, count: usize, repeating: bool, ) -> *mut PamojaReplay
Expand description

Creates a sensor that reads back a recorded series.

This is how a caller replays a real capture, so a test asks what the code does with readings that actually happened rather than ones it invented.

§Arguments

  • readings - the series to read back.
  • count - how many readings readings holds.
  • repeating - true to start again at the beginning once exhausted, false to keep returning the last one.

§Returns

A handle the caller must release with pamoja_replay_free.

§Safety

readings must point to at least count readable floats, or be null when count is 0.