Use Case and Applications
SPX is typically used as a deterministic “plant/device” behind your real client code. The quality gate is a test suite (MiL tests) that drives time explicitly and asserts behavior.
Below are concrete, repo-grounded use cases (models and tests live in spx-examples).
MiL integration tests for Modbus clients
Template model:
thermal_controller__modbus.yamlYour Software Under Test: a Modbus TCP client (PLC code, gateway, driver, etc.)
SPX role: deterministic device state + faults + time control
Docs: Add a communication protocol, Use in Unit Tests (MiL).
Simulate SCPI/ASCII instruments for driver testing
Template model:
multimeter__scpi.yamlYour Software Under Test: instrument driver speaking SCPI over TCP
SPX role: instrument state machine + predictable waveforms/scenarios
Docs: ASCII / SCPI Adapter, Use in Unit Tests (MiL).
MQTT device telemetry regression tests
Template model:
environment_sensor__mqtt.yamlYour Software Under Test: telemetry ingestion / rules engine / alerting
SPX role: controllable publish cadence, payload values, and fault injection
Docs: MQTT Adapter.
BLE device simulation for mobile apps and QA rigs
Template model:
temperature_sensor__ble_gatt.yamlCompanion process:
spx-ble-adapterexposes a real BLE peripheral backed by SPX attributes
Docs: BLE Adapter, BLE Device Simulation Walkthrough.
Snapshot-driven regression suites
Capture a known-good state as a Snapshot.
Restore it before a test so every run starts from the same simulation state.
Last updated

