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::randomdatalistgenerator to be serialized via nlohmann::json.
6 */
7#ifndef DUNEDAQ_LISTREV_RANDOMDATALISTGENERATOR_NLJS_HPP
8#define DUNEDAQ_LISTREV_RANDOMDATALISTGENERATOR_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["generator_id"] = obj.generator_id;
24 }
25
26 inline void from_json(const data_t& j, ConfParams& obj) {
27 if (j.contains("send_timeout_ms"))
28 j.at("send_timeout_ms").get_to(obj.send_timeout_ms);
29 if (j.contains("request_timeout_ms"))
30 j.at("request_timeout_ms").get_to(obj.request_timeout_ms);
31 if (j.contains("generator_id"))
32 j.at("generator_id").get_to(obj.generator_id);
33 }
34
35} // namespace dunedaq::listrev::randomdatalistgenerator
36
37#endif // DUNEDAQ_LISTREV_RANDOMDATALISTGENERATOR_NLJS_HPP
void from_json(const data_t &j, ConfParams &obj)
Definition Nljs.hpp:26
void to_json(data_t &j, const ConfParams &obj)
Definition Nljs.hpp:20