|
SatCat5
|
TlvHandler for experimental Doppler-TLV tags.
Ordinary PTP assumes all nodes are stationary, the path length is fixed, and delays in each direction are symmetric. Violating these assumptions results in biased or inaccurate time transfer. This class defines experimental extensions that relax these assumptions, allowing motion to be measured and mitigated for better accuracy.
The largest change is the creation of a new TLV for Doppler metadata. This file implements the software that initializes and read such tags at each endpoint. Transparent clocks that support Doppler-TLV require gateware or hardware that increments the tag's contents at each hop. TlvHandler for the Doppler-TLV tags.
Definition at line 28 of file ptp_doppler.h.
#include <ptp_doppler.h>
Public Member Functions | |
| DopplerTlv (satcat5::ptp::Client *client) | |
| Link this instance to a specific PTP client. | |
| void | add_filter (satcat5::ptp::Filter *filter) |
| Add to the chain of processing filters. More... | |
| bool | get_tcomp_en () const |
| Is timestamp compensation currently enabled? | |
| void | set_tcomp_en (bool enable) |
| Enable or disable timestamp compensation. More... | |
| s64 | get_velocity () const |
| Measured velocity (subns/sec). | |
| s64 | get_acceleration () const |
| Measured acceleration (subns/sec^2). | |
| bool | tlv_rcvd (const satcat5::ptp::Header &hdr, const satcat5::ptp::TlvHeader &tlv, satcat5::io::LimitedRead &rd) override |
| Child class SHOULD override this method to read incoming TLV(s). More... | |
| unsigned | tlv_send (const satcat5::ptp::Header &hdr, satcat5::io::Writeable *wr) override |
| Child class SHOULD override this method to append outgoing TLV(s). More... | |
| void | tlv_meas (satcat5::ptp::Measurement &meas) override |
| Child class MAY override this method to read or modify each complete two-way handshake event. More... | |
Protected Attributes | |
| satcat5::ptp::LinearPrediction | m_predict |
| s64 | m_dstamp |
| satcat5::util::TimeVal | m_tref |
| bool | m_tcomp |
| satcat5::ptp::Client *const | m_client |
| Pointer to the associated PTP client. | |
Private Attributes | |
| satcat5::ptp::TlvHandler * | m_next |
|
inline |
Add to the chain of processing filters.
Filters are applied in the order added.
Definition at line 35 of file ptp_doppler.h.
|
inline |
Enable or disable timestamp compensation.
(The default setting is given by SATCAT5_DOPPLER_TCOMP.)
Definition at line 44 of file ptp_doppler.h.
|
overridevirtual |
Child class MAY override this method to read or modify each complete two-way handshake event.
See discussion above. The default handler takes no action.
Reimplemented from satcat5::ptp::TlvHandler.
Definition at line 114 of file ptp_doppler.cc.
|
overridevirtual |
Child class SHOULD override this method to read incoming TLV(s).
Reimplemented from satcat5::ptp::TlvHandler.
Definition at line 52 of file ptp_doppler.cc.
|
overridevirtual |
Child class SHOULD override this method to append outgoing TLV(s).
The override method MUST predict its output length (input = null). See discussion above. Returns predicted or actual length in bytes. The default handler does not emit any outgoing TLVs.
Reimplemented from satcat5::ptp::TlvHandler.
Definition at line 87 of file ptp_doppler.cc.