DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
build
dpdklibs
codegen
include
dpdklibs
nicsender
Nljs.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 functions struct and other type definitions for shema in
5
* namespace dunedaq::dpdklibs::nicsender to be serialized via nlohmann::json.
6
*/
7
#ifndef DUNEDAQ_DPDKLIBS_NICSENDER_NLJS_HPP
8
#define DUNEDAQ_DPDKLIBS_NICSENDER_NLJS_HPP
9
10
// My structs
11
#include "
dpdklibs/nicsender/Structs.hpp
"
12
13
14
#include <nlohmann/json.hpp>
15
16
namespace
dunedaq::dpdklibs::nicsender
{
17
18
using
data_t = nlohmann::json;
19
20
inline
void
to_json
(data_t& j,
const
Core
&
obj
) {
21
j[
"lcore_id"
] =
obj
.lcore_id;
22
j[
"src_ips"
] =
obj
.src_ips;
23
}
24
25
inline
void
from_json
(
const
data_t& j,
Core
&
obj
) {
26
if
(j.contains(
"lcore_id"
))
27
j.at(
"lcore_id"
).get_to(
obj
.lcore_id);
28
if
(j.contains(
"src_ips"
))
29
j.at(
"src_ips"
).get_to(
obj
.src_ips);
30
}
31
32
inline
void
to_json
(data_t& j,
const
Conf
&
obj
) {
33
j[
"card_id"
] =
obj
.card_id;
34
j[
"eal_arg_list"
] =
obj
.eal_arg_list;
35
j[
"frontend_type"
] =
obj
.frontend_type;
36
j[
"number_of_cores"
] =
obj
.number_of_cores;
37
j[
"number_of_ips_per_core"
] =
obj
.number_of_ips_per_core;
38
j[
"burst_size"
] =
obj
.burst_size;
39
j[
"rate"
] =
obj
.rate;
40
j[
"core_list"
] =
obj
.core_list;
41
j[
"time_tick_difference"
] =
obj
.time_tick_difference;
42
}
43
44
inline
void
from_json
(
const
data_t& j,
Conf
&
obj
) {
45
if
(j.contains(
"card_id"
))
46
j.at(
"card_id"
).get_to(
obj
.card_id);
47
if
(j.contains(
"eal_arg_list"
))
48
j.at(
"eal_arg_list"
).get_to(
obj
.eal_arg_list);
49
if
(j.contains(
"frontend_type"
))
50
j.at(
"frontend_type"
).get_to(
obj
.frontend_type);
51
if
(j.contains(
"number_of_cores"
))
52
j.at(
"number_of_cores"
).get_to(
obj
.number_of_cores);
53
if
(j.contains(
"number_of_ips_per_core"
))
54
j.at(
"number_of_ips_per_core"
).get_to(
obj
.number_of_ips_per_core);
55
if
(j.contains(
"burst_size"
))
56
j.at(
"burst_size"
).get_to(
obj
.burst_size);
57
if
(j.contains(
"rate"
))
58
j.at(
"rate"
).get_to(
obj
.rate);
59
if
(j.contains(
"core_list"
))
60
j.at(
"core_list"
).get_to(
obj
.core_list);
61
if
(j.contains(
"time_tick_difference"
))
62
j.at(
"time_tick_difference"
).get_to(
obj
.time_tick_difference);
63
}
64
65
}
// namespace dunedaq::dpdklibs::nicsender
66
67
#endif
// DUNEDAQ_DPDKLIBS_NICSENDER_NLJS_HPP
Structs.hpp
dunedaq::dpdklibs::nicsender
Definition
Nljs.hpp:16
dunedaq::dpdklibs::nicsender::from_json
void from_json(const data_t &j, Core &obj)
Definition
Nljs.hpp:25
dunedaq::dpdklibs::nicsender::to_json
void to_json(data_t &j, const Core &obj)
Definition
Nljs.hpp:20
dunedaq::obj
msgpack::object obj
Definition
Serialization.hpp:257
dunedaq::dpdklibs::nicsender::Conf
Definition
Structs.hpp:58
dunedaq::dpdklibs::nicsender::Core
Definition
Structs.hpp:44
Generated on Sat Aug 23 2025 for DUNE-DAQ by
1.12.0