DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
HSINode.hpp
Go to the documentation of this file.
1
12#ifndef TIMING_INCLUDE_TIMING_HSINODE_HPP_
13#define TIMING_INCLUDE_TIMING_HSINODE_HPP_
14
15// PDT Headers
16#include "TimingIssues.hpp"
17#include "timing/TimingNode.hpp"
19
22
23// uHal Headers
24#include "uhal/DerivedNode.hpp"
25
26// C++ Headers
27#include <chrono>
28#include <string>
29
30namespace dunedaq {
31namespace timing {
32
36class HSINode : public TimingNode
37{
38 UHAL_DERIVEDNODE(HSINode)
39public:
40 explicit HSINode(const uhal::Node& node);
41 virtual ~HSINode();
42
46 std::string get_status(bool print_out = false) const override;
47
53 uint32_t read_buffer_count() const; // NOLINT(build/unsigned)
54
60 uhal::ValVector<uint32_t> read_data_buffer(uint16_t& n_words, // NOLINT(build/unsigned)
61 bool read_all = false,
62 bool fail_on_error = false) const;
63 uhal::ValVector<uint32_t> read_data_buffer(bool read_all = false, // NOLINT(build/unsigned)
64 bool fail_on_error = false) const;
65
71 std::string get_data_buffer_table(bool read_all = false, bool print_out = false) const;
72
77 void configure_hsi(uint32_t src, // NOLINT(build/unsigned)
78 uint32_t re_mask, // NOLINT(build/unsigned)
79 uint32_t fe_mask, // NOLINT(build/unsigned)
80 uint32_t inv_mask, // NOLINT(build/unsigned)
81 double rate,
82 uint32_t clock_frequency_hz, // NOLINT(build/unsigned)
83 bool dispatch = true) const;
84
89 void start_hsi(bool dispatch = true) const;
90
95 void stop_hsi(bool dispatch = true) const;
96
101 void reset_hsi(bool dispatch = true) const;
102
107 bool read_buffer_warning() const;
108
113 bool read_buffer_error() const;
114
119 uint32_t read_buffer_state() const; // NOLINT(build/unsigned)
120
125 uint32_t read_signal_source_mode() const; // NOLINT(build/unsigned)
126
132
133 static inline constexpr size_t hsi_buffer_event_words_number = 5;
134};
135
136} // namespace timing
137} // namespace dunedaq
138
139#endif // TIMING_INCLUDE_TIMING_HSINODE_HPP_
Class for HSI nodes.
Definition HSINode.hpp:37
void get_info(timingfirmwareinfo::HSIFirmwareMonitorData &mon_data) const
Collect monitoring information for timing endpoint.
Definition HSINode.cpp:315
bool read_buffer_warning() const
Read butffer warning flag.
Definition HSINode.cpp:267
std::string get_status(bool print_out=false) const override
Print the status of the timing node.
Definition HSINode.cpp:36
void stop_hsi(bool dispatch=true) const
Stop HSI triggering.
Definition HSINode.cpp:238
bool read_buffer_error() const
Read butffer error flag.
Definition HSINode.cpp:277
void configure_hsi(uint32_t src, uint32_t re_mask, uint32_t fe_mask, uint32_t inv_mask, double rate, uint32_t clock_frequency_hz, bool dispatch=true) const
Configure HSI triggering.
Definition HSINode.cpp:174
uhal::ValVector< uint32_t > read_data_buffer(uint16_t &n_words, bool read_all=false, bool fail_on_error=false) const
Read the contents of the endpoint data buffer.
Definition HSINode.cpp:90
uint32_t read_buffer_state() const
Read butffer error/warning/word count.
Definition HSINode.cpp:287
void start_hsi(bool dispatch=true) const
Start HSI triggering.
Definition HSINode.cpp:228
std::string get_data_buffer_table(bool read_all=false, bool print_out=false) const
Print the contents of the endpoint data buffer.
Definition HSINode.cpp:150
uint32_t read_buffer_count() const
Read the number of words in the data buffer.
Definition HSINode.cpp:80
HSINode(const uhal::Node &node)
Definition HSINode.cpp:25
uint32_t read_signal_source_mode() const
Read signal source, 0 - hardware, 1 - internal emulation.
Definition HSINode.cpp:305
static constexpr size_t hsi_buffer_event_words_number
Definition HSINode.hpp:133
void reset_hsi(bool dispatch=true) const
Reset HSI.
Definition HSINode.cpp:248
Base class for timing nodes.
Including Qt Headers.