DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TLUIONode.hpp
Go to the documentation of this file.
1
12#ifndef TIMING_INCLUDE_TIMING_TLUIONODE_HPP_
13#define TIMING_INCLUDE_TIMING_TLUIONODE_HPP_
14
15// PDT Headers
16#include "TimingIssues.hpp"
17#include "timing/IONode.hpp"
18
19// uHal Headers
20#include "uhal/DerivedNode.hpp"
21
22// C++ Headers
23#include <chrono>
24#include <string>
25#include <vector>
26
27namespace dunedaq {
28namespace timing {
29
33class TLUIONode : public IONode
34{
35 UHAL_DERIVEDNODE(TLUIONode)
36
37public:
38 explicit TLUIONode(const uhal::Node& node);
39 virtual ~TLUIONode();
40
46 std::string get_uid_address_parameter_name() const override;
47
51 std::string get_status(bool print_out = false) const;
52
56 void reset(const std::string& clock_config_file) const override;
57
61 using IONode::reset;
62
66 void configure_dac(uint32_t dac_id, uint32_t dac_value, bool internal_ref = false) const; // NOLINT(build/unsigned)
67
71 std::string get_sfp_status(uint32_t sfp_id, bool print_out = false) const override; // NOLINT(build/unsigned)
72
76 bool clocks_ok() const override;
77
81 void switch_sfp_soft_tx_control_bit(uint32_t, bool) const override; // NOLINT(build/unsigned)
82
86 void switch_sfp_tx(uint32_t, bool) const override; // NOLINT(build/unsigned)
87
88 // /**
89 // * @brief Fill hardware monitoring structure.
90 // */
91 // void get_info(timinghardwareinfo::TimingTLUMonitorData& mon_data) const;
92
93 // /**
94 // * @brief Give info to collector.
95 // */
96 // void get_info(opmonlib::InfoCollector& ci, int level) const override;
97
98protected:
99 const std::vector<std::string> m_dac_devices;
100private:
101 void validate_sfp_id(uint32_t sfp_id) const; // NOLINT(build/unsigned)
102};
103
104} // namespace timing
105} // namespace dunedaq
106
107#endif // TIMING_INCLUDE_TIMING_TLUIONODE_HPP_
Base class for timing IO nodes.
Definition IONode.hpp:44
virtual void reset(const std::string &clock_config_file) const =0
Reset timing node.
Class for the TLU board.
Definition TLUIONode.hpp:34
void reset(const std::string &clock_config_file) const override
Reset IO node.
Definition TLUIONode.cpp:53
void switch_sfp_tx(uint32_t, bool) const override
Control tx laser of on-board SFP softly (I2C command)
const std::vector< std::string > m_dac_devices
Fill hardware monitoring structure.
Definition TLUIONode.hpp:99
void validate_sfp_id(uint32_t sfp_id) const
void configure_dac(uint32_t dac_id, uint32_t dac_value, bool internal_ref=false) const
Configure on-board DAC.
std::string get_status(bool print_out=false) const
Print the status of the timing node.
Definition TLUIONode.cpp:39
bool clocks_ok() const override
Clocks ready?
std::string get_uid_address_parameter_name() const override
Get the UID address parameter name.
Definition TLUIONode.cpp:31
void switch_sfp_soft_tx_control_bit(uint32_t, bool) const override
Control tx laser of on-board SFP softly (I2C command)
TLUIONode(const uhal::Node &node)
Definition TLUIONode.cpp:19
std::string get_sfp_status(uint32_t sfp_id, bool print_out=false) const override
Print status of on-board SFP.
Including Qt Headers.