8#include "nlohmann/json.hpp"
21 file_name <<
" is an invalid name for the opmon output",
22 ((std::string)file_name))
32 "The
control service has not been
set up for the application " + app_name +
33 " you need to define a service called which has a name finishing with \'_control\'",
34 , ((
std::
string)app_name)
39 "The
control service has been defined multiple times for the application " +
40 app_name + " you need to define only one service called
control",
41 , ((
std::
string)app_name)
82 unsigned long rlevel = 10,
83 const std::vector<std::string> *rclasses =
nullptr);
87 bool multi_value, nlohmann::json &attributes) {
91 attributes[name] = value;
93 std::vector<T> value_vector;
94 obj.get(name, value_vector);
95 attributes[name] = nlohmann::json(value_vector);
106 for (
auto const *as : app->get_exposes_service()) {
107 if (as->UID().ends_with(
"_control")) {
110 control_service = as;
114 if (control_service ==
nullptr)
115 throw NoControlServiceDefined(
ERS_HERE, app->UID());
117 const std::string control_uri = control_service->
get_protocol() +
"://" +
118 app->get_runs_on()->get_runs_on()->UID() +
120 std::to_string(control_service->
get_port());
122 const std::string configuration_uri = confdb.
get_impl_spec();
131 "--configurationService",
141 ((
std::
string)message))
144 "Failed to retrieve information for Application \'"
145 << app_id << "\' from the database: " << message,
146 , ((
std::
string)app_id)((
std::
string)message))
149 "There is no
session object with UID = \"" << name
151 , ((
std::
string)name))
155 "Cannot get information about applications because the segment is disabled",
159 "Failed to retrieve information for Program \'"
160 << prog_id << "\' from the database: " << message,
161 , ((
std::
string)prog_id)((
std::
string)message))
164 "Failed to retrieve application \'"
165 << app_id << "\' from the database: " << message,
166 , ((
std::
string)app_id)((
std::
string)message))
169 "Failed to
find default host for segment \'"
170 << seg_id << "\' " << message,
171 , ((
std::
string)seg_id)((
std::
string)message))
175 "Both
session default and segment default hosts are not defined for "
176 "template application \'"
177 << app_id << "\' from segment \'" << seg_id
178 << "\' (will use localhost, that may cause problems presenting info in "
179 "IGUI for distributed
session).",
180 , ((
std::
string)app_id)((
std::
string)seg_id))
183 "Failed to use tag \'" << tag_id
184 << "\' because: " << message,
185 , ((
std::
string)tag_id)((
std::
string)message))
188 "Invalid Segment \'" << seg_id
189 << "\' because: " << message,
190 , ((
std::
string)seg_id)((
std::
string)message))
194 "Failed to get template applications of \'"
195 << name << "\' segment" << message,
196 , ((
std::
string)name)((
std::
string)message))
200 << name << "\': " << message,
201 , ((
std::
string)name)((
std::
string)message))
204 "Failed to get application
object from name: " << reason,
205 , ((
std::
string)reason))
208 "Failed to
find segment
object \'" << name
210 , ((
std::
string)name)((
std::
string)reason))
213 "The " << item << "
object " << obj
215 , ((const
char *)item)((
void *)obj))
218 "The " << obj_id << '@' << obj_class << "
object "
223 ((
std::
string)obj_id)((
std::
string)obj_class)(
224 (
void *)
address)((const
char *)algo))
227 "Failed to create config for segment \'"
228 << name << "\': " << reason,
229 , ((
std::
string)name)((
std::
string)reason))
232 "Failed to get parents of \'" <<
object << '\'', ,
233 ((
std::
string)
object))
237 "Reach maximum allowed recursion ("
238 << limit << ") during calculation of " << goal
239 << "; possibly there is circular dependency between these objects: "
241 , ((
unsigned int)limit)((const
char *)goal)((
std::
string)objects))
245 "Cannot
find jar file \'" << file << "\' described by \'" << obj_id << '@'
246 << obj_class << "\' that is part of \'" << rep_id
247 << '@' << rep_class << '\'',
249 ((
std::
string)file)((
std::
string)obj_id)((
std::
string)obj_class)(
250 (
std::
string)rep_id)((
std::
string)rep_class))
253 "Two applications have equal IDs:\n 1) "
254 << first << "\n 2) " << second,
255 , ((
std::
string)first)((
std::
string)second))
259 "The segment \"" << segment << "\" is included by:\n 1) " << first
260 << "\n 2) " << second,
261 , ((
std::
string)segment)((
std::
string)first)((
std::
string)second))
#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)
Defines base class for cache of template objects.
const std::string & get_impl_spec() const noexcept
const std::string & get_protocol() const
Get "protocol" attribute value.
uint16_t get_port() const
Get "port" attribute value.
const std::vector< std::string > construct_commandline_parameters_appfwk(const T *app, const conffwk::Configuration &confdb, const dunedaq::confmodel::Session *session)
const dunedaq::confmodel::Session * get_session(dunedaq::conffwk::Configuration &conf, const std::string &name, unsigned long rlevel=10, const std::vector< std::string > *rclasses=nullptr)
Get session object.
void add_json_value(conffwk::ConfigObject &obj, std::string &name, bool multi_value, nlohmann::json &attributes)
The opmon infrastructure has not been set up in the DuplicatedControlService
init Command received when already initialized
The opmon infrastructure has not been set up in the The control service has been defined multiple times for the application app_name you need to define only one service called control
Monitoring thread not set
The opmon infrastructure has not been set up in the configuration