gaps-online-software 0.10
online software for the TOF system for the GAPS experiment
Loading...
Searching...
No Matches
Gaps Namespace Reference

‍** More...

Classes

struct  CRFrame
 
struct  CRFrameObject
 
struct  CRReader
 
class  FatalException
 Exception for log_fatal(..) macro. More...
 
class  TofPacketReader
 
struct  TofPaddle
 

Typedefs

typedef spdlog::level::level_enum LOGLEVEL
 

Enumerations

enum class  CRFrameObjectType : u8 { Unknown = 0 , TofPacket = 10 , TelemetryPacket = 20 }
 
enum class  ProtocolVersion : u8 { Unknown = PROTOCOLVERSION_UNKNOWN , V1 = PROTOCOLVERSION_V1 , V2 = PROTOCOLVERSION_V2 , V3 = PROTOCOLVERSION_V3 }
 

Functions

std::map< u8, TofPaddleget_tofpaddles (std::string dbname)
 Get a paddle from the database.
 
std::string severity_to_str (const LOGLEVEL &severity)
 
void set_loglevel (LOGLEVEL severity)
 
template<typename T >
Vec< T > slice (const Vec< T > &vec, usize start, usize end)
 
bool parse_bool (const Vec< u8 > &bytestream, usize &pos)
 
u8 parse_u8 (const Vec< u8 > &bytestream, usize &pos)
 get an unsigned char from a vector of bytes, advancing pos by 1
 
u16 parse_u16 (const Vec< u8 > &bytestream, usize &pos)
 get an unsigned short from a vector of bytes, advancing pos by 2
 
f32 parse_f16 (const Vec< u8 > &bytestream, usize &pos)
 
u32 parse_u32 (const Vec< u8 > &bytestream, usize &pos)
 get an unsigned 32bit int from a vector of bytes, advancing pos by 4
 
u64 parse_u64 (const Vec< u8 > &bytestream, usize &pos)
 get an unsigned long64 from a vector of bytes, advancing pos by 8
 
i32 parse_i32 (const Vec< u8 > &bytestream, usize &pos)
 get a signed 32bit int from a vector of bytes, advancing pos by 4
 
f32 parse_f32 (const Vec< u8 > &bytestream, usize &pos)
 get a signed float32 from a vector of bytes, advancning pos by 4
 
f64 parse_f64 (const Vec< u8 > &bytestream, usize &pos)
 get a signed long float (64) from a vector of bytes, advancing pos by 8
 
std::string parse_string (const Vec< u8 > &bytestream, usize &pos)
 
std::string pversion_to_string (ProtocolVersion version)
 

Detailed Description

‍**

‍**

Function Documentation

◆ parse_f16()

f32 Gaps::parse_f16 ( const Vec< u8 > &  bytestream,
usize &  pos 
)

get a f16 ("half float") from a vector of bytes, advancing pos by 2

NOTE - this will actually convert the result to the more common f32 directly

◆ parse_string()

std::string Gaps::parse_string ( const Vec< u8 > &  bytestream,
usize &  pos 
)

custom string parser. This is only used for CRFrame's index. The actual byte content of the string needs to be prefixed with its 16bit lenght

◆ set_loglevel()

void Gaps::set_loglevel ( LOGLEVEL  severity)

Suppress log messages if their severity is lower than

Parameters
severity