Protective Stop
Loading...
Searching...
No Matches
protocol_data.h
1// SPDX-FileCopyrightText: 2026 Polymath Robotics, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4#ifndef PSTOP_PROTOCOL_DATA_H
5#define PSTOP_PROTOCOL_DATA_H
6
7#include <stdint.h>
8
9#include "pstop/device_id.h"
10
12typedef struct {
13
16
19
21 uint64_t heartbeat_ms;
22
24 uint32_t msg_counter;
25
28
31
33
34void protocol_data_init(protocol_data_t *remote);
35
36#endif /* PSTOP_PROTOCOL_DATA_H */
Identifier of a pstop device.
Definition device_id.h:12
Per-remote protocol state.
Definition protocol_data.h:12
device_id_t remote_id
Device ID of the remote.
Definition protocol_data.h:15
uint64_t last_timestamp
Time the last message was sent to the remote.
Definition protocol_data.h:18
uint32_t msg_counter
Counter of the next message sent to the remote.
Definition protocol_data.h:24
uint32_t last_received_counter
Counter of the last message received from the remote.
Definition protocol_data.h:30
uint64_t last_received_stamp
Timestamp of the last message received from the remote.
Definition protocol_data.h:27
uint64_t heartbeat_ms
Heartbeat interval for the remote, in milliseconds.
Definition protocol_data.h:21