DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
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::listrev::listreverser to be serialized via nlohmann::json.
6 */
7#ifndef DUNEDAQ_LISTREV_LISTREVERSER_NLJS_HPP
8#define DUNEDAQ_LISTREV_LISTREVERSER_NLJS_HPP
9
10// My structs
12
13
14#include <nlohmann/json.hpp>
15
17
18 using data_t = nlohmann::json;
19
20 inline void to_json(data_t& j, const ConfParams& obj) {
21 j["send_timeout_ms"] = obj.send_timeout_ms;
22 j["request_timeout_ms"] = obj.request_timeout_ms;
23 j["num_generators"] = obj.num_generators;
24 j["reverser_id"] = obj.reverser_id;
25 }
26
27 inline void from_json(const data_t& j, ConfParams& obj) {
28 if (j.contains("send_timeout_ms"))
29 j.at("send_timeout_ms").get_to(obj.send_timeout_ms);
30 if (j.contains("request_timeout_ms"))
31 j.at("request_timeout_ms").get_to(obj.request_timeout_ms);
32 if (j.contains("num_generators"))
33 j.at("num_generators").get_to(obj.num_generators);
34 if (j.contains("reverser_id"))
35 j.at("reverser_id").get_to(obj.reverser_id);
36 }
37
38} // namespace dunedaq::listrev::listreverser
39
40#endif // DUNEDAQ_LISTREV_LISTREVERSER_NLJS_HPP
void from_json(const data_t &j, ConfParams &obj)
Definition Nljs.hpp:27
void to_json(data_t &j, const ConfParams &obj)
Definition Nljs.hpp:20