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