|
SatCat5
|
Generic interface to a numerically-controlled reference clock.
Definition at line 52 of file ptp_tracking.h.
#include <ptp_tracking.h>
Public Member Functions | |
| virtual satcat5::ptp::Time | clock_now ()=0 |
| Return the current time if available, TIME_ZERO otherwise. | |
| virtual satcat5::ptp::Time | clock_adjust (const satcat5::ptp::Time &amount)=0 |
| Make a one-time adjustment of the specified magnitude. More... | |
| virtual void | clock_rate (s64 offset)=0 |
| Adjust rate by a normalized frequency offset. More... | |
| s64 | get_rate () const |
| Read the current clock-tuning parameter. More... | |
Protected Member Functions | |
| constexpr | TrackingClock () |
| Protected constructor should only be called by the child. | |
Protected Attributes | |
| s64 | m_offset |
Private Attributes | |
| satcat5::ptp::TrackingClock * | m_next |
|
pure virtual |
Make a one-time adjustment of the specified magnitude.
Positive quantities indicate the clock should move forward. Return value is the estimated remainder or residual error.
Implemented in satcat5::cfg::PtpRealtime, satcat5::cfg::PtpReference, satcat5::ublaze::TemacAvb, and satcat5::ptp::SimulatedClock.
|
pure virtual |
Adjust rate by a normalized frequency offset.
Positive offsets command the clock to run faster. (See discussion above, near definition of RATE_ONE_PPB.)
Implemented in satcat5::cfg::PtpRealtime, satcat5::cfg::PtpReference, satcat5::ublaze::TemacAvb, and satcat5::ptp::SimulatedClock.
|
inline |
Read the current clock-tuning parameter.
Definition at line 70 of file ptp_tracking.h.