DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
IRIGTimestampNode.hpp
Go to the documentation of this file.
1
12#ifndef TIMING_INCLUDE_TIMING_IRIGTIMESTAMPNODE_HPP_
13#define TIMING_INCLUDE_TIMING_IRIGTIMESTAMPNODE_HPP_
14
15// PDT Headers
16#include "TimingIssues.hpp"
17#include "timing/TimingNode.hpp"
19
20// uHal Headers
21#include "uhal/DerivedNode.hpp"
22
23// C++ Headers
24#include <chrono>
25#include <string>
26
27namespace dunedaq {
28namespace timing {
29
34{
35 UHAL_DERIVEDNODE(IRIGTimestampNode)
36public:
37 explicit IRIGTimestampNode(const uhal::Node& node);
38 virtual ~IRIGTimestampNode();
39
43 std::string get_status(bool print_out = false) const override;
44
50 uhal::ValVector<uint32_t> read_raw_timestamp(bool dispatch = true) const; // NOLINT(build/unsigned)
51
57 uint64_t read_timestamp() const; // NOLINT(build/unsigned)
58
62 void set_ts_epoch(TimestampEpoch ts_epoch) const; // NOLINT(build/unsigned)
63
67 void set_ts_epoch_value(uint64_t epoch_to_2000_seconds_tai, uint8_t epoch_to_2000_leap_seconds) const; // NOLINT(build/unsigned)
68
72 //void set_ts_epoch_date(uint64_t epoch_to_2000_seconds_tai, uint8_t epoch_to_2000_leap_seconds) const; // NOLINT(build/unsigned)
73
77 void set_ts_timebase(TimestampTimebase ts_timebase) const; // NOLINT(build/unsigned)
78
82 void set_ts_seconds_offset(int8_t seconds_offset) const; // NOLINT(build/signed)
83
87 void set_ts_ticks_offset(int16_t ticks_offset) const; // NOLINT(build/signed)
88
94 uint32_t read_pps_counter() const; // NOLINT(build/unsigned)
95
101 uint64_t read_seconds_since_epoch() const; // NOLINT(build/unsigned)
102};
103
104} // namespace timing
105} // namespace dunedaq
106
107#endif // TIMING_INCLUDE_TIMING_IRIGTIMESTAMPNODE_HPP_
Class for timestamp generator node.
std::string get_status(bool print_out=false) const override
Print the status of the timing node.
uint64_t read_timestamp() const
Read the current timestamp words.
void set_ts_ticks_offset(int16_t ticks_offset) const
Set ticks offset.
void set_ts_epoch_value(uint64_t epoch_to_2000_seconds_tai, uint8_t epoch_to_2000_leap_seconds) const
Set custom epoch value.
IRIGTimestampNode(const uhal::Node &node)
void set_ts_seconds_offset(int8_t seconds_offset) const
Set seconds offset.
void set_ts_timebase(TimestampTimebase ts_timebase) const
Set custom epoch date.
uint64_t read_seconds_since_epoch() const
Read the current seconds since epoch words.
void set_ts_epoch(TimestampEpoch ts_epoch) const
Set epoch: UNIX/custom.
uhal::ValVector< uint32_t > read_raw_timestamp(bool dispatch=true) const
Read the current timestamp words.
uint32_t read_pps_counter() const
Read the current pps ctr word.
Base class for timing nodes.
The DUNE-DAQ namespace.
Definition DataStore.hpp:57