DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
EndpointLocation.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _EndpointLocation_0_dunedaq__timinglibs__dal_0_timinglibs_dal_H_
4#define _EndpointLocation_0_dunedaq__timinglibs__dal_0_timinglibs_dal_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 timinglibs {
19 namespace dal {
20
25 class EndpointLocation : public virtual dunedaq::conffwk::DalObject {
26
28 friend class conffwk::DalObject;
29 friend class conffwk::DalFactory;
31
32 protected:
33
35 virtual ~EndpointLocation() noexcept;
36 virtual void init(bool init_children);
37
38 public:
39
42 static const std::string& s_class_name;
43
44
54 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
55
56
66 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
67
68
69 protected:
70
71 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
72
73
74 private:
75
77 int32_t m_sfp_slot;
78 uint32_t m_address;
79
80
81 public:
82
83 // attribute names
84
85 inline static const std::string s_fanout_slot = "fanout_slot";
86 inline static const std::string s_sfp_slot = "sfp_slot";
87 inline static const std::string s_address = "address";
88
89 static const std::string& __get_fanout_slot_str() noexcept { return s_fanout_slot; }
90 static const std::string& __get_sfp_slot_str() noexcept { return s_sfp_slot; }
91 static const std::string& __get_address_str() noexcept { return s_address; }
92
93
101 int32_t
103 {
104 std::lock_guard scoped_lock(m_mutex);
105 check();
106 check_init();
107 return m_fanout_slot;
108 }
109
117 void
118 set_fanout_slot(int32_t value)
119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 clear();
124 }
125
126
134 int32_t
136 {
137 std::lock_guard scoped_lock(m_mutex);
138 check();
139 check_init();
140 return m_sfp_slot;
141 }
142
150 void
151 set_sfp_slot(int32_t value)
152 {
153 std::lock_guard scoped_lock(m_mutex);
154 check();
155 clear();
157 }
158
159
167 uint32_t
169 {
170 std::lock_guard scoped_lock(m_mutex);
171 check();
172 check_init();
173 return m_address;
174 }
175
183 void
184 set_address(uint32_t value)
185 {
186 std::lock_guard scoped_lock(m_mutex);
187 check();
188 clear();
189 p_obj.set_by_val(s_address, value);
190 }
191
192
193 };
194
195 // out stream operator
196
197 inline std::ostream& operator<<(std::ostream& s, const EndpointLocation& obj)
198 {
199 return obj.print_object(s);
200 }
201
202 typedef std::vector<const EndpointLocation*>::const_iterator EndpointLocationIterator;
203
204 }
205 }
206}
207
208#endif
void set_by_val(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...
static const std::string & __get_address_str() noexcept
uint32_t get_address() const
Get "address" attribute value. Address of the endpoint.
void set_fanout_slot(int32_t value)
Set "fanout_slot" attribute value. Fanout slot of the endpoint.
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...
int32_t get_sfp_slot() const
Get "sfp_slot" attribute value. SFP slot of the endpoint.
static const std::string & __get_fanout_slot_str() noexcept
int32_t get_fanout_slot() const
Get "fanout_slot" attribute value. Fanout slot of the endpoint.
void set_address(uint32_t value)
Set "address" attribute value. Address of the endpoint.
static const std::string & __get_sfp_slot_str() noexcept
void set_sfp_slot(int32_t value)
Set "sfp_slot" attribute value. SFP slot of the endpoint.
EndpointLocation(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual void init(bool init_children)
conffwk entry point
double offset
std::vector< constEndpointLocation * >::const_iterator EndpointLocationIterator
std::ostream & operator<<(std::ostream &s, const EndpointLocation &obj)
Including Qt Headers.