SatCat5
satcat5::ptp::DopplerSimple Class Reference

Detailed Description

Streamlined variant of ptp::DopplerTlv, with a built-in filter chain that is adequate for most PTP applications.

Definition at line 74 of file ptp_doppler.h.

#include <ptp_doppler.h>

Inheritance diagram for satcat5::ptp::DopplerSimple:
[legend]
Collaboration diagram for satcat5::ptp::DopplerSimple:
[legend]

Public Member Functions

 DopplerSimple (satcat5::ptp::Client *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::AmplitudeReject m_ampl
 
satcat5::ptp::ControllerPI m_ctrl
 
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::TlvHandlerm_next
 

Member Function Documentation

◆ add_filter()

void satcat5::ptp::DopplerTlv::add_filter ( satcat5::ptp::Filter filter)
inlineinherited

Add to the chain of processing filters.

Filters are applied in the order added.

Definition at line 35 of file ptp_doppler.h.

◆ set_tcomp_en()

void satcat5::ptp::DopplerTlv::set_tcomp_en ( bool  enable)
inlineinherited

Enable or disable timestamp compensation.

(The default setting is given by SATCAT5_DOPPLER_TCOMP.)

Definition at line 44 of file ptp_doppler.h.

◆ tlv_meas()

void DopplerTlv::tlv_meas ( satcat5::ptp::Measurement meas)
overridevirtualinherited

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.

◆ tlv_rcvd()

bool DopplerTlv::tlv_rcvd ( const satcat5::ptp::Header hdr,
const satcat5::ptp::TlvHeader tlv,
satcat5::io::LimitedRead rd 
)
overridevirtualinherited

Child class SHOULD override this method to read incoming TLV(s).

See also
tlv_type.h. For matching type(s), the method should read the TLV contents and return true; otherwise return false. The default handler does not match any incoming TLV.

Reimplemented from satcat5::ptp::TlvHandler.

Definition at line 52 of file ptp_doppler.cc.

◆ tlv_send()

unsigned DopplerTlv::tlv_send ( const satcat5::ptp::Header hdr,
satcat5::io::Writeable wr 
)
overridevirtualinherited

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.


The documentation for this class was generated from the following files: