Skip to main content

Module sim

Module sim 

Source
Expand description

The C ABI for simulated devices.

These functions wrap [pamoja_sim] so a caller can drive a whole node with no hardware attached. That is worth more from a binding than from Rust: someone writing against the SDK in Python or C# can put a sensor, an actuator, and a lossy link into a unit test and find out what their code does when a reading drifts or a packet vanishes, without owning the device.

The degraded link lives with the transports, in pamoja_transport_degraded, because it wraps a transport rather than standing alone.

Structs§

PamojaPose
Where a robot is and which way it faces.
PamojaRecordingActuator
An opaque handle to an actuator that records what it was told to do.
PamojaReplay
An opaque handle to a sensor that replays a recorded series.
PamojaSimRobot
An opaque handle to a robot that moves only in arithmetic.
PamojaSimSensor
An opaque handle to a sensor that invents plausible readings.
PamojaTwist
How fast a robot is asked to move.

Functions§

pamoja_recording_actuator_apply
Applies a command, which the actuator records rather than acts on.
pamoja_recording_actuator_commands
Copies out the commands an actuator recorded, oldest first.
pamoja_recording_actuator_free
Releases a recording actuator handle.
pamoja_recording_actuator_len
Reports how many commands an actuator has been given.
pamoja_recording_actuator_new
Creates an actuator that records every command instead of acting on one.
pamoja_replay_free
Releases a replay handle.
pamoja_replay_new
Creates a sensor that reads back a recorded series.
pamoja_replay_read
Takes the next reading from a replay.
pamoja_sim_robot_apply
Drives the robot for one time step.
pamoja_sim_robot_free
Releases a simulated robot handle.
pamoja_sim_robot_new
Creates a robot that moves only in arithmetic.
pamoja_sim_robot_pose
Reads where the robot has got to.
pamoja_sim_sensor_free
Releases a simulated sensor handle.
pamoja_sim_sensor_new
Creates a sensor that reads around a baseline.
pamoja_sim_sensor_read
Takes the next reading.