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::flxlibs::felixcardcontroller.
6 */
7#ifndef DUNEDAQ_FLXLIBS_FELIXCARDCONTROLLER_STRUCTS_HPP
8#define DUNEDAQ_FLXLIBS_FELIXCARDCONTROLLER_STRUCTS_HPP
9
10#include <cstdint>
11
12#include <string>
13#include <vector>
14
16
17// @brief An unsigned of 4 bytes
18using uint4 = uint32_t; // NOLINT
19
20// @brief list of numbers
21using Array = std::vector<dunedaq::flxlibs::felixcardcontroller::uint4>;
22
23// @brief A boolean
24using boolean = bool;
25
26// @brief An unsigned of 8 bytes
27using uint8 = uint64_t; // NOLINT
28
29// @brief
30struct Link
31{
32
33 // @brief Link identifier
35
36 // @brief Indicate whether the link is enabled
37 boolean enabled = false;
38
39 // @brief DMA channel
41
42 // @brief Superchunk factor
44};
45
46// @brief A list of links
47using LinksList = std::vector<dunedaq::flxlibs::felixcardcontroller::Link>;
48
49// @brief
51{
52
53 // @brief Logical unit identifier
55
56 // @brief Toggle emulator on/off
57 boolean emu_fanout = false;
58
59 // @brief List of links in the logical unit
61
62 // @brief Elinks to ignore when checking alignment.
64};
65
66// @brief A list of logical units
67using LogicalUnitList = std::vector<dunedaq::flxlibs::felixcardcontroller::LogicalUnit>;
68
69// @brief Upstream FELIX CardController DAQ Module Configuration
70struct Conf
71{
72
73 // @brief Physical card identifier (in the same host)
75
76 // @brief Superlogic regions of selected card
78};
79
80// @brief A string field
81using String = std::string;
82
83// @brief A list of registers
84using RegList = std::vector<dunedaq::flxlibs::felixcardcontroller::String>;
85
86// @brief Bitfield access parameters
87struct GetBFs
88{
89
90 // @brief Physical card identifier (in the same host)
92
93 // @brief Logical unit identifier
95
96 // @brief A list of bitfields
98};
99
100// @brief Register access parameters
102{
103
104 // @brief Physical card identifier (in the same host)
106
107 // @brief Logical unit identifier
109
110 // @brief A list of registers
112};
113
114// @brief
116{
117
118 // @brief The name of a register
120
121 // @brief The value of a register
123};
124
125// @brief A list of registers and values
126using RegValList = std::vector<dunedaq::flxlibs::felixcardcontroller::RegValPair>;
127
128// @brief Bitfield access parameters
129struct SetBFs
130{
131
132 // @brief Physical card identifier (in the same host)
134
135 // @brief Logical unit identifier
137
138 // @brief A list of bitfields and values to set
140};
141
142// @brief Register access parameters
144{
145
146 // @brief Physical card identifier (in the same host)
148
149 // @brief Logical unit identifier
151
152 // @brief A list of registers and values to set
154};
155
156} // namespace dunedaq::flxlibs::felixcardcontroller
157
158#endif // DUNEDAQ_FLXLIBS_FELIXCARDCONTROLLER_STRUCTS_HPP
std::vector< dunedaq::flxlibs::felixcardcontroller::uint4 > Array
Definition Structs.hpp:21
std::vector< dunedaq::flxlibs::felixcardcontroller::Link > LinksList
Definition Structs.hpp:47
std::vector< dunedaq::flxlibs::felixcardcontroller::LogicalUnit > LogicalUnitList
Definition Structs.hpp:67
std::vector< dunedaq::flxlibs::felixcardcontroller::RegValPair > RegValList
Definition Structs.hpp:126
std::vector< dunedaq::flxlibs::felixcardcontroller::String > RegList
Definition Structs.hpp:84
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