DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
FelixDataSender.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _FelixDataSender_0_dunedaq__appmodel_0_appmodel_H_
4#define _FelixDataSender_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 ~FelixDataSender() 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_protocol;
75 uint8_t m_link;
76 std::string m_control_host;
77
78
79 public:
80
81 // attribute names
82
83 inline static const std::string s_protocol = "protocol";
84 inline static const std::string s_link = "link";
85 inline static const std::string s_control_host = "control_host";
86
87 static const std::string& __get_protocol_str() noexcept { return s_protocol; }
88 static const std::string& __get_link_str() noexcept { return s_link; }
89 static const std::string& __get_control_host_str() noexcept { return s_control_host; }
90
91
96 struct Protocol {
97 inline static const std::string Full = "full";
98 inline static const std::string Half = "half";
99 };
100
107 const std::string&
109 {
110 std::lock_guard scoped_lock(m_mutex);
111 check();
112 check_init();
113 return m_protocol;
114 }
115
122 void
123 set_protocol(const std::string& value)
124 {
125 std::lock_guard scoped_lock(m_mutex);
126 check();
127 clear();
128 p_obj.set_enum(s_protocol, value);
129 }
130
131
139 uint8_t
140 get_link() const
141 {
142 std::lock_guard scoped_lock(m_mutex);
143 check();
144 check_init();
145 return m_link;
146 }
147
155 void
156 set_link(uint8_t value)
157 {
158 std::lock_guard scoped_lock(m_mutex);
159 check();
160 clear();
161 p_obj.set_by_val(s_link, value);
162 }
163
164
171 const std::string&
173 {
174 std::lock_guard scoped_lock(m_mutex);
175 check();
176 check_init();
177 return m_control_host;
178 }
179
186 void
187 set_control_host(const std::string& value)
188 {
189 std::lock_guard scoped_lock(m_mutex);
190 check();
191 clear();
193 }
194
195
196 };
197
198 // out stream operator
199
200 inline std::ostream& operator<<(std::ostream& s, const FelixDataSender& obj)
201 {
202 return obj.print_object(s);
203 }
204
205 typedef std::vector<const FelixDataSender*>::const_iterator FelixDataSenderIterator;
206
207 }
208}
209
210#endif
FelixDataSender(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
const std::string & get_protocol() const
Get "protocol" 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...
static const std::string & s_class_name
void set_protocol(const std::string &value)
Set "protocol" attribute value.
virtual void init(bool init_children)
static const std::string & __get_control_host_str() noexcept
virtual ~FelixDataSender() noexcept
const std::string & get_control_host() const
Get "control_host" attribute value.
static const std::string & __get_protocol_str() noexcept
static const std::string & __get_link_str() noexcept
void set_control_host(const std::string &value)
Set "control_host" attribute value.
void set_link(uint8_t value)
Set "link" attribute value. Link within SLR.
uint8_t get_link() const
Get "link" attribute value. Link within SLR.
static const std::string s_protocol
static const std::string s_control_host
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.
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< constFelixDataSender * >::const_iterator FelixDataSenderIterator
Including Qt Headers.