DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Issues.hpp
Go to the documentation of this file.
1
9#ifndef WIBMOD_INCLUDE_WIBMOD_ISSUES_HPP_
10#define WIBMOD_INCLUDE_WIBMOD_ISSUES_HPP_
11
12#include "appfwk/DAQModule.hpp"
13#include "ers/Issue.hpp"
14#include "logging/Logging.hpp" // NOTE: if ISSUES ARE DECLARED BEFORE include logging/Logging.hpp, TLOG_DEBUG<<issue wont work.
15
16#include <string>
17#include <iomanip>
18
19// NOLINTNEXTLINE(build/define_used)
20#define TLVL_ENTER_EXIT_METHODS 10
21// NOLINTNEXTLINE(build/define_used)
22#define TLVL_GENERATION 11
23// NOLINTNEXTLINE(build/define_used)
24#define TLVL_CANDIDATE 15
25
26namespace dunedaq {
27
29 UnreachableError,
30 appfwk::GeneralDAQModuleIssue,
31 "An unreachable part of the code has been reached.",
32 ((std::string)name),
34
37 appfwk::GeneralDAQModuleIssue,
38 "WIB " << name << " failed to configure. Additional information: " << info,
39 ((std::string)name),
40 ((std::string)info))
41
42// WIB1 Issues
43
45 InvalidPartitionNumber,
46 appfwk::GeneralDAQModuleIssue,
47 "partition_number must be 0-15, not: " << partition_number,
48 ((std::string)name),
49 ((int)partition_number))
50
52 WrongFirmwareMode,
53 appfwk::GeneralDAQModuleIssue,
54 "WIB Firmware setup in " << fw_mode << " readout mode but configure expects " << fw_expect,
55 ((std::string)name),
56 ((std::string)fw_mode) ((std::string)fw_expect) )
57
59 UnknownFirmwareMode,
60 appfwk::GeneralDAQModuleIssue,
61 "WIB Firmware setup in unknown readout mode",
62 ((std::string)name),
64
66 IncorrectFirmwareVersion,
67 appfwk::GeneralDAQModuleIssue,
68 type << " firmware version is "
69 << std::hex << std::setw(8) << std::setfill('0')
70 << fw_version
71 <<" but expected "
72 << std::hex << std::setw(8) << std::setfill('0')
73 << expected_fw_version
74 <<" version",
75 ((std::string)name),
76 ((std::string)type) ((uint32_t)fw_version) ((uint32_t)expected_fw_version))
77
79 BadDuplicationMode,
80 appfwk::GeneralDAQModuleIssue,
81 "WIB is set to duplicate data from links 1 and 2 to 3 and 4. This shouldn't happen!",
82 ((std::string)name),
84
86 WIBCommunicationError,
87 appfwk::GeneralDAQModuleIssue,
88 "WIB communication error:" << what,
89 ((std::string)name),
90 ((std::string)what))
91
93 UnhandledBUException,
94 appfwk::GeneralDAQModuleIssue,
95 "Unhandled BUException: " << what << " : " << description,
96 ((std::string)name),
97 ((std::string)what) ((std::string)description))
98
100 InvalidFEMBSetting,
101 appfwk::GeneralDAQModuleIssue,
102 message,
103 ((std::string)name),
104 ((std::string)message))
105
107 CommandFailed,
108 appfwk::GeneralDAQModuleIssue,
109 message,
110 ((std::string)name),
111 ((std::string)message))
112
114 CannotReadFromFEMB,
115 appfwk::GeneralDAQModuleIssue,
116 message,
117 ((std::string)name),
118 ((std::string)message))
119
120ERS_DECLARE_ISSUE(wibmod,
121 WaitingForAlignment,
122 "Waiting for alignment constants from PDTS",
123 ERS_EMPTY)
124
125ERS_DECLARE_ISSUE(wibmod,
126 WaitingForTimestamp,
127 "Waiting for timestamp from PDTS",
128 ERS_EMPTY)
129
130
131} // namespace dunedaq
132
133#endif // WIBMOD_INCLUDE_WIBMOD_ISSUES_HPP_
#define ERS_DECLARE_ISSUE_BASE(namespace_name, class_name, base_class_name, message, base_attributes, attributes)
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message, attributes)
#define ERS_EMPTY
Including Qt Headers.
ConfigurationFailed
Definition Issues.hpp:36