DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dpdklibs
include
dpdklibs
nicreader
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::dpdklibs::nicreader.
6
*/
7
#ifndef DUNEDAQ_DPDKLIBS_NICREADER_STRUCTS_HPP
8
#define DUNEDAQ_DPDKLIBS_NICREADER_STRUCTS_HPP
9
10
#include <cstdint>
11
12
#include <vector>
13
#include <string>
14
15
namespace
dunedaq::dpdklibs::nicreader
{
16
17
// @brief A count of more things
18
using
BigCount
= int64_t;
19
20
21
// @brief
22
using
Choice
=
bool
;
23
24
// @brief PCIe address string
25
using
pci
= std::string;
26
27
// @brief mac string
28
using
mac
= std::string;
29
30
// @brief ipv4 string
31
using
ipv4
= std::string;
32
33
// @brief Count of things
34
using
Count
= uint32_t;
// NOLINT
35
36
37
// @brief An ID of a thingy
38
using
Identifier
= int32_t;
39
40
41
// @brief Source GeoID Information
42
struct
SrcGeoInfo
43
{
44
45
// @brief Detector ID
46
Identifier
det_id
= 0;
47
48
// @brief Crate ID
49
Identifier
crate_id
= 0;
50
51
// @brief Slot ID
52
Identifier
slot_id
= 0;
53
};
54
55
// @brief A stream map
56
struct
StreamMap
57
{
58
59
// @brief Source ID
60
Identifier
source_id
= 0;
61
62
// @brief Stream ID
63
Identifier
stream_id
= 0;
64
};
65
66
// @brief A list of streams
67
using
SrcStreamsMapping
= std::vector<dunedaq::dpdklibs::nicreader::StreamMap>;
68
69
// @brief Source field
70
struct
Source
71
{
72
73
// @brief ID of a source
74
Identifier
id
= 0;
75
76
// @brief Source IP address
77
ipv4
ip_addr
=
"192.168.0.1"
;
78
79
// @brief Assigned CPU lcore
80
Identifier
lcore
= 0;
81
82
// @brief Assigned RX queue of interface
83
Identifier
rx_q
= 0;
84
85
// @brief Source information
86
SrcGeoInfo
src_info
= {0, 0, 0};
87
88
// @brief Source streams mapping
89
SrcStreamsMapping
src_streams_mapping
= {};
90
};
91
92
// @brief A list of sources
93
using
Sources
= std::vector<dunedaq::dpdklibs::nicreader::Source>;
94
95
// @brief Source field
96
struct
StatsReporting
97
{
98
99
// @brief Expected sequence ID increase per packet in a stream
100
BigCount
expected_seq_id_step
= 1;
101
102
// @brief Expected timestamp increase per packet in a stream
103
BigCount
expected_timestamp_step
= -999;
104
105
// @brief Expected packet size
106
BigCount
expected_packet_size
= 7243;
107
108
// @brief Analyze only every (1/analyze_nth_packet) packet
109
Count
analyze_nth_packet
= 1;
110
};
111
112
// @brief Configuration an Ethernet interface through DPDK RTE
113
struct
Interface
114
{
115
116
// @brief PCIe address of the interface
117
pci
pci_addr
=
"0000:00:00.0"
;
118
119
// @brief MAC address of the interface
120
mac
mac_addr
=
"AA:BB:CC:DD:EE:FF"
;
121
122
// @brief IP address of interface
123
ipv4
ip_addr
=
"192.168.0.1"
;
124
125
// @brief FlowAPI enabled
126
Choice
with_flow_control
=
true
;
127
128
// @brief Promiscuous mode enabled
129
Choice
promiscuous_mode
=
false
;
130
131
// @brief MTU of interface
132
Count
mtu
= 9000;
133
134
// @brief Size of a single RX ring
135
Count
rx_ring_size
= 1024;
136
137
// @brief Size of a single TX ring
138
Count
tx_ring_size
= 1024;
139
140
// @brief Number of total MBUFs
141
Count
num_mbufs
= 8191;
142
143
// @brief MBUF cache size
144
Count
mbuf_cache_size
= 256;
145
146
// @brief RX burst size
147
Count
burst_size
= 256;
148
149
// @brief LCore loop sleep in microseconds - 0 to disable
150
Count
lcore_sleep_us
= 10;
151
152
// @brief A list of expected sources
153
Sources
expected_sources
= {};
154
155
// @brief Defines how stats are reported
156
StatsReporting
stats_reporting_cfg
= {1, -999, 7243, 1};
157
};
158
159
// @brief A list of interfaces to use
160
using
IfaceList
= std::vector<dunedaq::dpdklibs::nicreader::Interface>;
161
162
// @brief A string field
163
using
String
= std::string;
164
165
// @brief Generic UIO reader DAQ Module Configuration
166
struct
Conf
167
{
168
169
// @brief List of interfaces to configure
170
IfaceList
ifaces
= {};
171
172
// @brief A string with EAL arguments
173
String
eal_arg_list
=
"daq_application"
;
174
};
175
176
// @brief A float number
177
using
Float
= float;
178
179
180
}
// namespace dunedaq::dpdklibs::nicreader
181
182
#endif
// DUNEDAQ_DPDKLIBS_NICREADER_STRUCTS_HPP
dunedaq::dpdklibs::nicreader
Definition
Nljs.hpp:16
dunedaq::dpdklibs::nicreader::ipv4
std::string ipv4
Definition
Structs.hpp:31
dunedaq::dpdklibs::nicreader::String
std::string String
Definition
Structs.hpp:163
dunedaq::dpdklibs::nicreader::SrcStreamsMapping
std::vector< dunedaq::dpdklibs::nicreader::StreamMap > SrcStreamsMapping
Definition
Structs.hpp:67
dunedaq::dpdklibs::nicreader::Choice
bool Choice
Definition
Structs.hpp:22
dunedaq::dpdklibs::nicreader::mac
std::string mac
Definition
Structs.hpp:28
dunedaq::dpdklibs::nicreader::Sources
std::vector< dunedaq::dpdklibs::nicreader::Source > Sources
Definition
Structs.hpp:93
dunedaq::dpdklibs::nicreader::Identifier
int32_t Identifier
Definition
Structs.hpp:38
dunedaq::dpdklibs::nicreader::Count
uint32_t Count
Definition
Structs.hpp:34
dunedaq::dpdklibs::nicreader::pci
std::string pci
Definition
Structs.hpp:25
dunedaq::dpdklibs::nicreader::IfaceList
std::vector< dunedaq::dpdklibs::nicreader::Interface > IfaceList
Definition
Structs.hpp:160
dunedaq::dpdklibs::nicreader::BigCount
int64_t BigCount
Definition
Structs.hpp:18
dunedaq::dpdklibs::nicreader::Float
float Float
Definition
Structs.hpp:177
dunedaq::bool
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
Definition
Serialization.hpp:256
dunedaq::dpdklibs::nicreader::Conf
Definition
Structs.hpp:167
dunedaq::dpdklibs::nicreader::Conf::eal_arg_list
String eal_arg_list
Definition
Structs.hpp:173
dunedaq::dpdklibs::nicreader::Conf::ifaces
IfaceList ifaces
Definition
Structs.hpp:170
dunedaq::dpdklibs::nicreader::Interface
Definition
Structs.hpp:114
dunedaq::dpdklibs::nicreader::Interface::mtu
Count mtu
Definition
Structs.hpp:132
dunedaq::dpdklibs::nicreader::Interface::promiscuous_mode
Choice promiscuous_mode
Definition
Structs.hpp:129
dunedaq::dpdklibs::nicreader::Interface::rx_ring_size
Count rx_ring_size
Definition
Structs.hpp:135
dunedaq::dpdklibs::nicreader::Interface::mac_addr
mac mac_addr
Definition
Structs.hpp:120
dunedaq::dpdklibs::nicreader::Interface::burst_size
Count burst_size
Definition
Structs.hpp:147
dunedaq::dpdklibs::nicreader::Interface::mbuf_cache_size
Count mbuf_cache_size
Definition
Structs.hpp:144
dunedaq::dpdklibs::nicreader::Interface::lcore_sleep_us
Count lcore_sleep_us
Definition
Structs.hpp:150
dunedaq::dpdklibs::nicreader::Interface::expected_sources
Sources expected_sources
Definition
Structs.hpp:153
dunedaq::dpdklibs::nicreader::Interface::with_flow_control
Choice with_flow_control
Definition
Structs.hpp:126
dunedaq::dpdklibs::nicreader::Interface::num_mbufs
Count num_mbufs
Definition
Structs.hpp:141
dunedaq::dpdklibs::nicreader::Interface::ip_addr
ipv4 ip_addr
Definition
Structs.hpp:123
dunedaq::dpdklibs::nicreader::Interface::tx_ring_size
Count tx_ring_size
Definition
Structs.hpp:138
dunedaq::dpdklibs::nicreader::Interface::pci_addr
pci pci_addr
Definition
Structs.hpp:117
dunedaq::dpdklibs::nicreader::Interface::stats_reporting_cfg
StatsReporting stats_reporting_cfg
Definition
Structs.hpp:156
dunedaq::dpdklibs::nicreader::Source
Definition
Structs.hpp:71
dunedaq::dpdklibs::nicreader::Source::src_info
SrcGeoInfo src_info
Definition
Structs.hpp:86
dunedaq::dpdklibs::nicreader::Source::src_streams_mapping
SrcStreamsMapping src_streams_mapping
Definition
Structs.hpp:89
dunedaq::dpdklibs::nicreader::Source::rx_q
Identifier rx_q
Definition
Structs.hpp:83
dunedaq::dpdklibs::nicreader::Source::lcore
Identifier lcore
Definition
Structs.hpp:80
dunedaq::dpdklibs::nicreader::Source::ip_addr
ipv4 ip_addr
Definition
Structs.hpp:77
dunedaq::dpdklibs::nicreader::SrcGeoInfo
Definition
Structs.hpp:43
dunedaq::dpdklibs::nicreader::SrcGeoInfo::det_id
Identifier det_id
Definition
Structs.hpp:46
dunedaq::dpdklibs::nicreader::SrcGeoInfo::slot_id
Identifier slot_id
Definition
Structs.hpp:52
dunedaq::dpdklibs::nicreader::SrcGeoInfo::crate_id
Identifier crate_id
Definition
Structs.hpp:49
dunedaq::dpdklibs::nicreader::StatsReporting
Definition
Structs.hpp:97
dunedaq::dpdklibs::nicreader::StatsReporting::expected_packet_size
BigCount expected_packet_size
Definition
Structs.hpp:106
dunedaq::dpdklibs::nicreader::StatsReporting::expected_timestamp_step
BigCount expected_timestamp_step
Definition
Structs.hpp:103
dunedaq::dpdklibs::nicreader::StatsReporting::expected_seq_id_step
BigCount expected_seq_id_step
Definition
Structs.hpp:100
dunedaq::dpdklibs::nicreader::StatsReporting::analyze_nth_packet
Count analyze_nth_packet
Definition
Structs.hpp:109
dunedaq::dpdklibs::nicreader::StreamMap
Definition
Structs.hpp:57
dunedaq::dpdklibs::nicreader::StreamMap::source_id
Identifier source_id
Definition
Structs.hpp:60
dunedaq::dpdklibs::nicreader::StreamMap::stream_id
Identifier stream_id
Definition
Structs.hpp:63
Generated on
for DUNE-DAQ by
1.17.0