1#ifndef MONITORINGPACKETS_H_INCLUDED
2#define MONITORINGPACKETS_H_INCLUDED
6#include "tof_typedefs.h"
7#include "serialization.h"
21 static const u16
HEAD = 0xAAAA;
23 static const u16
TAIL = 0x5555;
33 std::array<f32, 3> thresh ;
46std::ostream& operator<<(std::ostream& os,
const LTBMoniData& moni);
54 static const u16 HEAD = 0xAAAA;
55 static const u16 TAIL = 0x5555;
56 static const 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 ;
104 static RBMoniData from_bytestream(
const Vec<u8> &stream,
111std::ostream& operator<<(std::ostream& os,
const RBMoniData& moni);
117 static const u16 HEAD = 0xAAAA;
118 static const u16 TAIL = 0x5555;
119 static const 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 const u16 HEAD = 0xAAAA;
150 static const u16 TAIL = 0x5555;
151 static const 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 const u16 HEAD = 0xAAAA;
174 static const u16 TAIL = 0x5555;
175 static const u8 SIZE = 6;
190 std::string to_string()
const;
192 bool get_tiu_emulation_mode()
const;
194 bool get_tiu_use_aux_link()
const;
196 bool get_tiu_bad()
const;
198 bool get_tiu_busy_stuck()
const;
200 bool get_tiu_ignore_busy()
const;
210std::ostream& operator<<(std::ostream& os,
const MtbMoniData& moni);
217 static const u16 HEAD = 0xAAAA;
218 static const u16 TAIL = 0x5555;
219 static const u8 SIZE = 41;
223 std::array<u32, 4> cpu_freq ;
234 std::string to_string()
const;
237std::ostream& operator<<(std::ostream& os,
const CPUMoniData& moni);
Definition monitoring.h:216
static CPUMoniData from_bytestream(const Vec< u8 > &payload, usize &pos)
extract moni data from payload
Allow to extend all classes with a from_tofpacket method.
Definition serialization.h:18
Definition monitoring.h:19
std::string to_string() const
String representatioin for printing.
f32 trenz_temp
FIXME - temperature.
Definition monitoring.h:30
static const u16 TAIL
struct end marker bytes
Definition monitoring.h:23
static const u16 HEAD
struct begin marker bytes
Definition monitoring.h:21
static const 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 LTBMoniData from_bytestream(const Vec< u8 > &stream, usize &pos)
Definition monitoring.h:172
static MtbMoniData from_bytestream(const Vec< u8 > &payload, usize &pos)
extract moni data from payload
f32 get_fpga_temp() const
Convert ADC temp from adc values to Celsius.
Definition monitoring.h:148
static PAMoniData from_bytestream(const Vec< u8 > &stream, usize &pos)
Factory function - restore PAMoniData from byte-representation.
std::string to_string() const
String representation for pretty printing.
Definition monitoring.h:116
static PBMoniData from_bytestream(const Vec< u8 > &stream, usize &pos)
Factor function - restore PAMoniData from byte-representation.
std::string to_string() const
String representation for pretty printing.
Definition monitoring.h:53
f32 humidity
ambient humidity
Definition monitoring.h:71
f32 pressure
ambient pressure
Definition monitoring.h:69
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
std::string to_string() const
String representatioin for printing.