SRS-control 0.1.4
Loading...
Searching...
No Matches
SRSDataCompact.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
5
7{
8 // Dev note: need to be of unsigned type to stop clang tidy from complaining
9 constexpr auto TDC_BIT_LENGTH = 8U;
10 constexpr auto CHANNEL_NUM_BIT_LENGTH = 6U;
11 constexpr auto BC_ID_BIT_LENGTH = 12U;
12 constexpr auto ADC_BIT_LENGTH = 10U;
13 constexpr auto VMM_ID_BIT_LENGTH = 5U;
14 constexpr auto OFFSET_BIT_LENGTH = 5U;
15
17 {
18 uint16_t : 16;
19 uint16_t tdc : TDC_BIT_LENGTH;
21 uint16_t is_over_threshold : 1;
22 uint16_t flag : 1;
24 uint32_t adc : ADC_BIT_LENGTH;
27 };
28
37} // namespace srs::process::internal
constexpr auto SRS_TIMESTAMP_LOW_BIT_LENGTH
constexpr auto SRS_TIMESTAMP_HIGH_BIT_LENGTH
constexpr auto TDC_BIT_LENGTH
constexpr auto OFFSET_BIT_LENGTH
constexpr auto ADC_BIT_LENGTH
constexpr auto BC_ID_BIT_LENGTH
constexpr auto VMM_ID_BIT_LENGTH
constexpr auto CHANNEL_NUM_BIT_LENGTH