DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SSPLEDCalibModule.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _SSPLEDCalibModule_0_dunedaq__appmodel_0_appmodel_H_
4#define _SSPLEDCalibModule_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
20 // forward declaration for classes used in relationships and algorithms
21
22namespace dunedaq {
23 namespace appmodel {
24 class SSPRegister;
25 }
26}
27
28
29namespace dunedaq {
30 namespace appmodel {
31
37
38 friend class conffwk::Configuration;
39 friend class conffwk::DalObject;
40 friend class conffwk::DalFactory;
41 friend class conffwk::DalRegistry;
42
43 protected:
44
46 virtual ~SSPLEDCalibModule() noexcept;
47 virtual void init(bool init_children);
48
49 public:
50
53 static const std::string& s_class_name;
54
55
65 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
66
67
77 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
78
79
80 protected:
81
82 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
83
84
85 private:
86
87 uint32_t m_card_id;
88 uint32_t m_board_id;
89 uint32_t m_module_id;
90 std::string m_board_ip;
91 uint32_t m_partition_number;
92 uint32_t m_timing_address;
93 uint32_t m_number_channels;
94 uint32_t m_channel_mask;
95 std::string m_pulse_mode;
96 uint32_t m_burst_count;
98 uint32_t m_pulse1_width_ticks;
99 uint32_t m_pulse2_width_ticks;
103
104
105 public:
106
107 // attribute names
108
109 inline static const std::string s_card_id = "card_id";
110 inline static const std::string s_board_id = "board_id";
111 inline static const std::string s_module_id = "module_id";
112 inline static const std::string s_board_ip = "board_ip";
113 inline static const std::string s_partition_number = "partition_number";
114 inline static const std::string s_timing_address = "timing_address";
115 inline static const std::string s_number_channels = "number_channels";
116 inline static const std::string s_channel_mask = "channel_mask";
117 inline static const std::string s_pulse_mode = "pulse_mode";
118 inline static const std::string s_burst_count = "burst_count";
119 inline static const std::string s_double_pulse_delay_ticks = "double_pulse_delay_ticks";
120 inline static const std::string s_pulse1_width_ticks = "pulse1_width_ticks";
121 inline static const std::string s_pulse2_width_ticks = "pulse2_width_ticks";
122 inline static const std::string s_pulse_bias_percent_270nm = "pulse_bias_percent_270nm";
123 inline static const std::string s_pulse_bias_percent_367nm = "pulse_bias_percent_367nm";
124
125 static const std::string& __get_card_id_str() noexcept { return s_card_id; }
126 static const std::string& __get_board_id_str() noexcept { return s_board_id; }
127 static const std::string& __get_module_id_str() noexcept { return s_module_id; }
128 static const std::string& __get_board_ip_str() noexcept { return s_board_ip; }
129 static const std::string& __get_partition_number_str() noexcept { return s_partition_number; }
130 static const std::string& __get_timing_address_str() noexcept { return s_timing_address; }
131 static const std::string& __get_number_channels_str() noexcept { return s_number_channels; }
132 static const std::string& __get_channel_mask_str() noexcept { return s_channel_mask; }
133 static const std::string& __get_pulse_mode_str() noexcept { return s_pulse_mode; }
134 static const std::string& __get_burst_count_str() noexcept { return s_burst_count; }
135 static const std::string& __get_double_pulse_delay_ticks_str() noexcept { return s_double_pulse_delay_ticks; }
136 static const std::string& __get_pulse1_width_ticks_str() noexcept { return s_pulse1_width_ticks; }
137 static const std::string& __get_pulse2_width_ticks_str() noexcept { return s_pulse2_width_ticks; }
138 static const std::string& __get_pulse_bias_percent_270nm_str() noexcept { return s_pulse_bias_percent_270nm; }
139 static const std::string& __get_pulse_bias_percent_367nm_str() noexcept { return s_pulse_bias_percent_367nm; }
140
141
149 uint32_t
151 {
152 std::lock_guard scoped_lock(m_mutex);
153 check();
154 check_init();
155 return m_card_id;
156 }
157
165 void
166 set_card_id(uint32_t value)
167 {
168 std::lock_guard scoped_lock(m_mutex);
169 check();
170 clear();
171 p_obj.set_by_val(s_card_id, value);
172 }
173
174
182 uint32_t
184 {
185 std::lock_guard scoped_lock(m_mutex);
186 check();
187 check_init();
188 return m_board_id;
189 }
190
198 void
199 set_board_id(uint32_t value)
200 {
201 std::lock_guard scoped_lock(m_mutex);
202 check();
203 clear();
205 }
206
207
215 uint32_t
217 {
218 std::lock_guard scoped_lock(m_mutex);
219 check();
220 check_init();
221 return m_module_id;
222 }
223
231 void
232 set_module_id(uint32_t value)
233 {
234 std::lock_guard scoped_lock(m_mutex);
235 check();
236 clear();
238 }
239
240
248 const std::string&
250 {
251 std::lock_guard scoped_lock(m_mutex);
252 check();
253 check_init();
254 return m_board_ip;
255 }
256
264 void
265 set_board_ip(const std::string& value)
266 {
267 std::lock_guard scoped_lock(m_mutex);
268 check();
269 clear();
271 }
272
273
281 uint32_t
283 {
284 std::lock_guard scoped_lock(m_mutex);
285 check();
286 check_init();
287 return m_partition_number;
288 }
289
297 void
298 set_partition_number(uint32_t value)
299 {
300 std::lock_guard scoped_lock(m_mutex);
301 check();
302 clear();
304 }
305
306
314 uint32_t
316 {
317 std::lock_guard scoped_lock(m_mutex);
318 check();
319 check_init();
320 return m_timing_address;
321 }
322
330 void
331 set_timing_address(uint32_t value)
332 {
333 std::lock_guard scoped_lock(m_mutex);
334 check();
335 clear();
337 }
338
339
347 uint32_t
349 {
350 std::lock_guard scoped_lock(m_mutex);
351 check();
352 check_init();
353 return m_number_channels;
354 }
355
363 void
364 set_number_channels(uint32_t value)
365 {
366 std::lock_guard scoped_lock(m_mutex);
367 check();
368 clear();
370 }
371
372
380 uint32_t
382 {
383 std::lock_guard scoped_lock(m_mutex);
384 check();
385 check_init();
386 return m_channel_mask;
387 }
388
396 void
397 set_channel_mask(uint32_t value)
398 {
399 std::lock_guard scoped_lock(m_mutex);
400 check();
401 clear();
403 }
404
405
410 struct Pulse_mode {
411 inline static const std::string Single = "single";
412 inline static const std::string Double = "double";
413 inline static const std::string Burst = "burst";
414 };
415
422 const std::string&
424 {
425 std::lock_guard scoped_lock(m_mutex);
426 check();
427 check_init();
428 return m_pulse_mode;
429 }
430
437 void
438 set_pulse_mode(const std::string& value)
439 {
440 std::lock_guard scoped_lock(m_mutex);
441 check();
442 clear();
444 }
445
446
454 uint32_t
456 {
457 std::lock_guard scoped_lock(m_mutex);
458 check();
459 check_init();
460 return m_burst_count;
461 }
462
470 void
471 set_burst_count(uint32_t value)
472 {
473 std::lock_guard scoped_lock(m_mutex);
474 check();
475 clear();
477 }
478
479
487 uint32_t
489 {
490 std::lock_guard scoped_lock(m_mutex);
491 check();
492 check_init();
494 }
495
503 void
505 {
506 std::lock_guard scoped_lock(m_mutex);
507 check();
508 clear();
510 }
511
512
520 uint32_t
522 {
523 std::lock_guard scoped_lock(m_mutex);
524 check();
525 check_init();
527 }
528
536 void
538 {
539 std::lock_guard scoped_lock(m_mutex);
540 check();
541 clear();
543 }
544
545
553 uint32_t
555 {
556 std::lock_guard scoped_lock(m_mutex);
557 check();
558 check_init();
560 }
561
569 void
571 {
572 std::lock_guard scoped_lock(m_mutex);
573 check();
574 clear();
576 }
577
578
586 uint32_t
588 {
589 std::lock_guard scoped_lock(m_mutex);
590 check();
591 check_init();
593 }
594
602 void
604 {
605 std::lock_guard scoped_lock(m_mutex);
606 check();
607 clear();
609 }
610
611
619 uint32_t
621 {
622 std::lock_guard scoped_lock(m_mutex);
623 check();
624 check_init();
626 }
627
635 void
637 {
638 std::lock_guard scoped_lock(m_mutex);
639 check();
640 clear();
642 }
643
644
645 // relationship names
646
647 inline static const std::string s_hardware_configuration = "hardware_configuration";
648
649 static const std::string& __get_hardware_configuration_str() noexcept { return s_hardware_configuration; }
650
651
658 const std::vector<const dunedaq::appmodel::SSPRegister*>&
660 {
661 std::lock_guard scoped_lock(m_mutex);
662 check();
663 check_init();
665 }
666
667
674 void
675 set_hardware_configuration(const std::vector<const dunedaq::appmodel::SSPRegister*>& value);
676
677 };
678
679 // out stream operator
680
681 inline std::ostream& operator<<(std::ostream& s, const SSPLEDCalibModule& obj)
682 {
683 return obj.print_object(s);
684 }
685
686 typedef std::vector<const SSPLEDCalibModule*>::const_iterator SSPLEDCalibModuleIterator;
687
688 }
689}
690
691#endif
static const std::string & __get_module_id_str() noexcept
static const std::string s_partition_number
uint32_t get_pulse2_width_ticks() const
Get "pulse2_width_ticks" attribute value. width of second pulse.
static const std::string & __get_timing_address_str() noexcept
static const std::string & __get_pulse_bias_percent_270nm_str() noexcept
void set_pulse2_width_ticks(uint32_t value)
Set "pulse2_width_ticks" attribute value. width of second pulse.
void set_pulse_mode(const std::string &value)
Set "pulse_mode" attribute value.
void set_number_channels(uint32_t value)
Set "number_channels" attribute value. Decimal number of the number of channels in the card,...
uint32_t get_card_id() const
Get "card_id" attribute value. Physical card identifier (in the same host)
static const std::string & s_class_name
const std::string & get_pulse_mode() const
Get "pulse_mode" attribute value.
void set_pulse1_width_ticks(uint32_t value)
Set "pulse1_width_ticks" attribute value. Width of first pulse in time ticks.
void set_double_pulse_delay_ticks(uint32_t value)
Set "double_pulse_delay_ticks" attribute value. number of ticks between first and second pulse in dou...
void set_hardware_configuration(const std::vector< const dunedaq::appmodel::SSPRegister * > &value)
Set "hardware_configuration" relationship value.
std::vector< const dunedaq::appmodel::SSPRegister * > m_hardware_configuration
static const std::string & __get_board_id_str() noexcept
static const std::string s_pulse2_width_ticks
static const std::string & __get_pulse1_width_ticks_str() noexcept
static const std::string & __get_board_ip_str() noexcept
uint32_t get_pulse1_width_ticks() const
Get "pulse1_width_ticks" attribute value. Width of first pulse in time ticks.
static const std::string s_pulse1_width_ticks
static const std::string & __get_partition_number_str() noexcept
static const std::string s_pulse_bias_percent_270nm
static const std::string & __get_card_id_str() noexcept
uint32_t get_timing_address() const
Get "timing_address" attribute value. Timing address of the SSP board.
SSPLEDCalibModule(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_hardware_configuration_str() noexcept
void set_pulse_bias_percent_270nm(uint32_t value)
Set "pulse_bias_percent_270nm" attribute value. the fraction of bias applied to 270 nm LED.
uint32_t get_channel_mask() const
Get "channel_mask" attribute value. Decimal number for the 12-bit channel mask where 1 is on,...
static const std::string & __get_number_channels_str() noexcept
uint32_t get_number_channels() const
Get "number_channels" attribute value. Decimal number of the number of channels in the card,...
static const std::string & __get_burst_count_str() noexcept
static const std::string & __get_pulse2_width_ticks_str() noexcept
uint32_t get_partition_number() const
Get "partition_number" attribute value. FIXME: partition number for the SSP board.
uint32_t get_board_id() const
Get "board_id" attribute value. Board ID used for configuration and metric tracking.
static const std::string & __get_pulse_mode_str() noexcept
uint32_t get_pulse_bias_percent_367nm() const
Get "pulse_bias_percent_367nm" attribute value. the fraction of bias applied to 367 nm LEDs.
uint32_t get_module_id() const
Get "module_id" attribute value. Module ID used for configuration and metric tracking.
uint32_t get_pulse_bias_percent_270nm() const
Get "pulse_bias_percent_270nm" attribute value. the fraction of bias applied to 270 nm LED.
static const std::string & __get_double_pulse_delay_ticks_str() noexcept
void set_board_ip(const std::string &value)
Set "board_ip" attribute value. IP address of the board.
virtual void init(bool init_children)
uint32_t get_burst_count() const
Get "burst_count" attribute value. Number of LED calib pulses to send in a burst.
const std::vector< const dunedaq::appmodel::SSPRegister * > & get_hardware_configuration() const
Get "hardware_configuration" relationship value.
void set_timing_address(uint32_t value)
Set "timing_address" attribute value. Timing address of the SSP board.
static const std::string s_double_pulse_delay_ticks
void set_card_id(uint32_t value)
Set "card_id" attribute value. Physical card identifier (in the same host)
static const std::string & __get_pulse_bias_percent_367nm_str() noexcept
void set_module_id(uint32_t value)
Set "module_id" attribute value. Module ID used for configuration and metric tracking.
void set_partition_number(uint32_t value)
Set "partition_number" attribute value. FIXME: partition number for the SSP board.
static const std::string s_pulse_bias_percent_367nm
void set_burst_count(uint32_t value)
Set "burst_count" attribute value. Number of LED calib pulses to send in a burst.
static const std::string s_hardware_configuration
void set_channel_mask(uint32_t value)
Set "channel_mask" attribute value. Decimal number for the 12-bit channel mask where 1 is on,...
static const std::string & __get_channel_mask_str() noexcept
void set_pulse_bias_percent_367nm(uint32_t value)
Set "pulse_bias_percent_367nm" attribute value. the fraction of bias applied to 367 nm LEDs.
uint32_t get_double_pulse_delay_ticks() const
Get "double_pulse_delay_ticks" attribute value. number of ticks between first and second pulse in dou...
const std::string & get_board_ip() const
Get "board_ip" attribute value. IP address of the board.
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...
void set_board_id(uint32_t value)
Set "board_id" attribute value. Board ID used for configuration and metric tracking.
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< constSSPLEDCalibModule * >::const_iterator SSPLEDCalibModuleIterator
Including Qt Headers.