|
Protective Stop
|
HTTP client to the ESP32 machn, which is itself the machine. More...
#include <hardware_backend.hpp>
Public Member Functions | |
| HardwareMachineBackend (const HardwareConfig &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". | |
Static Public Member Functions | |
| static void | parse_state (const std::string &body, MachineSnapshot &out_snapshot) |
| Maps a /state.json body onto a snapshot. | |
HTTP client to the ESP32 machn, which is itself the machine.
Polls /state.json for state and proxies runtime config to the device admin API. The ESP32 enforces STOP independently of ROS 2, so an unreachable device costs visibility only: state() reports UNSTABLE.
|
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.
|
static |
Maps a /state.json body onto a snapshot.
No HTTP, no threading. A parse error sets reachable=false. Ref: SR-M-03 / FMEA DU-9.
|
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.