DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
TimestampEstimator is an implementation of TimestampEstimatorBase that uses TimeSync messages from an input queue to estimate the current timestamp. More...
#include <TimestampEstimator.hpp>
Classes | |
struct | TimeSyncPoint |
Public Member Functions | |
TimestampEstimator (uint32_t run_number, uint64_t clock_frequency_hz) | |
TimestampEstimator (uint64_t clock_frequency_hz) | |
virtual | ~TimestampEstimator () |
uint64_t | get_timestamp_estimate () const override |
Returns the current timestamp estimate or a special value if no valid timestamp is available. | |
std::chrono::microseconds | get_wait_estimate (uint64_t ts) const override |
void | add_timestamp_datapoint (uint64_t daq_time, uint64_t system_time) |
template<class T > | |
void | timesync_callback (const T &tsync) |
uint64_t | get_received_timesync_count () const |
![]() | |
virtual | ~TimestampEstimatorBase ()=default |
WaitStatus | wait_for_valid_timestamp (std::atomic< bool > &continue_flag) |
Waits for a valid timestamp to become available. Returns a status value that indicates whether a valid timestamp is available or not. | |
WaitStatus | wait_for_timestamp (uint64_t ts, std::atomic< bool > &continue_flag) |
Private Attributes | |
std::atomic< TimeSyncPoint > | m_current_timestamp_estimate |
uint64_t | m_clock_frequency_hz |
uint64_t | m_most_recent_daq_time |
uint64_t | m_most_recent_system_time |
std::mutex | m_datapoint_mutex |
uint32_t | m_run_number {0} |
std::atomic< uint64_t > | m_received_timesync_count |
uint32_t | m_current_process_id |
Additional Inherited Members | |
![]() | |
enum | WaitStatus { kFinished , kInterrupted } |
TimestampEstimator is an implementation of TimestampEstimatorBase that uses TimeSync messages from an input queue to estimate the current timestamp.
Definition at line 27 of file TimestampEstimator.hpp.
dunedaq::utilities::TimestampEstimator::TimestampEstimator | ( | uint32_t | run_number, |
uint64_t | clock_frequency_hz ) |
Definition at line 21 of file TimestampEstimator.cpp.
|
explicit |
Definition at line 27 of file TimestampEstimator.cpp.
|
virtual |
Definition at line 39 of file TimestampEstimator.cpp.
void dunedaq::utilities::TimestampEstimator::add_timestamp_datapoint | ( | uint64_t | daq_time, |
uint64_t | system_time ) |
Definition at line 74 of file TimestampEstimator.cpp.
|
inline |
Definition at line 45 of file TimestampEstimator.hpp.
|
overridevirtual |
Returns the current timestamp estimate or a special value if no valid timestamp is available.
Implements dunedaq::utilities::TimestampEstimatorBase.
Definition at line 47 of file TimestampEstimator.cpp.
|
overridevirtual |
Implements dunedaq::utilities::TimestampEstimatorBase.
Definition at line 64 of file TimestampEstimator.cpp.
void dunedaq::utilities::TimestampEstimator::timesync_callback | ( | const T & | tsync | ) |
Definition at line 7 of file TimestampEstimator.hxx.
|
private |
Definition at line 56 of file TimestampEstimator.hpp.
|
private |
Definition at line 62 of file TimestampEstimator.hpp.
|
private |
Definition at line 53 of file TimestampEstimator.hpp.
|
private |
Definition at line 59 of file TimestampEstimator.hpp.
|
private |
Definition at line 57 of file TimestampEstimator.hpp.
|
private |
Definition at line 58 of file TimestampEstimator.hpp.
|
private |
Definition at line 61 of file TimestampEstimator.hpp.
|
private |
Definition at line 60 of file TimestampEstimator.hpp.