DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
rcif
include
rcif
cmd
Structs.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 struct and other type definitions for shema in
5
* namespace dunedaq::rcif::cmd.
6
*/
7
#ifndef DUNEDAQ_RCIF_CMD_STRUCTS_HPP
8
#define DUNEDAQ_RCIF_CMD_STRUCTS_HPP
9
10
#include "
cmdlib/cmd/Structs.hpp
"
11
#include <cstdint>
12
13
#include <string>
14
15
namespace
dunedaq::rcif::cmd
{
16
17
// @brief The name (unique ID) of an app
18
using
AppId
= std::string;
19
20
// @brief Trigger rate in Hz
21
using
TrgRate
= double;
22
23
// @brief
24
struct
ChangeRateParams
25
{
26
27
// @brief Trigger rate in Hz
28
TrgRate
trigger_rate
= 1.0;
29
};
30
31
// @brief
32
struct
DisableParams
33
{
34
35
// @brief Which resource was deactivated
36
AppId
resource_name
=
""
;
37
};
38
39
// @brief
40
struct
EnableParams
41
{
42
43
// @brief Which resource was reactivated
44
AppId
resource_name
=
""
;
45
};
46
47
// @brief String for the state name
48
using
State
= std::string;
49
50
// @brief Top-level run control command object structure
51
struct
RCCommand
52
{
53
54
// @brief Identify the type of command
55
cmdlib::cmd::CmdId
id
=
""
;
56
57
// @brief State at which the command is issued
58
State
entry_state
=
"ANY"
;
59
60
// @brief State after the successful exectution of the command
61
State
exit_state
=
"ANY"
;
62
63
// @brief Command data object with type-specific structure
64
cmdlib::cmd::Data
data
= {};
65
};
66
67
// @brief Run Number
68
using
RunNumber
= uint64_t;
// NOLINT
69
70
// @brief Boolean flag to disable storage
71
using
StorageDisabled
=
bool
;
72
73
// @brief
74
struct
StartParams
75
{
76
77
// @brief Run Number
78
RunNumber
run
= 0;
79
80
// @brief Bool to disable storage. True = storage disabled
81
StorageDisabled
disable_data_storage
=
false
;
82
83
// @brief Generated fake trigger rate Hz.
84
TrgRate
trigger_rate
= 0.0;
85
86
// @brief Indicator of Production vs. Test running.
87
State
production_vs_test
=
"TEST"
;
88
};
89
90
}
// namespace dunedaq::rcif::cmd
91
92
#endif
// DUNEDAQ_RCIF_CMD_STRUCTS_HPP
Structs.hpp
dunedaq::cmdlib::cmd::Data
nlohmann::json Data
Definition
Structs.hpp:24
dunedaq::cmdlib::cmd::CmdId
std::string CmdId
Definition
Structs.hpp:21
dunedaq::rcif::cmd
Definition
Nljs.hpp:18
dunedaq::rcif::cmd::StorageDisabled
bool StorageDisabled
Definition
Structs.hpp:71
dunedaq::rcif::cmd::AppId
std::string AppId
Definition
Structs.hpp:18
dunedaq::rcif::cmd::TrgRate
double TrgRate
Definition
Structs.hpp:21
dunedaq::rcif::cmd::RunNumber
uint64_t RunNumber
Definition
Structs.hpp:68
dunedaq::rcif::cmd::State
std::string State
Definition
Structs.hpp:48
dunedaq::bool
Unknown serialization type<< t,((char) t)) template< typename T > inline std::string datatype_to_string() { return "Unknown";} namespace serialization { template< typename T > struct is_serializable :std::false_type {};enum SerializationType { kMsgPack };inline SerializationType from_string(const std::string s) { if(s=="msgpack") return kMsgPack;throw UnknownSerializationTypeString(ERS_HERE, s);} constexpr uint8_t serialization_type_byte(SerializationType stype) { switch(stype) { case kMsgPack:return 'M';default:throw UnknownSerializationTypeEnum(ERS_HERE);} } constexpr SerializationType DEFAULT_SERIALIZATION_TYPE=kMsgPack;template< class T > std::vector< uint8_t > serialize(const T &obj, SerializationType stype=DEFAULT_SERIALIZATION_TYPE) { switch(stype) { case kMsgPack:{ msgpack::sbuffer buf;msgpack::pack(buf, obj);std::vector< uint8_t > ret(buf.size()+1);ret[0]=serialization_type_byte(stype);std::copy(buf.data(), buf.data()+buf.size(), ret.begin()+1);return ret;} default:throw UnknownSerializationTypeEnum(ERS_HERE);} } template< class T, typename CharType=unsigned char > T deserialize(const std::vector< CharType > &v) { switch(v[0]) { case serialization_type_byte(kMsgPack):{ try { msgpack::object_handle oh=msgpack::unpack(const_cast< char * >(reinterpret_cast< const char * >(v.data()+1)), v.size() - 1,[](msgpack::type::object_type, std::size_t, void *) -> bool
Definition
Serialization.hpp:251
dunedaq::rcif::cmd::ChangeRateParams
Definition
Structs.hpp:25
dunedaq::rcif::cmd::ChangeRateParams::trigger_rate
TrgRate trigger_rate
Definition
Structs.hpp:28
dunedaq::rcif::cmd::DisableParams
Definition
Structs.hpp:33
dunedaq::rcif::cmd::DisableParams::resource_name
AppId resource_name
Definition
Structs.hpp:36
dunedaq::rcif::cmd::EnableParams
Definition
Structs.hpp:41
dunedaq::rcif::cmd::EnableParams::resource_name
AppId resource_name
Definition
Structs.hpp:44
dunedaq::rcif::cmd::RCCommand
Definition
Structs.hpp:52
dunedaq::rcif::cmd::RCCommand::exit_state
State exit_state
Definition
Structs.hpp:61
dunedaq::rcif::cmd::RCCommand::entry_state
State entry_state
Definition
Structs.hpp:58
dunedaq::rcif::cmd::RCCommand::data
cmdlib::cmd::Data data
Definition
Structs.hpp:64
dunedaq::rcif::cmd::StartParams
Definition
Structs.hpp:75
dunedaq::rcif::cmd::StartParams::run
RunNumber run
Definition
Structs.hpp:78
dunedaq::rcif::cmd::StartParams::disable_data_storage
StorageDisabled disable_data_storage
Definition
Structs.hpp:81
dunedaq::rcif::cmd::StartParams::trigger_rate
TrgRate trigger_rate
Definition
Structs.hpp:84
dunedaq::rcif::cmd::StartParams::production_vs_test
State production_vs_test
Definition
Structs.hpp:87
Generated on
for DUNE-DAQ by
1.18.0