STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
BoardHeartbeatMessage.hpp
Go to the documentation of this file.
1#ifndef BOARD_HEARTBEAT_MESSAGE_HPP
2#define BOARD_HEARTBEAT_MESSAGE_HPP
3
4#include <cstdint>
5
7
8namespace comms {
9namespace messages {
10namespace board {
11
12/**
13 * @brief Board heartbeat status record for Elodin
14 *
15 * Published to Elodin each time a BOARD_HEARTBEAT is received, keyed by board_id.
16 * packet_id: {0x10, board_id}
17 *
18 * Layout (16 bytes, no padding needed — u32 falls on 4-byte-aligned offset 12):
19 * u64 timestamp_ns (0) — monotonic receive timestamp
20 * u8 board_id (8)
21 * u8 board_type (9) — config wire byte (see fsw::daq_wire / BoardTypeWire.hpp)
22 * u8 engine_state (10) — daq::EngineState raw value
23 * u8 board_state (11) — daq::BoardState raw value
24 * u32 packet_ts_ms (12) — board-reported timestamp from packet header
25 */
26using BoardHeartbeatElodinMessage = CommsMessage<uint64_t, // (0) timestamp_ns
27 uint8_t, // (1) board_id
28 uint8_t, // (2) board_type
29 uint8_t, // (3) engine_state
30 uint8_t, // (4) board_state
31 uint32_t // (5) packet_ts_ms
32 >;
33
34} // namespace board
35} // namespace messages
36} // namespace comms
37
38#endif // BOARD_HEARTBEAT_MESSAGE_HPP
CommsMessage< uint64_t, uint8_t, uint8_t, uint8_t, uint8_t, uint32_t > BoardHeartbeatElodinMessage
Board heartbeat status record for Elodin.
Central message header for all communication messages.
CommsMessage - Template-based message serialization.