DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Structs.hpp
Go to the documentation of this file.
1/*
2 * This file is 100% generated. Any manual edits will likely be lost.
3 *
4 * This contains struct and other type definitions for shema in
5 * namespace dunedaq::timing::timingfirmware.
6 */
7#ifndef DUNEDAQ_TIMING_TIMINGFIRMWARE_STRUCTS_HPP
8#define DUNEDAQ_TIMING_TIMINGFIRMWARE_STRUCTS_HPP
9
10#include <cstdint>
11
12#include <vector>
13#include <string>
14
16
17 // @brief A bool
18 using BoolData = bool;
19
20 // @brief A double
21 using DoubleValue = double;
22
23
24 // @brief 32 bit uint
25 using RegValue = uint32_t; // NOLINT
26
27
28 // @brief integer
29 using IntData = int32_t;
30
31
32 // @brief Endpoint check result data
34 {
35
36 // @brief Address of the checked endpoint
37 RegValue address = 0;
38
39 // @brief Was the endpoint alive?
40 BoolData alive = false;
41
42 // @brief Measured endpoint round trip time
44
45 // @brief State of the checked endpoint
47
48 // @brief Measured endpoint round trip time after delay apply
50
51 // @brief State of the checked endpoint after delays applied
53
54 // @brief Applied delay
56 };
57
58 // @brief A vector timing endpoint check result data
59 using EndpointCheckResultoVector = std::vector<dunedaq::timing::timingfirmware::EndpointCheckResult>;
60
61 // @brief 64 bit int
62 using LongInt = int64_t;
63
64
65 // @brief 64 bit uint
66 using LongUint = uint64_t; // NOLINT
67
68
69 // @brief A string field
70 using TextData = std::string;
71
72} // namespace dunedaq::timing::timingfirmware
73
74#endif // DUNEDAQ_TIMING_TIMINGFIRMWARE_STRUCTS_HPP
std::vector< dunedaq::timing::timingfirmware::EndpointCheckResult > EndpointCheckResultoVector
Definition Structs.hpp:59
Unknown serialization type<< t,((char) t)) template< typename T > inline std::string datatype_to_string() { return "Unknown";} namespace serialization { template< typename T > struct is_serializable :std::false_type {};enum SerializationType { kMsgPack };inline SerializationType from_string(const std::string s) { if(s=="msgpack") return kMsgPack;throw UnknownSerializationTypeString(ERS_HERE, s);} constexpr uint8_t serialization_type_byte(SerializationType stype) { switch(stype) { case kMsgPack:return 'M';default:throw UnknownSerializationTypeEnum(ERS_HERE);} } constexpr SerializationType DEFAULT_SERIALIZATION_TYPE=kMsgPack;template< class T > std::vector< uint8_t > serialize(const T &obj, SerializationType stype=DEFAULT_SERIALIZATION_TYPE) { switch(stype) { case kMsgPack:{ msgpack::sbuffer buf;msgpack::pack(buf, obj);std::vector< uint8_t > ret(buf.size()+1);ret[0]=serialization_type_byte(stype);std::copy(buf.data(), buf.data()+buf.size(), ret.begin()+1);return ret;} default:throw UnknownSerializationTypeEnum(ERS_HERE);} } template< class T, typename CharType=unsigned char > T deserialize(const std::vector< CharType > &v) { switch(v[0]) { case serialization_type_byte(kMsgPack):{ try { msgpack::object_handle oh=msgpack::unpack(const_cast< char * >(reinterpret_cast< const char * >(v.data()+1)), v.size() - 1,[](msgpack::type::object_type, std::size_t, void *) -> bool