1#ifndef MONITORINGPACKETS_H_INCLUDED
2#define MONITORINGPACKETS_H_INCLUDED
6#include "tof_typedefs.h"
7#include "serialization.h"
21 static constexpr u16
HEAD = 0xAAAA;
23 static constexpr u16
TAIL = 0x5555;
25 static constexpr u8
SIZE = 25;
33 std::array<f32, 3> thresh ;
46std::ostream& operator<<(std::ostream& os, const
LTBMoniData& moni);
54 static constexpr u16
HEAD = 0xAAAA;
55 static constexpr u16
TAIL = 0x5555;
56 static constexpr u8
SIZE = 151;
77 f32 drs_dvdd_voltage ;
78 f32 drs_dvdd_current ;
89 f32 adc_dvdd_voltage ;
90 f32 adc_dvdd_current ;
92 f32 adc_avdd_voltage ;
93 f32 adc_avdd_current ;
95 f32 drs_avdd_voltage ;
96 f32 drs_avdd_current ;
111std::ostream& operator<<(std::ostream& os, const
RBMoniData& moni);
117 static constexpr u16
HEAD = 0xAAAA;
118 static constexpr u16
TAIL = 0x5555;
119 static constexpr u8
SIZE = 89;
122 std::array<f32, 3> p3v6_preamp_vcp;
123 std::array<f32, 3> n1v6_preamp_vcp;
124 std::array<f32, 3> p3v4f_ltb_vcp;
125 std::array<f32, 3> p3v4d_ltb_vcp;
126 std::array<f32, 3> p3v6_ltb_vcp;
127 std::array<f32, 3> n1v6_ltb_vcp;
143std::ostream& operator<<(std::ostream& os, const
PBMoniData& moni);
149 static constexpr u16
HEAD = 0xAAAA;
150 static constexpr u16
TAIL = 0x5555;
151 static constexpr u8
SIZE = 89;
154 std::array<f32, 16> temps;
155 std::array<f32, 16> biases;
166std::ostream& operator<<(std::ostream& os, const
PAMoniData& moni);
173 static constexpr u16
HEAD = 0xAAAA;
174 static constexpr u16
TAIL = 0x5555;
175 static constexpr u8
SIZE = 6;
192 auto get_tiu_emulation_mode()
const -> bool;
193 auto get_tiu_use_aux_link()
const -> bool;
194 auto get_tiu_bad()
const -> bool;
195 auto get_tiu_busy_stuck()
const -> bool;
196 auto get_tiu_ignore_busy()
const -> bool;
204std::ostream& operator<<(std::ostream& os, const
MtbMoniData& moni);
211 static constexpr u16
HEAD = 0xAAAA;
212 static constexpr u16
TAIL = 0x5555;
213 static constexpr u8
SIZE = 41;
217 std::array<u32, 4> cpu_freq ;
231std::ostream& operator<<(std::ostream& os, const
CPUMoniData& moni);
Definition monitoring.h:210
static auto from_bytestream(const Vec< u8 > &payload, usize &pos) -> CPUMoniData
extract moni data from payload
Allow to extend all classes with a from_tofpacket method.
Definition serialization.h:18
Definition monitoring.h:19
static auto from_bytestream(const Vec< u8 > &stream, usize &pos) -> LTBMoniData
f32 trenz_temp
FIXME - temperature.
Definition monitoring.h:30
auto to_string() const -> std::string
String representatioin for printing.
static constexpr u16 HEAD
struct begin marker bytes
Definition monitoring.h:21
static constexpr u8 SIZE
byte size with HEAD + TAIL
Definition monitoring.h:25
u8 board_id
FIXME - this might be the RB id.
Definition monitoring.h:28
static constexpr u16 TAIL
struct end marker bytes
Definition monitoring.h:23
Definition monitoring.h:172
auto get_fpga_temp() const -> f32
Convert ADC temp from adc values to Celsius.
Definition monitoring.h:148
static auto from_bytestream(const Vec< u8 > &stream, usize &pos) -> PAMoniData
Factory function - restore PAMoniData from byte-representation.
auto to_string() const -> std::string
String representation for pretty printing.
Definition monitoring.h:116
auto to_string() const -> std::string
String representation for pretty printing.
static auto from_bytestream(const Vec< u8 > &stream, usize &pos) -> PBMoniData
Factor function - restore PAMoniData from byte-representation.
Definition monitoring.h:53
f32 humidity
ambient humidity
Definition monitoring.h:71
f32 pressure
ambient pressure
Definition monitoring.h:69
auto to_string() const -> std::string
String representatioin for printing.
u16 rate
Rate as recorded by the board itself.
Definition monitoring.h:60
f32 mag_tot
total strength of magnetic field
Definition monitoring.h:76
f32 tmp_zynq
fpga temperature
Definition monitoring.h:65