4#ifndef PSTOP_PSTOP_REMOTE_DATA_H
5#define PSTOP_PSTOP_REMOTE_DATA_H
10#include "pstop/device_id.h"
11#include "pstop/constants.h"
12#include "pstop/protocol_data.h"
17 PSTOP_REMOTE_INITING = 0,
18 PSTOP_REMOTE_BONDED = 1,
20 PSTOP_REMOTE_STOPPED = 3,
21 PSTOP_REMOTE_UNKNOWN = 255
23} pstop_remote_state_t;
Identifier of a pstop device.
Definition device_id.h:12
Per-remote protocol state.
Definition protocol_data.h:12
State tracked for one remote.
Definition pstop_remote_data.h:26
uint8_t last_message
Last message type received from the remote.
Definition pstop_remote_data.h:35
bool is_stop_only
True if the remote can stop but not restart the robot.
Definition pstop_remote_data.h:38
pstop_remote_state_t remote_state
Lifecycle state of the remote.
Definition pstop_remote_data.h:47
uint16_t lost_message_counter
Messages lost so far.
Definition pstop_remote_data.h:41
protocol_data_t remote_data
Protocol state for the remote.
Definition pstop_remote_data.h:32
uint32_t local_remote_id
Local identifier of the remote.
Definition pstop_remote_data.h:29
uint16_t missed_heartbeats_counter
Heartbeats missed so far.
Definition pstop_remote_data.h:44
A fixed-capacity collection of remotes.
Definition pstop_remote_data.h:52
pstop_remote_data_t * remotes
Caller-owned array of max_remotes entries.
Definition pstop_remote_data.h:55
uint16_t max_remotes
Capacity of the remotes array.
Definition pstop_remote_data.h:58