STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
T7Messages.hpp
Go to the documentation of this file.
1#ifndef DAQ_T7_MESSAGES_HPP
2#define DAQ_T7_MESSAGES_HPP
3
4#include <array>
5#include <cstdint>
6
8
9namespace comms {
10namespace messages {
11namespace sensor {
12
13/**
14 * @brief One LabJack T7 analog-input sample, published by t7_bridge.
15 *
16 * Same 21-byte shape as the other sensor messages, but the value is volts as a float. LJM
17 * returns calibrated volts (LabJack's per-device calibration is applied on the device side of
18 * the library), so there are no ADC counts to carry.
19 *
20 * Layout: u64 timestamp_ns | u8 ain | u8[3] pad | f32 volts | u32 sample_ts_ms | u8 status
21 */
22using T7RawMessage = CommsMessage<uint64_t, // (0) timestamp_ns — epoch ns
23 uint8_t, // (1) ain — AIN number on the T7
24 std::array<uint8_t, 3>, // (2) padding
25 float, // (3) volts
26 uint32_t, // (4) sample_ts_ms — ms since stream start
27 uint8_t // (5) status — 0 = ok
28 >;
29
30/**
31 * @brief One T7 channel in engineering units, published by t7_bridge beside T7RawMessage.
32 *
33 * The ESP32 calibrated layout (CalibratedPTMessage et al.): u64 timestamp_ns | u8 ain | u8[3] pad
34 * | f32 value (psi / C / kg) | i32 raw_uv (the volts, in microvolts) | u8 cal_status (1).
35 */
38
39} // namespace sensor
40} // namespace messages
41} // namespace comms
42
43#endif // DAQ_T7_MESSAGES_HPP
CommsMessage< uint64_t, uint8_t, std::array< uint8_t, 3 >, float, uint32_t, uint8_t > T7RawMessage
One LabJack T7 analog-input sample, published by t7_bridge.
CommsMessage< uint64_t, uint8_t, std::array< uint8_t, 3 >, float, int32_t, uint8_t > T7CalibratedMessage
One T7 channel in engineering units, published by t7_bridge beside T7RawMessage.
Central message header for all communication messages.
CommsMessage - Template-based message serialization.