|
Protective Stop
|
Hosts pstop_c in-process, making the node itself the machine. More...
#include <software_backend.hpp>
Public Member Functions | |
| SoftwareMachineBackend (const SoftwareConfig &config) | |
| Copies config; no I/O until start(). | |
| bool | start () override |
| Begins servicing: software binds UDP and runs the machine loop, hardware starts polling. | |
| void | stop () override |
| Stops servicing and leaves the machine in its SAFE state. | |
| MachineSnapshot | snapshot () const override |
| Thread-safe copy of the latest state. | |
| bool | configure (const MachineTiming &timing, std::string &error) override |
| Applies an already safety-validated timing change. | |
| const char * | name () const override |
| Backend kind, "software" or "hardware". | |
Hosts pstop_c in-process, making the node itself the machine.
Runs a machine instance on a dedicated thread and binds UDP so remotes bond directly to it. On stop() or node death the machine stops replying and remotes fail-safe on their own heartbeat timeout (design ยง8).
|
overridevirtual |
Applies an already safety-validated timing change.
| timing | Timing to apply. |
| error | Set when the backend cannot honour the change. |
Implements protective_stop_machine::IMachineBackend.
|
inlineoverridevirtual |
Backend kind, "software" or "hardware".
Implements protective_stop_machine::IMachineBackend.
|
overridevirtual |
Thread-safe copy of the latest state.
Implements protective_stop_machine::IMachineBackend.
|
overridevirtual |
Begins servicing: software binds UDP and runs the machine loop, hardware starts polling.
Implements protective_stop_machine::IMachineBackend.
|
overridevirtual |
Stops servicing and leaves the machine in its SAFE state.
Software stops the loop so remotes fail-safe; hardware stops polling while the ESP32 keeps enforcing. Idempotent.
Implements protective_stop_machine::IMachineBackend.