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::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
16
17// @brief A count of more things
18using BigCount = int64_t;
19
20// @brief
21using Choice = bool;
22
23// @brief An ID of a thingy
24using Identifier = int32_t;
25
26// @brief A string field
27using String = std::string;
28
29// @brief Count of things
30using Count = uint32_t; // NOLINT
31
32// @brief A float number
33using Float = float;
34
35// @brief A list of ips
36using Ips = std::vector<dunedaq::dpdklibs::nicsender::String>;
37
38// @brief
39struct Core
40{
41
42 // @brief ID of lcore
44
45 // @brief Source IP that will be in the headers sent by this lcore
47};
48
49// @brief A list of cores
50using CoreList = std::vector<dunedaq::dpdklibs::nicsender::Core>;
51
52// @brief Generic UIO sender DAQ Module Configuration
53struct Conf
54{
55
56 // @brief Physical card identifier (in the same host)
58
59 // @brief A string with EAL arguments
61
62 // @brief The frontend type (wib, wib2, daphne, tde)
64
65 // @brief Number of cores that will be used for sending
67
68 // @brief Number of cores that will be used for sending
70
71 // @brief Burst size used when sending
73
74 // @brief Rate used for the sender
75 Float rate = 1.0;
76
77 // @brief Core lists used for sending
79
80 // @brief How many ticks between timestamps
82};
83
84} // namespace dunedaq::dpdklibs::nicsender
85
86#endif // DUNEDAQ_DPDKLIBS_NICSENDER_STRUCTS_HPP
std::vector< dunedaq::dpdklibs::nicsender::String > Ips
Definition Structs.hpp:36
std::vector< dunedaq::dpdklibs::nicsender::Core > CoreList
Definition Structs.hpp:50
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