DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TimingControllerConf.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _TimingControllerConf_0_dunedaq__timinglibs__dal_0_timinglibs_dal_H_
4#define _TimingControllerConf_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
22
23 friend class conffwk::Configuration;
24 friend class conffwk::DalObject;
25 friend class conffwk::DalFactory;
26 friend class conffwk::DalRegistry;
27
28 protected:
29
31 virtual ~TimingControllerConf() noexcept;
32 virtual void init(bool init_children);
33
34 public:
35
38 static const std::string& s_class_name;
39
40
50 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
51
52
62 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
63
64
65 protected:
66
67 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
68
69
70 private:
71
72 std::string m_device;
75 uint32_t m_clock_source;
76 std::string m_clock_config;
77 bool m_soft;
78
79
80 public:
81
82 // attribute names
83
84 inline static const std::string s_device = "device";
85 inline static const std::string s_hardware_state_recovery_enabled = "hardware_state_recovery_enabled";
86 inline static const std::string s_timing_session_name = "timing_session_name";
87 inline static const std::string s_clock_source = "clock_source";
88 inline static const std::string s_clock_config = "clock_config";
89 inline static const std::string s_soft = "soft";
90
91 static const std::string& __get_device_str() noexcept { return s_device; }
93 static const std::string& __get_timing_session_name_str() noexcept { return s_timing_session_name; }
94 static const std::string& __get_clock_source_str() noexcept { return s_clock_source; }
95 static const std::string& __get_clock_config_str() noexcept { return s_clock_config; }
96 static const std::string& __get_soft_str() noexcept { return s_soft; }
97
98
106 const std::string&
108 {
109 std::lock_guard scoped_lock(m_mutex);
110 check();
111 check_init();
112 return m_device;
113 }
114
122 void
123 set_device(const std::string& value)
124 {
125 std::lock_guard scoped_lock(m_mutex);
126 check();
127 clear();
128 p_obj.set_by_ref(s_device, value);
129 }
130
131
139 bool
141 {
142 std::lock_guard scoped_lock(m_mutex);
143 check();
144 check_init();
146 }
147
155 void
157 {
158 std::lock_guard scoped_lock(m_mutex);
159 check();
160 clear();
162 }
163
164
172 const std::string&
174 {
175 std::lock_guard scoped_lock(m_mutex);
176 check();
177 check_init();
179 }
180
188 void
189 set_timing_session_name(const std::string& value)
190 {
191 std::lock_guard scoped_lock(m_mutex);
192 check();
193 clear();
195 }
196
197
205 uint32_t
207 {
208 std::lock_guard scoped_lock(m_mutex);
209 check();
210 check_init();
211 return m_clock_source;
212 }
213
221 void
222 set_clock_source(uint32_t value)
223 {
224 std::lock_guard scoped_lock(m_mutex);
225 check();
226 clear();
228 }
229
230
238 const std::string&
240 {
241 std::lock_guard scoped_lock(m_mutex);
242 check();
243 check_init();
244 return m_clock_config;
245 }
246
254 void
255 set_clock_config(const std::string& value)
256 {
257 std::lock_guard scoped_lock(m_mutex);
258 check();
259 clear();
261 }
262
263
271 bool
272 get_soft() const
273 {
274 std::lock_guard scoped_lock(m_mutex);
275 check();
276 check_init();
277 return m_soft;
278 }
279
287 void
288 set_soft(bool value)
289 {
290 std::lock_guard scoped_lock(m_mutex);
291 check();
292 clear();
293 p_obj.set_by_val(s_soft, value);
294 }
295
296
297 };
298
299 // out stream operator
300
301 inline std::ostream& operator<<(std::ostream& s, const TimingControllerConf& obj)
302 {
303 return obj.print_object(s);
304 }
305
306 typedef std::vector<const TimingControllerConf*>::const_iterator TimingControllerConfIterator;
307
308 }
309 }
310}
311
312#endif
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...
void set_hardware_state_recovery_enabled(bool value)
Set "hardware_state_recovery_enabled" attribute value. Control flag for hardware state recovery.
void set_clock_source(uint32_t value)
Set "clock_source" attribute value. Clock source, 0 for PLL input 0, 1 for in 1, etc....
static const std::string & __get_clock_source_str() noexcept
uint32_t get_clock_source() const
Get "clock_source" attribute value. Clock source, 0 for PLL input 0, 1 for in 1, etc....
bool get_hardware_state_recovery_enabled() const
Get "hardware_state_recovery_enabled" attribute value. Control flag for hardware state recovery.
const std::string & get_device() const
Get "device" attribute value. String of managed device name.
void set_clock_config(const std::string &value)
Set "clock_config" attribute value. Path of clock config file.
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 & __get_device_str() noexcept
static const std::string & __get_hardware_state_recovery_enabled_str() noexcept
bool get_soft() const
Get "soft" attribute value. Soft reset.
void set_device(const std::string &value)
Set "device" attribute value. String of managed device name.
TimingControllerConf(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_timing_session_name_str() noexcept
static const std::string & __get_soft_str() noexcept
const std::string & get_timing_session_name() const
Get "timing_session_name" attribute value. Name of managed device timing session.
static const std::string & __get_clock_config_str() noexcept
const std::string & get_clock_config() const
Get "clock_config" attribute value. Path of clock config file.
void set_soft(bool value)
Set "soft" attribute value. Soft reset.
void set_timing_session_name(const std::string &value)
Set "timing_session_name" attribute value. Name of managed device timing session.
conffwk entry point
double offset
std::vector< constTimingControllerConf * >::const_iterator TimingControllerConfIterator
std::ostream & operator<<(std::ostream &s, const EndpointLocation &obj)
Including Qt Headers.