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
11#include <cstdint>
12
13#include <string>
14
15namespace dunedaq::rcif::cmd {
16
17// @brief The name (unique ID) of an app
18using AppId = std::string;
19
20// @brief Trigger rate in Hz
21using TrgRate = double;
22
23// @brief
25{
26
27 // @brief Trigger rate in Hz
29};
30
31// @brief
33{
34
35 // @brief Which resource was deactivated
37};
38
39// @brief
41{
42
43 // @brief Which resource was reactivated
45};
46
47// @brief String for the state name
48using State = std::string;
49
50// @brief Top-level run control command object structure
52{
53
54 // @brief Identify the type of command
56
57 // @brief State at which the command is issued
59
60 // @brief State after the successful exectution of the command
62
63 // @brief Command data object with type-specific structure
65};
66
67// @brief Run Number
68using RunNumber = uint64_t; // NOLINT
69
70// @brief Boolean flag to disable storage
72
73// @brief
75{
76
77 // @brief Run Number
79
80 // @brief Bool to disable storage. True = storage disabled
82
83 // @brief Generated fake trigger rate Hz.
85
86 // @brief Indicator of Production vs. Test running.
88};
89
90} // namespace dunedaq::rcif::cmd
91
92#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:68
std::string State
Definition Structs.hpp:48
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:64
StorageDisabled disable_data_storage
Definition Structs.hpp:81