DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
FelixInterface.hpp
Go to the documentation of this file.
1// *** this file is generated by oksdalgen, do not modify it ***
2
3#ifndef _FelixInterface_0_dunedaq__appmodel_0_appmodel_H_
4#define _FelixInterface_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
27 class FelixInterface : public dunedaq::appmodel::FelixDataReceiver {
28
30 friend class conffwk::DalObject;
31 friend class conffwk::DalFactory;
33
34 protected:
35
37 virtual ~FelixInterface() 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 uint8_t m_card;
79 uint16_t m_slr;
80 uint8_t m_dma_id;
87 uint32_t m_poll_time;
88 uint8_t m_numa_id;
89
90
91 public:
92
93 // attribute names
94
95 inline static const std::string s_card = "card";
96 inline static const std::string s_slr = "slr";
97 inline static const std::string s_dma_id = "dma_id";
98 inline static const std::string s_chunk_trailer_size = "chunk_trailer_size";
99 inline static const std::string s_dma_block_size = "dma_block_size";
100 inline static const std::string s_dma_memory_size_gb = "dma_memory_size_gb";
101 inline static const std::string s_dma_margin_blocks = "dma_margin_blocks";
102 inline static const std::string s_dma_block_threshold = "dma_block_threshold";
103 inline static const std::string s_interrupt_mode = "interrupt_mode";
104 inline static const std::string s_poll_time = "poll_time";
105 inline static const std::string s_numa_id = "numa_id";
106
107 static const std::string& __get_card_str() noexcept { return s_card; }
108 static const std::string& __get_slr_str() noexcept { return s_slr; }
109 static const std::string& __get_dma_id_str() noexcept { return s_dma_id; }
110 static const std::string& __get_chunk_trailer_size_str() noexcept { return s_chunk_trailer_size; }
111 static const std::string& __get_dma_block_size_str() noexcept { return s_dma_block_size; }
112 static const std::string& __get_dma_memory_size_gb_str() noexcept { return s_dma_memory_size_gb; }
113 static const std::string& __get_dma_margin_blocks_str() noexcept { return s_dma_margin_blocks; }
114 static const std::string& __get_dma_block_threshold_str() noexcept { return s_dma_block_threshold; }
115 static const std::string& __get_interrupt_mode_str() noexcept { return s_interrupt_mode; }
116 static const std::string& __get_poll_time_str() noexcept { return s_poll_time; }
117 static const std::string& __get_numa_id_str() noexcept { return s_numa_id; }
118
119
127 uint8_t
128 get_card() const
129 {
130 std::lock_guard scoped_lock(m_mutex);
131 check();
132 check_init();
133 return m_card;
134 }
135
143 void
144 set_card(uint8_t value)
145 {
146 std::lock_guard scoped_lock(m_mutex);
147 check();
148 clear();
149 p_obj.set_by_val(s_card, value);
150 }
151
152
160 uint16_t
161 get_slr() const
162 {
163 std::lock_guard scoped_lock(m_mutex);
164 check();
165 check_init();
166 return m_slr;
167 }
168
176 void
177 set_slr(uint16_t value)
178 {
179 std::lock_guard scoped_lock(m_mutex);
180 check();
181 clear();
182 p_obj.set_by_val(s_slr, value);
183 }
184
185
193 uint8_t
195 {
196 std::lock_guard scoped_lock(m_mutex);
197 check();
198 check_init();
199 return m_dma_id;
200 }
201
209 void
210 set_dma_id(uint8_t value)
211 {
212 std::lock_guard scoped_lock(m_mutex);
213 check();
214 clear();
215 p_obj.set_by_val(s_dma_id, value);
216 }
217
218
226 uint32_t
228 {
229 std::lock_guard scoped_lock(m_mutex);
230 check();
231 check_init();
233 }
234
242 void
244 {
245 std::lock_guard scoped_lock(m_mutex);
246 check();
247 clear();
249 }
250
251
259 uint32_t
261 {
262 std::lock_guard scoped_lock(m_mutex);
263 check();
264 check_init();
265 return m_dma_block_size;
266 }
267
275 void
276 set_dma_block_size(uint32_t value)
277 {
278 std::lock_guard scoped_lock(m_mutex);
279 check();
280 clear();
282 }
283
284
292 uint32_t
294 {
295 std::lock_guard scoped_lock(m_mutex);
296 check();
297 check_init();
299 }
300
308 void
310 {
311 std::lock_guard scoped_lock(m_mutex);
312 check();
313 clear();
315 }
316
317
325 uint32_t
327 {
328 std::lock_guard scoped_lock(m_mutex);
329 check();
330 check_init();
331 return m_dma_margin_blocks;
332 }
333
341 void
342 set_dma_margin_blocks(uint32_t value)
343 {
344 std::lock_guard scoped_lock(m_mutex);
345 check();
346 clear();
348 }
349
350
358 uint32_t
360 {
361 std::lock_guard scoped_lock(m_mutex);
362 check();
363 check_init();
365 }
366
374 void
376 {
377 std::lock_guard scoped_lock(m_mutex);
378 check();
379 clear();
381 }
382
383
391 bool
393 {
394 std::lock_guard scoped_lock(m_mutex);
395 check();
396 check_init();
397 return m_interrupt_mode;
398 }
399
407 void
409 {
410 std::lock_guard scoped_lock(m_mutex);
411 check();
412 clear();
414 }
415
416
424 uint32_t
426 {
427 std::lock_guard scoped_lock(m_mutex);
428 check();
429 check_init();
430 return m_poll_time;
431 }
432
440 void
441 set_poll_time(uint32_t value)
442 {
443 std::lock_guard scoped_lock(m_mutex);
444 check();
445 clear();
447 }
448
449
457 uint8_t
459 {
460 std::lock_guard scoped_lock(m_mutex);
461 check();
462 check_init();
463 return m_numa_id;
464 }
465
473 void
474 set_numa_id(uint8_t value)
475 {
476 std::lock_guard scoped_lock(m_mutex);
477 check();
478 clear();
479 p_obj.set_by_val(s_numa_id, value);
480 }
481
482
483 };
484
485 // out stream operator
486
487 inline std::ostream& operator<<(std::ostream& s, const FelixInterface& obj)
488 {
489 return obj.print_object(s);
490 }
491
492 typedef std::vector<const FelixInterface*>::const_iterator FelixInterfaceIterator;
493
494 }
495}
496
497#endif
static const std::string & __get_dma_id_str() noexcept
static const std::string & __get_slr_str() noexcept
static const std::string s_interrupt_mode
static const std::string & __get_chunk_trailer_size_str() noexcept
uint16_t get_slr() const
Get "slr" attribute value. Super logic region of a FLX card.
static const std::string & __get_dma_block_size_str() noexcept
static const std::string & __get_numa_id_str() noexcept
static const std::string & __get_dma_memory_size_gb_str() noexcept
void set_numa_id(uint8_t value)
Set "numa_id" attribute value. CMEM_RCC NUMA region selector.
uint32_t get_poll_time() const
Get "poll_time" attribute value. Poll time in us. Ignored if interrupt mode is on.
void set_slr(uint16_t value)
Set "slr" attribute value. Super logic region of a FLX card.
FelixInterface(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
void set_dma_block_threshold(uint32_t value)
Set "dma_block_threshold" attribute value. DMA parser activates at number of available new blocks.
static const std::string s_chunk_trailer_size
uint32_t get_dma_memory_size_gb() const
Get "dma_memory_size_gb" attribute value. CMEM_RCC memory to allocate in GBs.
static const std::string & __get_card_str() noexcept
uint8_t get_numa_id() const
Get "numa_id" attribute value. CMEM_RCC NUMA region selector.
static const std::string & __get_dma_margin_blocks_str() noexcept
static const std::string s_dma_block_size
static const std::string s_dma_margin_blocks
uint32_t get_dma_block_threshold() const
Get "dma_block_threshold" attribute value. DMA parser activates at number of available new blocks.
static const std::string s_card
static const std::string & __get_dma_block_threshold_str() noexcept
uint32_t get_dma_block_size() const
Get "dma_block_size" attribute value. FELIX DMA Block size in kB.
static const std::string & s_class_name
virtual void init(bool init_children)
uint8_t get_dma_id() const
Get "dma_id" attribute value. DMA descriptor to use.
uint32_t get_dma_margin_blocks() const
Get "dma_margin_blocks" attribute value. DMA parser safe margin block count.
static const std::string s_numa_id
void set_dma_id(uint8_t value)
Set "dma_id" attribute value. DMA descriptor to use.
void set_dma_block_size(uint32_t value)
Set "dma_block_size" attribute value. FELIX DMA Block size in kB.
void set_card(uint8_t value)
Set "card" attribute value. Card ID in readout host.
static const std::string s_dma_memory_size_gb
uint32_t get_chunk_trailer_size() const
Get "chunk_trailer_size" attribute value. Are chunks with 32b trailer.
bool get_interrupt_mode() const
Get "interrupt_mode" attribute value. Use device interrupts or polling for DMA parsing.
static const std::string & __get_poll_time_str() noexcept
void set_poll_time(uint32_t value)
Set "poll_time" attribute value. Poll time in us. Ignored if interrupt mode is on.
void set_interrupt_mode(bool value)
Set "interrupt_mode" attribute value. Use device interrupts or polling for DMA parsing.
void set_dma_margin_blocks(uint32_t value)
Set "dma_margin_blocks" attribute value. DMA parser safe margin block count.
static const std::string s_slr
void set_dma_memory_size_gb(uint32_t value)
Set "dma_memory_size_gb" attribute value. CMEM_RCC memory to allocate in GBs.
static const std::string s_poll_time
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...
uint8_t get_card() const
Get "card" attribute value. Card ID in readout host.
static const std::string s_dma_block_threshold
static const std::string s_dma_id
static const std::string & __get_interrupt_mode_str() noexcept
void set_chunk_trailer_size(uint32_t value)
Set "chunk_trailer_size" attribute value. Are chunks with 32b trailer.
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::vector< constFelixInterface * >::const_iterator FelixInterfaceIterator
std::ostream & operator<<(std::ostream &s, const AVXAbsRunSumProcessor &obj)
Including Qt Headers.