DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
NetworkConnectionDescriptor.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _NetworkConnectionDescriptor_0_dunedaq__appmodel_0_appmodel_H_
4#define _NetworkConnectionDescriptor_0_dunedaq__appmodel_0_appmodel_H_
5
6#include <stdint.h> // to define 64 bits types
7#include <iostream>
8#include <sstream>
9#include <string>
10#include <map>
11#include <vector>
12
14#include "conffwk/DalObject.hpp"
15
16
17 // forward declaration for classes used in relationships and algorithms
18
19namespace dunedaq {
20 namespace confmodel {
21 class Service;
22 }
23}
24
25
26namespace dunedaq {
27 namespace appmodel {
28
29 class NetworkConnectionDescriptor : public virtual dunedaq::conffwk::DalObject {
30
32 friend class conffwk::DalObject;
33 friend class conffwk::DalFactory;
35
36 protected:
37
39 virtual ~NetworkConnectionDescriptor() noexcept;
40 virtual void init(bool init_children);
41
42 public:
43
46 static const std::string& s_class_name;
47
48
58 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
59
60
70 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
71
72
73 protected:
74
75 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
76
77
78 private:
79
80 std::string m_uid_base;
84
85
86 public:
87
88 // attribute names
89
90 inline static const std::string s_uid_base = "uid_base";
91 inline static const std::string s_connection_type = "connection_type";
92 inline static const std::string s_data_type = "data_type";
93
94 static const std::string& __get_uid_base_str() noexcept { return s_uid_base; }
95 static const std::string& __get_connection_type_str() noexcept { return s_connection_type; }
96 static const std::string& __get_data_type_str() noexcept { return s_data_type; }
97
98
106 const std::string&
108 {
109 std::lock_guard scoped_lock(m_mutex);
110 check();
111 check_init();
112 return m_uid_base;
113 }
114
122 void
123 set_uid_base(const std::string& value)
124 {
125 std::lock_guard scoped_lock(m_mutex);
126 check();
127 clear();
129 }
130
131
136 struct Connection_type {
137 inline static const std::string KSendRecv = "kSendRecv";
138 inline static const std::string KPubSub = "kPubSub";
139 };
140
147 const std::string&
149 {
150 std::lock_guard scoped_lock(m_mutex);
151 check();
152 check_init();
153 return m_connection_type;
154 }
155
162 void
163 set_connection_type(const std::string& value)
164 {
165 std::lock_guard scoped_lock(m_mutex);
166 check();
167 clear();
169 }
170
171
179 const std::string&
181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
185 return m_data_type;
186 }
187
195 void
196 set_data_type(const std::string& value)
197 {
198 std::lock_guard scoped_lock(m_mutex);
199 check();
200 clear();
202 }
203
204
205 // relationship names
206
207 inline static const std::string s_associated_service = "associated_service";
208
209 static const std::string& __get_associated_service_str() noexcept { return s_associated_service; }
210
211
221 {
222 std::lock_guard scoped_lock(m_mutex);
223 check();
224 check_init();
226 {
227 std::ostringstream text;
228 text << "relationship \"" << s_associated_service << "\" of object " << this << " is not set";
229 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
230 }
232 }
233
234
242 void
244
245 };
246
247 // out stream operator
248
249 inline std::ostream& operator<<(std::ostream& s, const NetworkConnectionDescriptor& obj)
250 {
251 return obj.print_object(s);
252 }
253
254 typedef std::vector<const NetworkConnectionDescriptor*>::const_iterator NetworkConnectionDescriptorIterator;
255
256 }
257}
258
259#endif
#define ERS_HERE
NetworkConnectionDescriptor(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_data_type_str() noexcept
static const std::string & __get_uid_base_str() noexcept
static const std::string & __get_connection_type_str() noexcept
const std::string & get_connection_type() const
Get "connection_type" attribute value.
void set_associated_service(const dunedaq::confmodel::Service *value)
Set "associated_service" relationship value. Service provided by this connection.
const std::string & get_data_type() const
Get "data_type" attribute value. string identifying type of data transferred through this connection.
virtual std::vector< const dunedaq::conffwk::DalObject * > get(const std::string &name, bool upcast_unregistered=true) const
Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject...
const std::string & get_uid_base() const
Get "uid_base" attribute value. Base for UID string. To be combined with a source id.
void set_connection_type(const std::string &value)
Set "connection_type" attribute value.
static const std::string & __get_associated_service_str() noexcept
const dunedaq::confmodel::Service * get_associated_service() const
Get "associated_service" relationship value. Service provided by this connection.
void set_uid_base(const std::string &value)
Set "uid_base" attribute value. Base for UID string. To be combined with a source id.
void set_data_type(const std::string &value)
Set "data_type" attribute value. string identifying type of data transferred through this connection.
void set_by_ref(const std::string &name, T &value)
Set attribute value.
void set_enum(const std::string &name, const std::string &value)
Set attribute enumeration value.
The base class for any generated DAL object.
Definition DalObject.hpp:45
std::mutex m_mutex
Used to protect changes of DAL object.
ConfigObject p_obj
Config object used by given template object.
void check_init() const
Check and initialize object if necessary.
DalRegistry: A registry of DalObjects It provides a single interface to create, cache and manage DalO...
Generic configuration exception.
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constNetworkConnectionDescriptor * >::const_iterator NetworkConnectionDescriptorIterator
Including Qt Headers.