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::cmdlib::cmd.
6 */
7#ifndef DUNEDAQ_CMDLIB_CMD_STRUCTS_HPP
8#define DUNEDAQ_CMDLIB_CMD_STRUCTS_HPP
9
10#include <cstdint>
11
12#include <nlohmann/json.hpp>
13#include <string>
14
15namespace dunedaq::cmdlib::cmd {
16
17 // @brief The aplication name.
18 using AppId = std::string;
19
20 // @brief The command name. FIXME: this should be an enum!
21 using CmdId = std::string;
22
23 // @brief An opaque object holding lower layer substructure
24 using Data = nlohmann::json;
25
26 // @brief Top-level command object structure
27 struct Command
28 {
29
30 // @brief Identify the type of command
31 CmdId id = "";
32
33 // @brief Command data object with type-specific structure
34 Data data = {};
35 };
36
37 // @brief Outcome of the command: OK=true, NotOK=false
38 using IsOk = bool;
39
40 // @brief The command name.
41 using Result = std::string;
42
43 // @brief Top-level command reply object structure
45 {
46
47 // @brief Outcome of the command: OK=true, NotOK=false
48 IsOk success = true;
49
50 // @brief Textual result of the command
52
53 // @brief Application name
54 AppId appname = "";
55
56 // @brief Command reply data object with type-specific structure
57 Data data = {};
58 };
59
60} // namespace dunedaq::cmdlib::cmd
61
62#endif // DUNEDAQ_CMDLIB_CMD_STRUCTS_HPP
nlohmann::json Data
Definition Structs.hpp:24
std::string Result
Definition Structs.hpp:41
std::string CmdId
Definition Structs.hpp:21
std::string AppId
Definition Structs.hpp:18