DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SNBTransferConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _SNBTransferConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _SNBTransferConf_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
17namespace dunedaq {
18 namespace appmodel {
19
21
22 friend class conffwk::Configuration;
23 friend class conffwk::DalObject;
24 friend class conffwk::DalFactory;
25 friend class conffwk::DalRegistry;
26
27 protected:
28
30 virtual ~SNBTransferConf() noexcept;
31 virtual void init(bool init_children);
32
33 public:
34
37 static const std::string& s_class_name;
38
39
49 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
50
51
61 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
62
63
64 protected:
65
66 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
67
68
69 private:
70
71 std::string m_client_ip;
72 std::string m_work_dir;
74 uint16_t m_timeout_send;
75 uint16_t m_timeout_receive;
76
77
78 public:
79
80 // attribute names
81
82 inline static const std::string s_client_ip = "client_ip";
83 inline static const std::string s_work_dir = "work_dir";
84 inline static const std::string s_connection_prefix = "connection_prefix";
85 inline static const std::string s_timeout_send = "timeout_send";
86 inline static const std::string s_timeout_receive = "timeout_receive";
87
88 static const std::string& __get_client_ip_str() noexcept { return s_client_ip; }
89 static const std::string& __get_work_dir_str() noexcept { return s_work_dir; }
90 static const std::string& __get_connection_prefix_str() noexcept { return s_connection_prefix; }
91 static const std::string& __get_timeout_send_str() noexcept { return s_timeout_send; }
92 static const std::string& __get_timeout_receive_str() noexcept { return s_timeout_receive; }
93
94
101 const std::string&
103 {
104 std::lock_guard scoped_lock(m_mutex);
105 check();
106 check_init();
107 return m_client_ip;
108 }
109
116 void
117 set_client_ip(const std::string& value)
118 {
119 std::lock_guard scoped_lock(m_mutex);
120 check();
121 clear();
123 }
124
125
132 const std::string&
134 {
135 std::lock_guard scoped_lock(m_mutex);
136 check();
137 check_init();
138 return m_work_dir;
139 }
140
147 void
148 set_work_dir(const std::string& value)
149 {
150 std::lock_guard scoped_lock(m_mutex);
151 check();
152 clear();
154 }
155
156
163 const std::string&
165 {
166 std::lock_guard scoped_lock(m_mutex);
167 check();
168 check_init();
169 return m_connection_prefix;
170 }
171
178 void
179 set_connection_prefix(const std::string& value)
180 {
181 std::lock_guard scoped_lock(m_mutex);
182 check();
183 clear();
185 }
186
187
194 uint16_t
196 {
197 std::lock_guard scoped_lock(m_mutex);
198 check();
199 check_init();
200 return m_timeout_send;
201 }
202
209 void
210 set_timeout_send(uint16_t value)
211 {
212 std::lock_guard scoped_lock(m_mutex);
213 check();
214 clear();
216 }
217
218
225 uint16_t
227 {
228 std::lock_guard scoped_lock(m_mutex);
229 check();
230 check_init();
231 return m_timeout_receive;
232 }
233
240 void
241 set_timeout_receive(uint16_t value)
242 {
243 std::lock_guard scoped_lock(m_mutex);
244 check();
245 clear();
247 }
248
249
250 };
251
252 // out stream operator
253
254 inline std::ostream& operator<<(std::ostream& s, const SNBTransferConf& obj)
255 {
256 return obj.print_object(s);
257 }
258
259 typedef std::vector<const SNBTransferConf*>::const_iterator SNBTransferConfIterator;
260
261 }
262}
263
264#endif
static const std::string & __get_timeout_receive_str() noexcept
static const std::string s_timeout_receive
static const std::string & __get_timeout_send_str() noexcept
static const std::string & s_class_name
static const std::string s_work_dir
virtual void init(bool init_children)
static const std::string s_timeout_send
static const std::string s_connection_prefix
const std::string & get_client_ip() const
Get "client_ip" attribute value.
void set_timeout_receive(uint16_t value)
Set "timeout_receive" attribute value.
void set_timeout_send(uint16_t value)
Set "timeout_send" attribute value.
static const std::string s_client_ip
uint16_t get_timeout_receive() const
Get "timeout_receive" attribute value.
virtual ~SNBTransferConf() noexcept
void set_work_dir(const std::string &value)
Set "work_dir" attribute value.
void set_connection_prefix(const std::string &value)
Set "connection_prefix" attribute value.
const std::string & get_connection_prefix() const
Get "connection_prefix" attribute value.
void set_client_ip(const std::string &value)
Set "client_ip" attribute 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 std::string & get_work_dir() const
Get "work_dir" attribute value.
static const std::string & __get_client_ip_str() noexcept
SNBTransferConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_work_dir_str() noexcept
uint16_t get_timeout_send() const
Get "timeout_send" attribute value.
static const std::string & __get_connection_prefix_str() noexcept
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...
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constSNBTransferConf * >::const_iterator SNBTransferConfIterator
The DUNE-DAQ namespace.
msgpack::object obj