DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
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 <cstdint>
12
13#include <string>
14
15namespace 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
24 // @brief
26 {
27
28 // @brief Trigger rate in Hz
30 };
31
32 // @brief
34 {
35
36 // @brief Which resource was deactivated
38 };
39
40 // @brief
42 {
43
44 // @brief Which resource was reactivated
46 };
47
48 // @brief String for the state name
49 using State = std::string;
50
51 // @brief Top-level run control command object structure
52 struct RCCommand
53 {
54
55 // @brief Identify the type of command
57
58 // @brief State at which the command is issued
60
61 // @brief State after the successful exectution of the command
63
64 // @brief Command data object with type-specific structure
66 };
67
68 // @brief Run Number
69 using RunNumber = uint64_t; // NOLINT
70
71
72 // @brief Boolean flag to disable storage
74
75 // @brief
77 {
78
79 // @brief Run Number
81
82 // @brief Bool to disable storage. True = storage disabled
84
85 // @brief Generated fake trigger rate Hz.
87
88 // @brief Indicator of Production vs. Test running.
90 };
91
92} // namespace dunedaq::rcif::cmd
93
94#endif // DUNEDAQ_RCIF_CMD_STRUCTS_HPP
nlohmann::json Data
Definition Structs.hpp:24
std::string CmdId
Definition Structs.hpp:21
std::string AppId
Definition Structs.hpp:18
uint64_t RunNumber
Definition Structs.hpp:69
std::string State
Definition Structs.hpp:49
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
cmdlib::cmd::Data data
Definition Structs.hpp:65
StorageDisabled disable_data_storage
Definition Structs.hpp:83