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::appfwk::cmd to be serialized via nlohmann::json.
6 */
7#ifndef DUNEDAQ_APPFWK_CMD_NLJS_HPP
8#define DUNEDAQ_APPFWK_CMD_NLJS_HPP
9
10// My structs
12
13// Nljs for externally referenced schema
14#include "cmdlib/cmd/Nljs.hpp"
15
16#include <nlohmann/json.hpp>
17
19
20using data_t = nlohmann::json;
21
22inline void
24{
25 j["match"] = obj.match;
26 j["data"] = obj.data;
27}
28
29inline void
31{
32 if (j.contains("match"))
33 j.at("match").get_to(obj.match);
34 if (j.contains("data"))
35 j.at("data").get_to(obj.data);
36}
37
38inline void
40{
41 j["modules"] = obj.modules;
42}
43
44inline void
46{
47 if (j.contains("modules"))
48 j.at("modules").get_to(obj.modules);
49}
50
51} // namespace dunedaq::appfwk::cmd
52
53#endif // DUNEDAQ_APPFWK_CMD_NLJS_HPP
void to_json(data_t &j, const AddressedCmd &obj)
Definition Nljs.hpp:23
void from_json(const data_t &j, AddressedCmd &obj)
Definition Nljs.hpp:30
nlohmann::json data_t
Definition Nljs.hpp:20
msgpack::object obj