DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
HSIFrameProcessor.cpp
Go to the documentation of this file.
1
9#include "hsilibs/Types.hpp"
10#include "HSIFrameProcessor.hpp"
11
12#include <atomic>
13#include <functional>
14#include <memory>
15#include <string>
16
18
19namespace dunedaq {
20namespace hsilibs {
21
22void
24{
26 std::bind(&HSIFrameProcessor::timestamp_check, this, std::placeholders::_1));
27 // m_tasklist.push_back( std::bind(&HSIFrameProcessor::frame_error_check, this, std::placeholders::_1) );
29}
30
31void
33{
34 // Acquire timestamp
35 timestamp_t current_ts = fp->get_timestamp();
36 uint64_t k_clock_frequency = 62500000; // NOLINT(build/unsigned)
37 TLOG_DEBUG(TLVL_FRAME_RECEIVED) << "Received HSI frame timestamp value of " << current_ts << " ticks (..."
38 << std::fixed << std::setprecision(8) << (static_cast<double>(current_ts % (k_clock_frequency*1000)) / static_cast<double>(k_clock_frequency)) << " sec)"; // NOLINT
39
40 if (current_ts < m_previous_ts) {
41 TLOG() << "*** Data Integrity ERROR *** Current HSIFrame timestamp " << current_ts << " is before previous timestamp " << m_previous_ts;
42 }
43
44 if (current_ts == 0) {
45 TLOG() << "*** Data Integrity ERROR *** Current HSIFrame timestamp " << current_ts << " is 0";
46 }
47
48 m_previous_ts = current_ts;
49 m_last_processed_daq_ts = current_ts;
50}
51
55void
57{
58 // check error fields
59}
60
61} // namespace hsilibs
62} // namespace dunedaq
void conf(const appmodel::DataHandlerModule *conf) override
Set the emulator mode, if active, timestamps of processed packets are overwritten with new ones.
uint64_t get_timestamp() const
Definition Types.hpp:48
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112
#define TLOG(...)
Definition macro.hpp:22
Including Qt Headers.