gPTP Documentation
|
#include <ieee1588.hpp>
Public Member Functions | |
virtual bool | HWTimestamper_init (InterfaceLabel *iface_label, OSNetworkInterface *iface) |
Initializes the hardware timestamp unit. More... | |
virtual void | HWTimestamper_final (void) |
This method is called before the object is de-allocated. More... | |
virtual bool | HWTimestamper_adjclockrate (float frequency_offset) |
Adjusts the hardware clock frequency. More... | |
virtual bool | HWTimestamper_adjclockphase (int64_t phase_adjust) |
Adjusts the hardware clock phase. More... | |
virtual bool | HWTimestamper_gettime (Timestamp *system_time, Timestamp *device_time, uint32_t *local_clock, uint32_t *nominal_clock_rate)=0 |
Get the cross timestamping information. The gPTP subsystem uses these samples to calculate ratios which can be used to translate or extrapolate one clock into another clock reference. The gPTP service uses these supplied cross timestamps to perform internal rate estimation and conversion functions. More... | |
virtual int | HWTimestamper_txtimestamp (PortIdentity *identity, uint16_t sequenceId, Timestamp ×tamp, unsigned &clock_value, bool last)=0 |
Gets the tx timestamp from hardware. More... | |
virtual int | HWTimestamper_rxtimestamp (PortIdentity *identity, uint16_t sequenceId, Timestamp ×tamp, unsigned &clock_value, bool last)=0 |
Get rx timestamp. More... | |
virtual bool | HWTimestamper_get_extclk_offset (Timestamp *local_time, int64_t *clk_offset, int32_t *ppt_freq_offset) |
Get external clock offset. More... | |
virtual void | HWTimestamper_get_extderror (char *msg) |
Gets a string with the error from the hardware timestamp block. More... | |
virtual bool | HWTimestamper_PPS_start () |
Starts the PPS (pulse per second) interface. More... | |
virtual bool | HWTimestamper_PPS_stop () |
Stops the PPS (pulse per second) interface. More... | |
int | getVersion () |
Gets the HWTimestamper version. More... | |
HWTimestamper () | |
Protected Attributes | |
uint8_t | version |
HWTimestamper version. | |
Provides a generic interface for hardware timestamping
|
inline |
Default constructor. Sets version to zero.
|
inline |
Gets the HWTimestamper version.
|
inlinevirtual |
Adjusts the hardware clock phase.
phase_adjust | Phase offset |
Reimplemented in LinuxTimestamperGeneric.
|
inlinevirtual |
Adjusts the hardware clock frequency.
frequency_offset | Frequency offset |
Reimplemented in LinuxTimestamperGeneric.
|
inlinevirtual |
This method is called before the object is de-allocated.
|
inlinevirtual |
Get external clock offset.
local_time | [inout] Local time |
clk_offset | [inout] clock offset |
ppt_freq_offset | [inout] Frequency offset in ppts |
|
inlinevirtual |
Gets a string with the error from the hardware timestamp block.
msg | [out] String error |
|
pure virtual |
Get the cross timestamping information. The gPTP subsystem uses these samples to calculate ratios which can be used to translate or extrapolate one clock into another clock reference. The gPTP service uses these supplied cross timestamps to perform internal rate estimation and conversion functions.
system_time | [out] System time |
device_time | [out] Device time |
local_clock | [out] Local clock |
nominal_clock_rate | [out] Nominal clock rate |
Implemented in WindowsTimestamper, LinuxTimestamperGeneric, and LinuxTimestamperIntelCE.
|
inlinevirtual |
Initializes the hardware timestamp unit.
iface_label | [in] Interface label |
iface | [in] Network interface |
Reimplemented in WindowsTimestamper, LinuxTimestamperGeneric, and LinuxTimestamperIntelCE.
|
inlinevirtual |
Starts the PPS (pulse per second) interface.
|
inlinevirtual |
Stops the PPS (pulse per second) interface.
|
pure virtual |
Get rx timestamp.
identity | PTP port identity |
sequenceId | Sequence ID |
timestamp | [out] Timestamp value |
clock_value | [out] Clock value |
last | Signalizes that it is the last timestamp to get. When TRUE, releases the lock when its done. |
Implemented in WindowsTimestamper, LinuxTimestamperGeneric, and LinuxTimestamperIntelCE.
|
pure virtual |
Gets the tx timestamp from hardware.
identity | PTP port identity |
sequenceId | Sequence ID |
timestamp | [out] Timestamp value |
clock_value | [out] Clock value |
last | Signalizes that it is the last timestamp to get. When TRUE, releases the lock when its done. |
Implemented in WindowsTimestamper, LinuxTimestamperGeneric, and LinuxTimestamperIntelCE.