DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SFPMuxDesignInterface.hpp
Go to the documentation of this file.
1
12#ifndef TIMING_INCLUDE_TIMING_SFPMUXDESIGNINTERFACE_HPP_
13#define TIMING_INCLUDE_TIMING_SFPMUXDESIGNINTERFACE_HPP_
14
15// PDT Headers
18#include "TimingIssues.hpp"
19
20// uHal Headers
21#include "uhal/DerivedNode.hpp"
22
23// C++ Headers
24#include <chrono>
25#include <sstream>
26#include <string>
27#include <vector>
28
29namespace dunedaq {
30namespace timing {
31
36{
37
38public:
39 explicit SFPMuxDesignInterface(const uhal::Node& node)
40 : TopDesignInterface(node)
41 , MuxDesignInterface(node) {}
43
47 void switch_mux(uint8_t mux_channel, bool resync_cdr=false) const override // NOLINT(build/unsigned)
48 {
49 TopDesignInterface::get_io_node<timing::SFPMuxIONode>()->switch_sfp_mux_channel(mux_channel);
50
51 if (resync_cdr)
52 {
54 }
55 }
56
60 uint8_t read_active_mux() const override // NOLINT(build/unsigned)
61 {
62 return TopDesignInterface::get_io_node<timing::SFPMuxIONode>()->read_active_sfp_mux_channel();
63 }
64
68 virtual std::vector<uint32_t> scan_sfp_mux() const = 0;// NOLINT(build/unsigned)
69};
70
71} // namespace timing
72} // namespace dunedaq
73
74#endif // TIMING_INCLUDE_TIMING_SFPMUXDESIGNINTERFACE_HPP_
Base class for timing endpoint design nodes.
virtual void resync_active_cdr() const =0
Resync active cdr.
virtual std::vector< uint32_t > scan_sfp_mux() const =0
Scan SFP for alive timing transmitters.
void switch_mux(uint8_t mux_channel, bool resync_cdr=false) const override
Switch the SFP mux channel.
uint8_t read_active_mux() const override
Read the active SFP mux channel.
Base class for timing top design nodes.
Including Qt Headers.