DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SocketWriterConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _SocketWriterConf_0_dunedaq__appmodel_0_appmodel_H_
4#define _SocketWriterConf_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
20namespace dunedaq {
21 namespace appmodel {
22
24
25 friend class conffwk::Configuration;
26 friend class conffwk::DalObject;
27 friend class conffwk::DalFactory;
28 friend class conffwk::DalRegistry;
29
30 protected:
31
33 virtual ~SocketWriterConf() noexcept;
34 virtual void init(bool init_children);
35
36 public:
37
40 static const std::string& s_class_name;
41
42
52 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
53
54
64 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
65
66
67 protected:
68
69 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
70
71
72 private:
73
74 std::string m_socket_type;
75 std::string m_remote_ip;
76
77
78 public:
79
80 // attribute names
81
82 inline static const std::string s_socket_type = "socket_type";
83 inline static const std::string s_remote_ip = "remote_ip";
84
85 static const std::string& __get_socket_type_str() noexcept { return s_socket_type; }
86 static const std::string& __get_remote_ip_str() noexcept { return s_remote_ip; }
87
88
93 struct Socket_type {
94 inline static const std::string TCP = "TCP";
95 inline static const std::string UDP = "UDP";
96 };
97
105 const std::string&
107 {
108 std::lock_guard scoped_lock(m_mutex);
109 check();
110 check_init();
111 return m_socket_type;
112 }
113
121 void
122 set_socket_type(const std::string& value)
123 {
124 std::lock_guard scoped_lock(m_mutex);
125 check();
126 clear();
128 }
129
130
138 const std::string&
140 {
141 std::lock_guard scoped_lock(m_mutex);
142 check();
143 check_init();
144 return m_remote_ip;
145 }
146
154 void
155 set_remote_ip(const std::string& value)
156 {
157 std::lock_guard scoped_lock(m_mutex);
158 check();
159 clear();
161 }
162
163
164 };
165
166 // out stream operator
167
168 inline std::ostream& operator<<(std::ostream& s, const SocketWriterConf& obj)
169 {
170 return obj.print_object(s);
171 }
172
173 typedef std::vector<const SocketWriterConf*>::const_iterator SocketWriterConfIterator;
174
175 }
176}
177
178#endif
void set_remote_ip(const std::string &value)
Set "remote_ip" attribute value. Remote IP address.
static const std::string & __get_socket_type_str() noexcept
virtual ~SocketWriterConf() noexcept
const std::string & get_remote_ip() const
Get "remote_ip" attribute value. Remote IP address.
const std::string & get_socket_type() const
Get "socket_type" attribute value. Socket type.
static const std::string & __get_remote_ip_str() noexcept
SocketWriterConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual void init(bool init_children)
static const std::string & s_class_name
void set_socket_type(const std::string &value)
Set "socket_type" attribute value. Socket type.
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...
static const std::string s_socket_type
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...
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constSocketWriterConf * >::const_iterator SocketWriterConfIterator
Including Qt Headers.