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

Classes

struct  ChangeRateParams
struct  DisableParams
struct  EnableParams
struct  RCCommand
struct  StartParams

Typedefs

using data_t = nlohmann::json
using AppId = std::string
using TrgRate = double
using State = std::string
using RunNumber = uint64_t
using StorageDisabled = bool

Functions

void to_json (data_t &j, const ChangeRateParams &obj)
void from_json (const data_t &j, ChangeRateParams &obj)
void to_json (data_t &j, const DisableParams &obj)
void from_json (const data_t &j, DisableParams &obj)
void to_json (data_t &j, const EnableParams &obj)
void from_json (const data_t &j, EnableParams &obj)
void to_json (data_t &j, const RCCommand &obj)
void from_json (const data_t &j, RCCommand &obj)
void to_json (data_t &j, const StartParams &obj)
void from_json (const data_t &j, StartParams &obj)

Typedef Documentation

◆ AppId

using dunedaq::rcif::cmd::AppId = std::string

Definition at line 18 of file Structs.hpp.

◆ data_t

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

Definition at line 20 of file Nljs.hpp.

◆ RunNumber

Definition at line 68 of file Structs.hpp.

◆ State

using dunedaq::rcif::cmd::State = std::string

Definition at line 48 of file Structs.hpp.

◆ StorageDisabled

Definition at line 71 of file Structs.hpp.

◆ TrgRate

Definition at line 21 of file Structs.hpp.

Function Documentation

◆ from_json() [1/5]

void dunedaq::rcif::cmd::from_json ( const data_t & j,
ChangeRateParams & obj )
inline

Definition at line 29 of file Nljs.hpp.

30{
31 if (j.contains("trigger_rate"))
32 j.at("trigger_rate").get_to(obj.trigger_rate);
33}
msgpack::object obj

◆ from_json() [2/5]

void dunedaq::rcif::cmd::from_json ( const data_t & j,
DisableParams & obj )
inline

Definition at line 42 of file Nljs.hpp.

43{
44 if (j.contains("resource_name"))
45 j.at("resource_name").get_to(obj.resource_name);
46}

◆ from_json() [3/5]

void dunedaq::rcif::cmd::from_json ( const data_t & j,
EnableParams & obj )
inline

Definition at line 55 of file Nljs.hpp.

56{
57 if (j.contains("resource_name"))
58 j.at("resource_name").get_to(obj.resource_name);
59}

◆ from_json() [4/5]

void dunedaq::rcif::cmd::from_json ( const data_t & j,
RCCommand & obj )
inline

Definition at line 71 of file Nljs.hpp.

72{
73 if (j.contains("id"))
74 j.at("id").get_to(obj.id);
75 if (j.contains("entry_state"))
76 j.at("entry_state").get_to(obj.entry_state);
77 if (j.contains("exit_state"))
78 j.at("exit_state").get_to(obj.exit_state);
79 if (j.contains("data"))
80 j.at("data").get_to(obj.data);
81}

◆ from_json() [5/5]

void dunedaq::rcif::cmd::from_json ( const data_t & j,
StartParams & obj )
inline

Definition at line 93 of file Nljs.hpp.

94{
95 if (j.contains("run"))
96 j.at("run").get_to(obj.run);
97 if (j.contains("disable_data_storage"))
98 j.at("disable_data_storage").get_to(obj.disable_data_storage);
99 if (j.contains("trigger_rate"))
100 j.at("trigger_rate").get_to(obj.trigger_rate);
101 if (j.contains("production_vs_test"))
102 j.at("production_vs_test").get_to(obj.production_vs_test);
103}

◆ to_json() [1/5]

void dunedaq::rcif::cmd::to_json ( data_t & j,
const ChangeRateParams & obj )
inline

Definition at line 23 of file Nljs.hpp.

24{
25 j["trigger_rate"] = obj.trigger_rate;
26}

◆ to_json() [2/5]

void dunedaq::rcif::cmd::to_json ( data_t & j,
const DisableParams & obj )
inline

Definition at line 36 of file Nljs.hpp.

37{
38 j["resource_name"] = obj.resource_name;
39}

◆ to_json() [3/5]

void dunedaq::rcif::cmd::to_json ( data_t & j,
const EnableParams & obj )
inline

Definition at line 49 of file Nljs.hpp.

50{
51 j["resource_name"] = obj.resource_name;
52}

◆ to_json() [4/5]

void dunedaq::rcif::cmd::to_json ( data_t & j,
const RCCommand & obj )
inline

Definition at line 62 of file Nljs.hpp.

63{
64 j["id"] = obj.id;
65 j["entry_state"] = obj.entry_state;
66 j["exit_state"] = obj.exit_state;
67 j["data"] = obj.data;
68}

◆ to_json() [5/5]

void dunedaq::rcif::cmd::to_json ( data_t & j,
const StartParams & obj )
inline

Definition at line 84 of file Nljs.hpp.

85{
86 j["run"] = obj.run;
87 j["disable_data_storage"] = obj.disable_data_storage;
88 j["trigger_rate"] = obj.trigger_rate;
89 j["production_vs_test"] = obj.production_vs_test;
90}