DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
FLCmdGeneratorNode.hpp
Go to the documentation of this file.
1
12#ifndef TIMING_INCLUDE_TIMING_FLCMDGENERATORNODE_HPP_
13#define TIMING_INCLUDE_TIMING_FLCMDGENERATORNODE_HPP_
14
15// PDT Headers
18#include "timing/TimingNode.hpp"
19
20// uHal Headers
21#include "uhal/DerivedNode.hpp"
22#include <nlohmann/json.hpp>
23
24#include <string>
25
26namespace dunedaq {
27namespace timing {
28
33{
34 UHAL_DERIVEDNODE(FLCmdGeneratorNode)
35public:
36 explicit FLCmdGeneratorNode(const uhal::Node& node);
37 virtual ~FLCmdGeneratorNode();
38
42 std::string get_status(bool print_out = false) const override;
43
47 virtual void send_fl_cmd(uint32_t command, // NOLINT(build/unsigned)
48 uint32_t channel) const; // NOLINT(build/unsigned)
52 void enable_periodic_fl_cmd(uint32_t channel, // NOLINT(build/unsigned)
53 double rate, // NOLINT(build/unsigned)
54 bool poisson,
55 uint32_t clock_frequency_hz) const; // NOLINT(build/unsigned)
56
60 void enable_periodic_fl_cmd(uint32_t command, // NOLINT(build/unsigned)
61 uint32_t channel, // NOLINT(build/unsigned)
62 double rate, // NOLINT(build/unsigned)
63 bool poisson,
64 uint32_t clock_frequency_hz) const; // NOLINT(build/unsigned)
65
69 void enable_periodic_fl_cmd(uint32_t channel, // NOLINT(build/unsigned)
70 uint32_t divisor, // NOLINT(build/unsigned)
71 uint32_t prescale, // NOLINT(build/unsigned)
72 bool poisson) const;
73
77 void enable_periodic_fl_cmd(uint32_t command, // NOLINT(build/unsigned)
78 uint32_t channel, // NOLINT(build/unsigned)
79 uint32_t divisor, // NOLINT(build/unsigned)
80 uint32_t prescale, // NOLINT(build/unsigned)
81 bool poisson) const;
82
86 void disable_fake_trigger(uint32_t channel) const; // NOLINT(build/unsigned)
87
91 std::string get_cmd_counters_table(bool print_out = false) const;
92
93 static void parse_periodic_fl_cmd_rate(double requested_rate, uint32_t clock_frequency_hz, double& actual_rate, uint32_t& divisor, uint32_t& prescale);
94private:
95 void validate_command(uint32_t command) const;
96 void validate_channel(uint32_t channel) const;
97};
98
99} // namespace timing
100} // namespace dunedaq
101
102#endif // TIMING_INCLUDE_TIMING_FLCMDGENERATORNODE_HPP_
Class for master global node.
void disable_fake_trigger(uint32_t channel) const
Clear fake trigger configuration.
virtual void send_fl_cmd(uint32_t command, uint32_t channel) const
Send a fixed length command.
std::string get_cmd_counters_table(bool print_out=false) const
Get command counters status string.
void validate_channel(uint32_t channel) const
static void parse_periodic_fl_cmd_rate(double requested_rate, uint32_t clock_frequency_hz, double &actual_rate, uint32_t &divisor, uint32_t &prescale)
void enable_periodic_fl_cmd(uint32_t channel, double rate, bool poisson, uint32_t clock_frequency_hz) const
Configure fake trigger.
void validate_command(uint32_t command) const
std::string get_status(bool print_out=false) const override
Get status string, optionally print.
Base class for timing nodes.
Including Qt Headers.