7#include "pstop/pstop_msg.h"
8#include "pstop/error.h"
9#include "pstop/pstop_application.h"
10#include "pstop/pstop_remote_data.h"
33typedef pstop_error_t (* pstop_check_heartbeats_t)(
pstop_machine_t *machine);
35#define ROBOT_STATE_OK 0
36#define ROBOT_STATE_STOPPED 1
38#define ROBOT_RESTART_STATE_OK 0
39#define ROBOT_RESTART_STATE_NEED_STOP 1
40#define ROBOT_RESTART_STATE_STOP_RECEIVED 2
Identifier of a pstop device.
Definition device_id.h:12
Per-remote protocol state.
Definition protocol_data.h:12
Callbacks and configuration supplied by the application.
Definition pstop_application.h:102
The machine side of the protocol: connected remotes, application callbacks, and robot state.
Definition machine.h:69
pstop_application_t * application
Application callbacks and configuration; not owned.
Definition machine.h:75
robot_state_t robot_state
Current stop/restart state.
Definition machine.h:78
pstop_remotes_t remotes
Remote slots tracked by this machine.
Definition machine.h:72
A PSTOP message object.
Definition pstop_msg.h:25
State tracked for one remote.
Definition pstop_remote_data.h:26
A fixed-capacity collection of remotes.
Definition pstop_remote_data.h:52
Stop/restart state of the robot.
Definition machine.h:43
int restart_state
0 = everything is OK 1 = need stop message 2 = stop received
Definition machine.h:60
int robot_state
ROBOT_STATE_OK or ROBOT_STATE_STOPPED.
Definition machine.h:46
uint32_t remote_stop_id
The client ID that caused the robot to stop if stopped.
Definition machine.h:53
uint64_t stop_time_ms
Minimum time between a stop and ok message before ok transition.
Definition machine.h:65