12#ifndef TIMING_INCLUDE_TIMING_ENDPOINTNODE_HPP_
13#define TIMING_INCLUDE_TIMING_ENDPOINTNODE_HPP_
21#include "uhal/DerivedNode.hpp"
23#include <nlohmann/json.hpp>
45 std::string
get_status(
bool print_out =
false)
const override;
52 void enable(uint32_t
address = 0, uint32_t partition = 0)
const override;
66 void reset(uint32_t
address = 0, uint32_t partition = 0)
const override;
96 { 0x0,
"Standing by (0x0)" },
97 { 0x1,
"Waiting for input clock (0x1)" },
98 { 0x2,
"Waiting for good frequency check (0x2)" },
99 { 0x3,
"Waiting for internal CDR to lock (0x3)" },
100 { 0x4,
"Waiting for rx block to lock (0x4)" },
101 { 0x5,
"Waiting for address to be set (0x5)" },
102 { 0x6,
"Waiting for deskew to be set (0x6)" },
103 { 0x7,
"Waiting for timestamp initialisation (0x7)" },
104 { 0x8,
"Ready (0x8)" },
105 { 0xc,
"Error in physical layer (0xc)" },
106 { 0xd,
"Receive error (0xd)" },
107 { 0xe,
"Time check error (0xe)" },
108 { 0xf,
"Protocol error (0xf)" },
Base class for timing IO nodes.
Base class for timing IO nodes.
virtual uint64_t read_timestamp() const
Read the current timestamp word.
void reset(uint32_t address=0, uint32_t partition=0) const override
Reset the endpoint.
void get_info(timingendpointinfo::TimingEndpointInfo &mon_data) const override
Read the endpoint clock frequency.
void disable() const override
Disable the endpoint.
EndpointNode(const uhal::Node &node)
static const std::map< uint8_t, std::string > endpoint_state_map
static std::map< uint8_t, std::string > get_endpoint_state_map()
Get the states map.
std::string get_status(bool print_out=false) const override
Print the status of the timing node.