DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
build
appmodel
codegen
include
appmodel
SocketDataSender.hpp
Go to the documentation of this file.
1
// *** this file is generated by oksdalgen, do not modify it ***
2
3
#ifndef _SocketDataSender_0_dunedaq__appmodel_0_appmodel_H_
4
#define _SocketDataSender_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
13
#include "
conffwk/Configuration.hpp
"
14
#include "
conffwk/DalObject.hpp
"
15
16
// include files for classes used in inheritance hierarchy
17
18
#include "
appmodel/NWDetDataSender.hpp
"
19
20
namespace
dunedaq
{
21
namespace
appmodel
{
22
23
class
SocketDataSender
:
public
dunedaq::appmodel::NWDetDataSender
{
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
32
SocketDataSender
(
conffwk::DalRegistry
& db,
const
conffwk::ConfigObject
&
obj
)
noexcept
;
33
virtual
~SocketDataSender
() noexcept;
34
virtual
void
init
(
bool
init_children);
35
36
public:
37
39
40
static const
std
::
string
&
s_class_name
;
41
42
51
52
virtual
void
print
(
unsigned
int
offset
,
bool
print_header,
std
::ostream& s) const;
53
54
63
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
uint32_t
m_local_port
;
76
uint32_t
m_remote_port
;
77
78
79
public:
80
81
// attribute names
82
83
inline static const
std
::
string
s_socket_type
=
"socket_type"
;
84
inline static const
std
::
string
s_local_port
=
"local_port"
;
85
inline static const
std
::
string
s_remote_port
=
"remote_port"
;
86
87
static const
std
::
string
&
__get_socket_type_str
() noexcept {
return
s_socket_type
; }
88
static
const
std::string&
__get_local_port_str
() noexcept {
return
s_local_port
; }
89
static
const
std::string&
__get_remote_port_str
() noexcept {
return
s_remote_port
; }
90
91
95
96
struct
Socket_type
{
97
inline
static
const
std::string
TCP
=
"TCP"
;
98
inline
static
const
std::string
UDP
=
"UDP"
;
99
};
100
107
108
const
std::string&
109
get_socket_type
()
const
110
{
111
std::lock_guard scoped_lock(
m_mutex
);
112
check
();
113
check_init
();
114
return
m_socket_type
;
115
}
116
123
124
void
125
set_socket_type
(
const
std::string& value)
126
{
127
std::lock_guard scoped_lock(
m_mutex
);
128
check
();
129
clear
();
130
p_obj
.set_enum(
s_socket_type
, value);
131
}
132
133
139
140
uint32_t
141
get_local_port
()
const
142
{
143
std::lock_guard scoped_lock(
m_mutex
);
144
check
();
145
check_init
();
146
return
m_local_port
;
147
}
148
154
155
void
156
set_local_port
(uint32_t value)
157
{
158
std::lock_guard scoped_lock(
m_mutex
);
159
check
();
160
clear
();
161
p_obj
.set_by_val(
s_local_port
, value);
162
}
163
164
170
171
uint32_t
172
get_remote_port
()
const
173
{
174
std::lock_guard scoped_lock(
m_mutex
);
175
check
();
176
check_init
();
177
return
m_remote_port
;
178
}
179
185
186
void
187
set_remote_port
(uint32_t value)
188
{
189
std::lock_guard scoped_lock(
m_mutex
);
190
check
();
191
clear
();
192
p_obj
.set_by_val(
s_remote_port
, value);
193
}
194
195
196
};
197
198
// out stream operator
199
200
inline
std::ostream&
operator<<
(std::ostream& s,
const
SocketDataSender
&
obj
)
201
{
202
return
obj
.print_object(s);
203
}
204
205
typedef
std::vector<const SocketDataSender*>::const_iterator
SocketDataSenderIterator
;
206
207
}
208
}
209
210
#endif
DalObject.hpp
dunedaq::appmodel::NWDetDataSender
Definition
NWDetDataSender.hpp:32
dunedaq::appmodel::SocketDataSender
Definition
SocketDataSender.hpp:23
dunedaq::appmodel::SocketDataSender::s_remote_port
static const std::string s_remote_port
Definition
SocketDataSender.hpp:85
dunedaq::appmodel::SocketDataSender::get_local_port
uint32_t get_local_port() const
Get "local_port" attribute value.
Definition
SocketDataSender.hpp:141
dunedaq::appmodel::SocketDataSender::__get_socket_type_str
static const std::string & __get_socket_type_str() noexcept
Definition
SocketDataSender.hpp:87
dunedaq::appmodel::SocketDataSender::__get_local_port_str
static const std::string & __get_local_port_str() noexcept
Definition
SocketDataSender.hpp:88
dunedaq::appmodel::SocketDataSender::m_socket_type
std::string m_socket_type
Definition
SocketDataSender.hpp:74
dunedaq::appmodel::SocketDataSender::init
virtual void init(bool init_children)
Definition
SocketDataSender.cpp:63
dunedaq::appmodel::SocketDataSender::get_remote_port
uint32_t get_remote_port() const
Get "remote_port" attribute value.
Definition
SocketDataSender.hpp:172
dunedaq::appmodel::SocketDataSender::s_socket_type
static const std::string s_socket_type
Definition
SocketDataSender.hpp:83
dunedaq::appmodel::SocketDataSender::set_socket_type
void set_socket_type(const std::string &value)
Set "socket_type" attribute value. Socket type.
Definition
SocketDataSender.hpp:125
dunedaq::appmodel::SocketDataSender::__get_remote_port_str
static const std::string & __get_remote_port_str() noexcept
Definition
SocketDataSender.hpp:89
dunedaq::appmodel::SocketDataSender::set_remote_port
void set_remote_port(uint32_t value)
Set "remote_port" attribute value.
Definition
SocketDataSender.hpp:187
dunedaq::appmodel::SocketDataSender::SocketDataSender
SocketDataSender(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
Definition
SocketDataSender.cpp:26
dunedaq::appmodel::SocketDataSender::DalFactory
friend class conffwk::DalFactory
Definition
SocketDataSender.hpp:27
dunedaq::appmodel::SocketDataSender::get_socket_type
const std::string & get_socket_type() const
Get "socket_type" attribute value. Socket type.
Definition
SocketDataSender.hpp:109
dunedaq::appmodel::SocketDataSender::get
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...
Definition
SocketDataSender.cpp:83
dunedaq::appmodel::SocketDataSender::DalObject
friend class conffwk::DalObject
Definition
SocketDataSender.hpp:26
dunedaq::appmodel::SocketDataSender::print
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the SocketDataSender object.
Definition
SocketDataSender.cpp:35
dunedaq::appmodel::SocketDataSender::m_local_port
uint32_t m_local_port
Definition
SocketDataSender.hpp:75
dunedaq::appmodel::SocketDataSender::s_local_port
static const std::string s_local_port
Definition
SocketDataSender.hpp:84
dunedaq::appmodel::SocketDataSender::set_local_port
void set_local_port(uint32_t value)
Set "local_port" attribute value.
Definition
SocketDataSender.hpp:156
dunedaq::appmodel::SocketDataSender::~SocketDataSender
virtual ~SocketDataSender() noexcept
Definition
SocketDataSender.cpp:79
dunedaq::appmodel::SocketDataSender::s_class_name
static const std::string & s_class_name
Definition
SocketDataSender.hpp:40
dunedaq::appmodel::SocketDataSender::m_remote_port
uint32_t m_remote_port
Definition
SocketDataSender.hpp:76
dunedaq::conffwk::DalObject
The base class for any generated DAL object.
Definition
DalObject.hpp:52
dunedaq::conffwk::DalObject::clear
void clear() noexcept
Definition
DalObject.hpp:83
dunedaq::conffwk::DalObject::m_mutex
std::mutex m_mutex
Used to protect changes of DAL object.
Definition
DalObject.hpp:115
dunedaq::conffwk::DalObject::check
void check() const
Definition
DalObject.hpp:94
dunedaq::conffwk::DalObject::p_obj
ConfigObject p_obj
Config object used by given template object.
Definition
DalObject.hpp:124
dunedaq::conffwk::DalObject::check_init
void check_init() const
Check and initialize object if necessary.
Definition
DalObject.hpp:412
dunedaq::conffwk::DalRegistry
DalRegistry: A registry of DalObjects It provides a single interface to create, cache and manage DalO...
Definition
DalRegistry.hpp:19
Configuration.hpp
conffwk entry point
offset
double offset
Definition
conversions-impl.hh:28
NWDetDataSender.hpp
conffwk.ConfigObject
Definition
ConfigObject.py:1
conffwk.Configuration
Definition
Configuration.py:1
conffwk
Definition
__init__.py:1
dunedaq::appmodel
Definition
CardControllerWrapper.hpp:21
dunedaq::appmodel::operator<<
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Definition
AVXAbsRunSumProcessor.hpp:80
dunedaq::appmodel::SocketDataSenderIterator
std::vector< constSocketDataSender * >::const_iterator SocketDataSenderIterator
Definition
SocketDataSender.hpp:205
dunedaq
Including Qt Headers.
Definition
module.cpp:16
dunedaq::obj
msgpack::object obj
Definition
Serialization.hpp:257
std
Definition
SchemaUtils.hpp:118
dunedaq::appmodel::SocketDataSender::Socket_type
Definition
SocketDataSender.hpp:96
dunedaq::appmodel::SocketDataSender::Socket_type::TCP
static const std::string TCP
Definition
SocketDataSender.hpp:97
dunedaq::appmodel::SocketDataSender::Socket_type::UDP
static const std::string UDP
Definition
SocketDataSender.hpp:98
Generated on
for DUNE-DAQ by
1.17.0