DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dpdklibs
include
dpdklibs
nicsender
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::nicsender.
6
*/
7
#ifndef DUNEDAQ_DPDKLIBS_NICSENDER_STRUCTS_HPP
8
#define DUNEDAQ_DPDKLIBS_NICSENDER_STRUCTS_HPP
9
10
#include <cstdint>
11
12
#include <string>
13
#include <vector>
14
15
namespace
dunedaq::dpdklibs::nicsender
{
16
17
// @brief A count of more things
18
using
BigCount
= int64_t;
19
20
// @brief
21
using
Choice
=
bool
;
22
23
// @brief An ID of a thingy
24
using
Identifier
= int32_t;
25
26
// @brief A string field
27
using
String
= std::string;
28
29
// @brief Count of things
30
using
Count
= uint32_t;
// NOLINT
31
32
// @brief A float number
33
using
Float
= float;
34
35
// @brief A list of ips
36
using
Ips
= std::vector<dunedaq::dpdklibs::nicsender::String>;
37
38
// @brief
39
struct
Core
40
{
41
42
// @brief ID of lcore
43
Identifier
lcore_id
= 0;
44
45
// @brief Source IP that will be in the headers sent by this lcore
46
Ips
src_ips
= {};
47
};
48
49
// @brief A list of cores
50
using
CoreList
= std::vector<dunedaq::dpdklibs::nicsender::Core>;
51
52
// @brief Generic UIO sender DAQ Module Configuration
53
struct
Conf
54
{
55
56
// @brief Physical card identifier (in the same host)
57
Identifier
card_id
= 0;
58
59
// @brief A string with EAL arguments
60
String
eal_arg_list
=
""
;
61
62
// @brief The frontend type (wib, wib2, daphne, tde)
63
String
frontend_type
=
""
;
64
65
// @brief Number of cores that will be used for sending
66
Count
number_of_cores
= 1;
67
68
// @brief Number of cores that will be used for sending
69
Count
number_of_ips_per_core
= 1;
70
71
// @brief Burst size used when sending
72
BigCount
burst_size
= 1;
73
74
// @brief Rate used for the sender
75
Float
rate
= 1.0;
76
77
// @brief Core lists used for sending
78
CoreList
core_list
= {};
79
80
// @brief How many ticks between timestamps
81
BigCount
time_tick_difference
= 0;
82
};
83
84
}
// namespace dunedaq::dpdklibs::nicsender
85
86
#endif
// DUNEDAQ_DPDKLIBS_NICSENDER_STRUCTS_HPP
dunedaq::dpdklibs::nicsender
Definition
Nljs.hpp:15
dunedaq::dpdklibs::nicsender::Float
float Float
Definition
Structs.hpp:33
dunedaq::dpdklibs::nicsender::Choice
bool Choice
Definition
Structs.hpp:21
dunedaq::dpdklibs::nicsender::Count
uint32_t Count
Definition
Structs.hpp:30
dunedaq::dpdklibs::nicsender::String
std::string String
Definition
Structs.hpp:27
dunedaq::dpdklibs::nicsender::Ips
std::vector< dunedaq::dpdklibs::nicsender::String > Ips
Definition
Structs.hpp:36
dunedaq::dpdklibs::nicsender::CoreList
std::vector< dunedaq::dpdklibs::nicsender::Core > CoreList
Definition
Structs.hpp:50
dunedaq::dpdklibs::nicsender::BigCount
int64_t BigCount
Definition
Structs.hpp:18
dunedaq::dpdklibs::nicsender::Identifier
int32_t Identifier
Definition
Structs.hpp:24
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::nicsender::Conf
Definition
Structs.hpp:54
dunedaq::dpdklibs::nicsender::Conf::card_id
Identifier card_id
Definition
Structs.hpp:57
dunedaq::dpdklibs::nicsender::Conf::number_of_ips_per_core
Count number_of_ips_per_core
Definition
Structs.hpp:69
dunedaq::dpdklibs::nicsender::Conf::core_list
CoreList core_list
Definition
Structs.hpp:78
dunedaq::dpdklibs::nicsender::Conf::burst_size
BigCount burst_size
Definition
Structs.hpp:72
dunedaq::dpdklibs::nicsender::Conf::eal_arg_list
String eal_arg_list
Definition
Structs.hpp:60
dunedaq::dpdklibs::nicsender::Conf::rate
Float rate
Definition
Structs.hpp:75
dunedaq::dpdklibs::nicsender::Conf::number_of_cores
Count number_of_cores
Definition
Structs.hpp:66
dunedaq::dpdklibs::nicsender::Conf::frontend_type
String frontend_type
Definition
Structs.hpp:63
dunedaq::dpdklibs::nicsender::Conf::time_tick_difference
BigCount time_tick_difference
Definition
Structs.hpp:81
dunedaq::dpdklibs::nicsender::Core
Definition
Structs.hpp:40
dunedaq::dpdklibs::nicsender::Core::src_ips
Ips src_ips
Definition
Structs.hpp:46
dunedaq::dpdklibs::nicsender::Core::lcore_id
Identifier lcore_id
Definition
Structs.hpp:43
Generated on
for DUNE-DAQ by
1.18.0