DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TdeAmcDetDataSender.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _TdeAmcDetDataSender_0_dunedaq__appmodel_0_appmodel_H_
4#define _TdeAmcDetDataSender_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 // include files for classes used in inheritance hierarchy
17
19
20 // forward declaration for classes used in relationships and algorithms
21
22namespace dunedaq {
23 namespace confmodel {
24 class NetworkInterface;
25 }
26}
27
28
29namespace dunedaq {
30 namespace appmodel {
31
33
34 friend class conffwk::Configuration;
35 friend class conffwk::DalObject;
36 friend class conffwk::DalFactory;
37 friend class conffwk::DalRegistry;
38
39 protected:
40
42 virtual ~TdeAmcDetDataSender() noexcept;
43 virtual void init(bool init_children);
44
45 public:
46
49 static const std::string& s_class_name;
50
51
61 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
62
63
73 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
74
75
76 protected:
77
78 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
79
80
81 private:
82
83 uint32_t m_port;
84 std::string m_control_host;
85 const dunedaq::confmodel::NetworkInterface* m_control_endpoint;
86
87
88 public:
89
90 // attribute names
91
92 inline static const std::string s_port = "port";
93 inline static const std::string s_control_host = "control_host";
94
95 static const std::string& __get_port_str() noexcept { return s_port; }
96 static const std::string& __get_control_host_str() noexcept { return s_control_host; }
97
98
105 uint32_t
106 get_port() const
107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
111 return m_port;
112 }
113
120 void
121 set_port(uint32_t value)
122 {
123 std::lock_guard scoped_lock(m_mutex);
124 check();
125 clear();
126 p_obj.set_by_val(s_port, value);
127 }
128
129
136 const std::string&
138 {
139 std::lock_guard scoped_lock(m_mutex);
140 check();
141 check_init();
142 return m_control_host;
143 }
144
151 void
152 set_control_host(const std::string& value)
153 {
154 std::lock_guard scoped_lock(m_mutex);
155 check();
156 clear();
158 }
159
160
161 // relationship names
162
163 inline static const std::string s_control_endpoint = "control_endpoint";
164
165 static const std::string& __get_control_endpoint_str() noexcept { return s_control_endpoint; }
166
167
176 {
177 std::lock_guard scoped_lock(m_mutex);
178 check();
179 check_init();
181 {
182 std::ostringstream text;
183 text << "relationship \"" << s_control_endpoint << "\" of object " << this << " is not set";
184 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
185 }
186 return m_control_endpoint;
187 }
188
189
196 void
198
199 };
200
201 // out stream operator
202
203 inline std::ostream& operator<<(std::ostream& s, const TdeAmcDetDataSender& obj)
204 {
205 return obj.print_object(s);
206 }
207
208 typedef std::vector<const TdeAmcDetDataSender*>::const_iterator TdeAmcDetDataSenderIterator;
209
210 }
211}
212
213#endif
#define ERS_HERE
void set_control_endpoint(const dunedaq::confmodel::NetworkInterface *value)
Set "control_endpoint" relationship value.
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 dunedaq::confmodel::NetworkInterface * m_control_endpoint
static const std::string & __get_control_endpoint_str() noexcept
const std::string & get_control_host() const
Get "control_host" attribute value.
TdeAmcDetDataSender(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_control_host_str() noexcept
void set_port(uint32_t value)
Set "port" attribute value.
uint32_t get_port() const
Get "port" attribute value.
const dunedaq::confmodel::NetworkInterface * get_control_endpoint() const
Get "control_endpoint" relationship value.
static const std::string & __get_port_str() noexcept
void set_control_host(const std::string &value)
Set "control_host" attribute value.
virtual void init(bool init_children)
void set_by_val(const std::string &name, T value)
Set attribute value.
void set_by_ref(const std::string &name, T &value)
Set attribute 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< constTdeAmcDetDataSender * >::const_iterator TdeAmcDetDataSenderIterator
Including Qt Headers.