DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DPDKPortConfiguration.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _DPDKPortConfiguration_0_dunedaq__appmodel_0_appmodel_H_
4#define _DPDKPortConfiguration_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
17 // forward declaration for classes used in relationships and algorithms
18
19namespace dunedaq {
20 namespace confmodel {
21 class ProcessingResource;
22 }
23}
24
25
26namespace dunedaq {
27 namespace appmodel {
28
30
31 friend class conffwk::Configuration;
32 friend class conffwk::DalObject;
33 friend class conffwk::DalFactory;
34 friend class conffwk::DalRegistry;
35
36 protected:
37
39 virtual ~DPDKPortConfiguration() noexcept;
40 virtual void init(bool init_children);
41
42 public:
43
46 static const std::string& s_class_name;
47
48
58 virtual void print(unsigned int offset, bool print_header, std::ostream& s) const;
59
60
70 virtual std::vector<const dunedaq::conffwk::DalObject *> get(const std::string& name, bool upcast_unregistered = true) const;
71
72
73 protected:
74
75 bool get(const std::string& name, std::vector<const dunedaq::conffwk::DalObject *>& vec, bool upcast_unregistered, bool first_call) const;
76
77
78 private:
79
80 bool m_flow_control;
82 uint32_t m_mtu;
83 uint32_t m_rx_ring_size;
84 uint32_t m_tx_ring_size;
85 uint32_t m_num_bufs;
86 uint32_t m_mbuf_cache_size;
87 uint32_t m_burst_size;
88 uint32_t m_lcore_sleep_us;
90 std::vector<const dunedaq::confmodel::ProcessingResource*> m_used_lcores;
91
92
93 public:
94
95 // attribute names
96
97 inline static const std::string s_flow_control = "flow_control";
98 inline static const std::string s_promiscuous_mode = "promiscuous_mode";
99 inline static const std::string s_mtu = "mtu";
100 inline static const std::string s_rx_ring_size = "rx_ring_size";
101 inline static const std::string s_tx_ring_size = "tx_ring_size";
102 inline static const std::string s_num_bufs = "num_bufs";
103 inline static const std::string s_mbuf_cache_size = "mbuf_cache_size";
104 inline static const std::string s_burst_size = "burst_size";
105 inline static const std::string s_lcore_sleep_us = "lcore_sleep_us";
106 inline static const std::string s_source_to_rx_queue_multiplexing = "source_to_rx_queue_multiplexing";
107
108 static const std::string& __get_flow_control_str() noexcept { return s_flow_control; }
109 static const std::string& __get_promiscuous_mode_str() noexcept { return s_promiscuous_mode; }
110 static const std::string& __get_mtu_str() noexcept { return s_mtu; }
111 static const std::string& __get_rx_ring_size_str() noexcept { return s_rx_ring_size; }
112 static const std::string& __get_tx_ring_size_str() noexcept { return s_tx_ring_size; }
113 static const std::string& __get_num_bufs_str() noexcept { return s_num_bufs; }
114 static const std::string& __get_mbuf_cache_size_str() noexcept { return s_mbuf_cache_size; }
115 static const std::string& __get_burst_size_str() noexcept { return s_burst_size; }
116 static const std::string& __get_lcore_sleep_us_str() noexcept { return s_lcore_sleep_us; }
118
119
126 bool
128 {
129 std::lock_guard scoped_lock(m_mutex);
130 check();
131 check_init();
132 return m_flow_control;
133 }
134
141 void
143 {
144 std::lock_guard scoped_lock(m_mutex);
145 check();
146 clear();
148 }
149
150
157 bool
159 {
160 std::lock_guard scoped_lock(m_mutex);
161 check();
162 check_init();
163 return m_promiscuous_mode;
164 }
165
172 void
174 {
175 std::lock_guard scoped_lock(m_mutex);
176 check();
177 clear();
179 }
180
181
188 uint32_t
189 get_mtu() const
190 {
191 std::lock_guard scoped_lock(m_mutex);
192 check();
193 check_init();
194 return m_mtu;
195 }
196
203 void
204 set_mtu(uint32_t value)
205 {
206 std::lock_guard scoped_lock(m_mutex);
207 check();
208 clear();
209 p_obj.set_by_val(s_mtu, value);
210 }
211
212
219 uint32_t
221 {
222 std::lock_guard scoped_lock(m_mutex);
223 check();
224 check_init();
225 return m_rx_ring_size;
226 }
227
234 void
235 set_rx_ring_size(uint32_t value)
236 {
237 std::lock_guard scoped_lock(m_mutex);
238 check();
239 clear();
241 }
242
243
250 uint32_t
252 {
253 std::lock_guard scoped_lock(m_mutex);
254 check();
255 check_init();
256 return m_tx_ring_size;
257 }
258
265 void
266 set_tx_ring_size(uint32_t value)
267 {
268 std::lock_guard scoped_lock(m_mutex);
269 check();
270 clear();
272 }
273
274
281 uint32_t
283 {
284 std::lock_guard scoped_lock(m_mutex);
285 check();
286 check_init();
287 return m_num_bufs;
288 }
289
296 void
297 set_num_bufs(uint32_t value)
298 {
299 std::lock_guard scoped_lock(m_mutex);
300 check();
301 clear();
303 }
304
305
312 uint32_t
314 {
315 std::lock_guard scoped_lock(m_mutex);
316 check();
317 check_init();
318 return m_mbuf_cache_size;
319 }
320
327 void
328 set_mbuf_cache_size(uint32_t value)
329 {
330 std::lock_guard scoped_lock(m_mutex);
331 check();
332 clear();
334 }
335
336
343 uint32_t
345 {
346 std::lock_guard scoped_lock(m_mutex);
347 check();
348 check_init();
349 return m_burst_size;
350 }
351
358 void
359 set_burst_size(uint32_t value)
360 {
361 std::lock_guard scoped_lock(m_mutex);
362 check();
363 clear();
365 }
366
367
374 uint32_t
376 {
377 std::lock_guard scoped_lock(m_mutex);
378 check();
379 check_init();
380 return m_lcore_sleep_us;
381 }
382
389 void
390 set_lcore_sleep_us(uint32_t value)
391 {
392 std::lock_guard scoped_lock(m_mutex);
393 check();
394 clear();
396 }
397
398
406 int16_t
408 {
409 std::lock_guard scoped_lock(m_mutex);
410 check();
411 check_init();
413 }
414
422 void
424 {
425 std::lock_guard scoped_lock(m_mutex);
426 check();
427 clear();
429 }
430
431
432 // relationship names
433
434 inline static const std::string s_used_lcores = "used_lcores";
435
436 static const std::string& __get_used_lcores_str() noexcept { return s_used_lcores; }
437
438
446 const std::vector<const dunedaq::confmodel::ProcessingResource*>&
448 {
449 std::lock_guard scoped_lock(m_mutex);
450 check();
451 check_init();
452 return m_used_lcores;
453 }
454
455
463 void
464 set_used_lcores(const std::vector<const dunedaq::confmodel::ProcessingResource*>& value);
465
466 };
467
468 // out stream operator
469
470 inline std::ostream& operator<<(std::ostream& s, const DPDKPortConfiguration& obj)
471 {
472 return obj.print_object(s);
473 }
474
475 typedef std::vector<const DPDKPortConfiguration*>::const_iterator DPDKPortConfigurationIterator;
476
477 }
478}
479
480#endif
uint32_t get_burst_size() const
Get "burst_size" attribute value.
int16_t get_source_to_rx_queue_multiplexing() const
Get "source_to_rx_queue_multiplexing" attribute value. Indicates how many source streams are put onto...
uint32_t get_mbuf_cache_size() const
Get "mbuf_cache_size" attribute value.
const std::vector< const dunedaq::confmodel::ProcessingResource * > & get_used_lcores() const
Get "used_lcores" relationship value. associates CPUs to the data reception workload.
void set_burst_size(uint32_t value)
Set "burst_size" attribute value.
static const std::string & __get_used_lcores_str() noexcept
void set_num_bufs(uint32_t value)
Set "num_bufs" attribute value.
DPDKPortConfiguration(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_mbuf_cache_size(uint32_t value)
Set "mbuf_cache_size" attribute value.
void set_lcore_sleep_us(uint32_t value)
Set "lcore_sleep_us" attribute value.
uint32_t get_rx_ring_size() const
Get "rx_ring_size" attribute value.
void set_mtu(uint32_t value)
Set "mtu" attribute value.
static const std::string & __get_burst_size_str() noexcept
static const std::string & __get_mtu_str() noexcept
bool get_flow_control() const
Get "flow_control" attribute value.
void set_source_to_rx_queue_multiplexing(int16_t value)
Set "source_to_rx_queue_multiplexing" attribute value. Indicates how many source streams are put onto...
void set_rx_ring_size(uint32_t value)
Set "rx_ring_size" attribute value.
uint32_t get_num_bufs() const
Get "num_bufs" attribute value.
uint32_t get_lcore_sleep_us() const
Get "lcore_sleep_us" attribute value.
static const std::string & __get_num_bufs_str() noexcept
static const std::string & __get_mbuf_cache_size_str() noexcept
std::vector< const dunedaq::confmodel::ProcessingResource * > m_used_lcores
void set_flow_control(bool value)
Set "flow_control" attribute value.
bool get_promiscuous_mode() const
Get "promiscuous_mode" attribute value.
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_used_lcores(const std::vector< const dunedaq::confmodel::ProcessingResource * > &value)
Set "used_lcores" relationship value. associates CPUs to the data reception workload.
static const std::string & __get_lcore_sleep_us_str() noexcept
void set_tx_ring_size(uint32_t value)
Set "tx_ring_size" attribute value.
static const std::string & __get_tx_ring_size_str() noexcept
uint32_t get_mtu() const
Get "mtu" attribute value.
static const std::string & __get_source_to_rx_queue_multiplexing_str() noexcept
void set_promiscuous_mode(bool value)
Set "promiscuous_mode" attribute value.
static const std::string & __get_flow_control_str() noexcept
static const std::string & __get_promiscuous_mode_str() noexcept
static const std::string & __get_rx_ring_size_str() noexcept
uint32_t get_tx_ring_size() const
Get "tx_ring_size" attribute value.
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< constDPDKPortConfiguration * >::const_iterator DPDKPortConfigurationIterator
Including Qt Headers.