1#ifndef GO_TELEMETRY_DATACLASSES_H_INLCUDED
2#define GO_TELEMETRY_DATACLASSES_H_INLCUDED
8#include "tof_typedefs.h"
9#include "result/result.h"
19 enum class BfswPacketType : u8 {
31 GcuEvtBldSettings = 93,
35 InterestingEvent = 190,
36 NoGapsTriggerEvent = 191,
52 auto bfsw_ptype_to_u8(BfswPacketType pt) -> u8;
53 auto bfsw_ptype_to_str(BfswPacketType pt) -> std::string;
56 static constexpr u16 SIZE = 13;
57 static constexpr u16 HEAD = 0x90eb;
60 BfswPacketType ptype {BfswPacketType::Unknown};
66 auto get_gcutime() -> f64;
67 auto to_string()
const -> std::string;
68 static auto from_bytestream(Vec<u8>
const &stream, usize &pos)
69 -> r::Result<PacketHeader, g::IOError>;
75 auto to_string()
const -> std::string;
76 static auto from_bytestream(Vec<u8>
const &stream, usize &pos) ->
Packet;
90 auto to_string()
const -> std::string;
100 auto to_string()
const -> std::string;
104 u32 event_id {0xffffffff};
105 u8 status_version {0xff};
106 bool stats_valid {
false};
107 u16 trigger_sources {0};
108 u8 n_hits_umb {0xff};
109 u8 n_hits_cbe {0xff};
110 u8 n_hits_cor {0xff};
111 f32 tot_edep_umb {0};
112 f32 tot_edep_cbe {0};
113 f32 tot_edep_cor {0};
115 static auto from_bytestream(Vec<u8>
const &stream, usize &pos) ->
TofMetaData;
116 auto to_string()
const -> std::string;
128 f64 total_energy {0};
129 Vec<TrkCalibratedHit> calibrated_hits;
135 static constexpr u16
SIZE = 105;
138 u32 frame_counter {0xffffffff};
141 u8 rx_byte_num {0xff};
142 u8 rx_cmd_num {0xff};
143 u64 last_cmd {0xffffffffffffffff};
147 u16 fpga_board_v_in {0xffff};
148 u16 fpga_board_i_in {0xffff};
149 u16 fpga_board_t {0xffff};
150 u16 fpga_board_p {0xffff};
151 std::array<u16, 64> rtd;
152 u16 sh_current {0xffff};
153 u16 rh_current {0xffff};
154 u16 pw_board1_t {0xffff};
155 u16 pw_board2_t {0xffff};
156 u16 sh1_time_left {0xffff};
157 u16 sh2_time_left {0xffff};
158 u16 sh3_time_left {0xffff};
160 auto to_string() const -> std::
string;
162 static auto from_bytestream(Vec<u8> const &stream, usize &pos)
163 -> r::Result<Cooling,
g::IOError>;
182 u64 creation_time = 0;
186 Vec<TrkEvent> tracker_events;
187 Vec<TrkHit> trk_hits;
192 Vec<u64> tracker_oscillators = Vec<u64>(10,0) ;
194 auto to_string()
const -> std::string;
195 static auto from_bytestream(Vec<u8>
const &stream, usize &pos)
196 -> r::Result<MergedEvent, g::IOError>;
Definition calibration.h:105
Definition telemetry_dataclasses.hpp:133
static constexpr u16 SIZE
size with packet header
Definition telemetry_dataclasses.hpp:135
The actual merged event sent over telemetry.
Definition telemetry_dataclasses.hpp:167
Definition telemetry_dataclasses.hpp:72
Definition telemetry_dataclasses.hpp:119
Definition telemetry_dataclasses.hpp:93
Definition telemetry_dataclasses.hpp:79