DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
CTBReceiverSocket.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _CTBReceiverSocket_0_dunedaq__appmodel_0_appmodel_H_
4#define _CTBReceiverSocket_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
28
29 friend class conffwk::Configuration;
30 friend class conffwk::DalObject;
31 friend class conffwk::DalFactory;
32 friend class conffwk::DalRegistry;
33
34 protected:
35
37 virtual ~CTBReceiverSocket() noexcept;
38 virtual void init(bool init_children);
39
40 public:
41
44 static const std::string& s_class_name;
45
46
56 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
57
58
68 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
69
70
71 protected:
72
73 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
74
75
76 private:
77
78 uint64_t m_rollover;
79 uint64_t m_port;
80
81
82 public:
83
84 // attribute names
85
86 inline static const std::string s_rollover = "rollover";
87 inline static const std::string s_port = "port";
88
89 static const std::string& __get_rollover_str() noexcept { return s_rollover; }
90 static const std::string& __get_port_str() noexcept { return s_port; }
91
92
99 uint64_t
101 {
102 std::lock_guard scoped_lock(m_mutex);
103 check();
104 check_init();
105 return m_rollover;
106 }
107
114 void
115 set_rollover(uint64_t value)
116 {
117 std::lock_guard scoped_lock(m_mutex);
118 check();
119 clear();
121 }
122
123
130 uint64_t
131 get_port() const
132 {
133 std::lock_guard scoped_lock(m_mutex);
134 check();
135 check_init();
136 return m_port;
137 }
138
145 void
146 set_port(uint64_t value)
147 {
148 std::lock_guard scoped_lock(m_mutex);
149 check();
150 clear();
151 p_obj.set_by_val(s_port, value);
152 }
153
154
155 };
156
157 // out stream operator
158
159 inline std::ostream& operator<<(std::ostream& s, const CTBReceiverSocket& obj)
160 {
161 return obj.print_object(s);
162 }
163
164 typedef std::vector<const CTBReceiverSocket*>::const_iterator CTBReceiverSocketIterator;
165
166 }
167}
168
169#endif
static const std::string & __get_port_str() noexcept
static const std::string & s_class_name
void set_port(uint64_t value)
Set "port" attribute value.
uint64_t get_rollover() const
Get "rollover" attribute value.
void set_rollover(uint64_t value)
Set "rollover" attribute value.
CTBReceiverSocket(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
static const std::string & __get_rollover_str() noexcept
uint64_t get_port() const
Get "port" attribute value.
virtual void init(bool init_children)
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_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...
conffwk entry point
double offset
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
std::vector< constCTBReceiverSocket * >::const_iterator CTBReceiverSocketIterator
Including Qt Headers.