Hardware-free device simulators for the pamoja SDK.
The SDK is meant to be built and tested with no hardware at all, and that promise
only holds if there are convincing stand-ins for the parts a device would have.
This crate provides those stand-ins as ordinary implementations of the core
Sensor and Actuator traits, so
they drop into a Node, a profile, or a test exactly where a real driver will go
once the hardware-I/O layer lands:
- [
SimSensor] - a fake sensor that generates a lifelike signal from a baseline, a drift, and bounded, seedable noise, so a control loop meets the kind of messy input it will see in the field. - [
Replay] - a fake sensor that plays back an exact sequence of readings, for deterministic tests and scripted demos. - [
RecordingActuator] - a fake actuator that logs every command instead of driving hardware, so a test can assert what a control loop decided to do. - [
DegradedLink] - aTransportdecorator that simulates a lossy and intermittent radio link, so offline-first store-and- forward can be proven against a realistic bad network rather than assumed.
Examples
Drive a recording relay from a scripted probe, with no hardware:
use ;
use ;
# async