DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::appfwk::cmd Namespace Reference

Classes

struct  AddressedCmd
struct  CmdObj

Typedefs

using data_t = nlohmann::json
using Match = std::string
using AddressedCmds = std::vector<dunedaq::appfwk::cmd::AddressedCmd>

Functions

void to_json (data_t &j, const AddressedCmd &obj)
void from_json (const data_t &j, AddressedCmd &obj)
void to_json (data_t &j, const CmdObj &obj)
void from_json (const data_t &j, CmdObj &obj)

Typedef Documentation

◆ AddressedCmds

◆ data_t

using dunedaq::appfwk::cmd::data_t = nlohmann::json

Definition at line 20 of file Nljs.hpp.

◆ Match

using dunedaq::appfwk::cmd::Match = std::string

Definition at line 19 of file Structs.hpp.

Function Documentation

◆ from_json() [1/2]

void dunedaq::appfwk::cmd::from_json ( const data_t & j,
AddressedCmd & obj )
inline

Definition at line 30 of file Nljs.hpp.

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}
msgpack::object obj

◆ from_json() [2/2]

void dunedaq::appfwk::cmd::from_json ( const data_t & j,
CmdObj & obj )
inline

Definition at line 45 of file Nljs.hpp.

46{
47 if (j.contains("modules"))
48 j.at("modules").get_to(obj.modules);
49}

◆ to_json() [1/2]

void dunedaq::appfwk::cmd::to_json ( data_t & j,
const AddressedCmd & obj )
inline

Definition at line 23 of file Nljs.hpp.

24{
25 j["match"] = obj.match;
26 j["data"] = obj.data;
27}

◆ to_json() [2/2]

void dunedaq::appfwk::cmd::to_json ( data_t & j,
const CmdObj & obj )
inline

Definition at line 39 of file Nljs.hpp.

40{
41 j["modules"] = obj.modules;
42}