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 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.

◆ RunNumber

Definition at line 69 of file Structs.hpp.

◆ State

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

Definition at line 49 of file Structs.hpp.

◆ StorageDisabled

Definition at line 73 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 26 of file Nljs.hpp.

26 {
27 if (j.contains("trigger_rate"))
28 j.at("trigger_rate").get_to(obj.trigger_rate);
29 }

◆ from_json() [2/5]

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

Definition at line 35 of file Nljs.hpp.

35 {
36 if (j.contains("resource_name"))
37 j.at("resource_name").get_to(obj.resource_name);
38 }

◆ from_json() [3/5]

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

Definition at line 44 of file Nljs.hpp.

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

◆ from_json() [4/5]

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

Definition at line 56 of file Nljs.hpp.

56 {
57 if (j.contains("id"))
58 j.at("id").get_to(obj.id);
59 if (j.contains("entry_state"))
60 j.at("entry_state").get_to(obj.entry_state);
61 if (j.contains("exit_state"))
62 j.at("exit_state").get_to(obj.exit_state);
63 if (j.contains("data"))
64 j.at("data").get_to(obj.data);
65 }

◆ from_json() [5/5]

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

Definition at line 74 of file Nljs.hpp.

74 {
75 if (j.contains("run"))
76 j.at("run").get_to(obj.run);
77 if (j.contains("disable_data_storage"))
78 j.at("disable_data_storage").get_to(obj.disable_data_storage);
79 if (j.contains("trigger_rate"))
80 j.at("trigger_rate").get_to(obj.trigger_rate);
81 if (j.contains("production_vs_test"))
82 j.at("production_vs_test").get_to(obj.production_vs_test);
83 }

◆ to_json() [1/5]

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

Definition at line 22 of file Nljs.hpp.

22 {
23 j["trigger_rate"] = obj.trigger_rate;
24 }

◆ to_json() [2/5]

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

Definition at line 31 of file Nljs.hpp.

31 {
32 j["resource_name"] = obj.resource_name;
33 }

◆ to_json() [3/5]

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

Definition at line 40 of file Nljs.hpp.

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

◆ to_json() [4/5]

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

Definition at line 49 of file Nljs.hpp.

49 {
50 j["id"] = obj.id;
51 j["entry_state"] = obj.entry_state;
52 j["exit_state"] = obj.exit_state;
53 j["data"] = obj.data;
54 }

◆ to_json() [5/5]

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

Definition at line 67 of file Nljs.hpp.

67 {
68 j["run"] = obj.run;
69 j["disable_data_storage"] = obj.disable_data_storage;
70 j["trigger_rate"] = obj.trigger_rate;
71 j["production_vs_test"] = obj.production_vs_test;
72 }