DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DPDKReceiver.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DPDKReceiver_0_dunedaq__appmodel_0_appmodel_H_
4#define _DPDKReceiver_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 DPDKPortConfiguration;
25 }
26 namespace confmodel {
27 class NetworkDevice;
28 }
29}
30
31
32namespace dunedaq {
33 namespace appmodel {
34
36
37 friend class conffwk::Configuration;
38 friend class conffwk::DalObject;
39 friend class conffwk::DalFactory;
40 friend class conffwk::DalRegistry;
41
42 protected:
43
45 virtual ~DPDKReceiver() noexcept;
46 virtual void init(bool init_children);
47
48 public:
49
52 static const std::string& s_class_name;
53
54
64 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
65
66
76 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
77
78
79 protected:
80
81 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
82
83
84 private:
85
86 const dunedaq::confmodel::NetworkDevice* m_uses;
88
89
90 public:
91
92 // relationship names
93
94 inline static const std::string s_uses = "uses";
95 inline static const std::string s_configuration = "configuration";
96
97 static const std::string& __get_uses_str() noexcept { return s_uses; }
98 static const std::string& __get_configuration_str() noexcept { return s_configuration; }
99
100
108 get_uses() const
109 {
110 std::lock_guard scoped_lock(m_mutex);
111 check();
112 check_init();
113 if (!m_uses)
114 {
115 std::ostringstream text;
116 text << "relationship \"" << s_uses << "\" of object " << this << " is not set";
117 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
118 }
119 return m_uses;
120 }
121
122
129 void
131
140 {
141 std::lock_guard scoped_lock(m_mutex);
142 check();
143 check_init();
144 if (!m_configuration)
145 {
146 std::ostringstream text;
147 text << "relationship \"" << s_configuration << "\" of object " << this << " is not set";
148 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
149 }
150 return m_configuration;
151 }
152
153
160 void
162
163 };
164
165 // out stream operator
166
167 inline std::ostream& operator<<(std::ostream& s, const DPDKReceiver& obj)
168 {
169 return obj.print_object(s);
170 }
171
172 typedef std::vector<const DPDKReceiver*>::const_iterator DPDKReceiverIterator;
173
174 }
175}
176
177#endif
#define ERS_HERE
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_configuration(const dunedaq::appmodel::DPDKPortConfiguration *value)
Set "configuration" relationship value.
static const std::string s_configuration
DPDKReceiver(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual void init(bool init_children)
static const std::string & __get_configuration_str() noexcept
friend class conffwk::DalFactory
void set_uses(const dunedaq::confmodel::NetworkDevice *value)
Set "uses" relationship value.
const dunedaq::appmodel::DPDKPortConfiguration * m_configuration
friend class conffwk::DalObject
static const std::string & __get_uses_str() noexcept
const dunedaq::confmodel::NetworkDevice * get_uses() const
Get "uses" relationship value.
const dunedaq::confmodel::NetworkDevice * m_uses
static const std::string s_uses
const dunedaq::appmodel::DPDKPortConfiguration * get_configuration() const
Get "configuration" relationship value.
virtual ~DPDKReceiver() noexcept
The base class for any generated DAL object.
Definition DalObject.hpp:45
std::mutex m_mutex
Used to protect changes of DAL 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...
Generic configuration exception.
conffwk entry point
double offset
std::vector< constDPDKReceiver * >::const_iterator DPDKReceiverIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Including Qt Headers.
The opmon infrastructure has not been set up in the configuration
Definition util.hpp:28