gPTP Documentation
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WindowsTimestamper Class Reference

#include <windows_hal.hpp>

Inheritance diagram for WindowsTimestamper:
Inheritance graph
Collaboration diagram for WindowsTimestamper:
Collaboration graph

Public Member Functions

virtual bool HWTimestamper_init (InterfaceLabel *iface_label, OSNetworkInterface *net_iface)
 Initializes the network adaptor and the hw timestamper interface. More...
 
virtual bool HWTimestamper_gettime (Timestamp *system_time, Timestamp *device_time, uint32_t *local_clock, uint32_t *nominal_clock_rate)
 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 &timestamp, unsigned &clock_value, bool last)
 Gets the TX timestamp. More...
 
virtual int HWTimestamper_rxtimestamp (PortIdentity *identity, uint16_t sequenceId, Timestamp &timestamp, unsigned &clock_value, bool last)
 Gets the RX timestamp. More...
 
- Public Member Functions inherited from HWTimestamper
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_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 ()
 

Additional Inherited Members

- Protected Attributes inherited from HWTimestamper
uint8_t version
 HWTimestamper version.
 

Detailed Description

Windows HWTimestamper implementation

Member Function Documentation

virtual bool WindowsTimestamper::HWTimestamper_gettime ( Timestamp system_time,
Timestamp device_time,
uint32_t *  local_clock,
uint32_t *  nominal_clock_rate 
)
inlinevirtual

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.

Parameters
system_time[out] System time
device_time[out] Device time
local_clock[out] Local clock
nominal_clock_rate[out] Nominal clock rate
Returns
True in case of success. FALSE in case of error

Implements HWTimestamper.

virtual bool WindowsTimestamper::HWTimestamper_init ( InterfaceLabel iface_label,
OSNetworkInterface net_iface 
)
virtual

Initializes the network adaptor and the hw timestamper interface.

Parameters
iface_labelInterfaceLabel
net_ifaceNetwork interface
Returns
TRUE if success; FALSE if error

Reimplemented from HWTimestamper.

virtual int WindowsTimestamper::HWTimestamper_rxtimestamp ( PortIdentity identity,
uint16_t  sequenceId,
Timestamp timestamp,
unsigned &  clock_value,
bool  last 
)
inlinevirtual

Gets the RX timestamp.

Parameters
identityPortIdentity interface
sequenceIdSequence ID
timestamp[out] RX hardware timestamp
clock_value[out] Not used
lastNot used
Returns
0 ok, -1 error, -72 try again.

Implements HWTimestamper.

virtual int WindowsTimestamper::HWTimestamper_txtimestamp ( PortIdentity identity,
uint16_t  sequenceId,
Timestamp timestamp,
unsigned &  clock_value,
bool  last 
)
inlinevirtual

Gets the TX timestamp.

Parameters
identity[in] PortIdentity interface
sequenceIdSequence ID
timestamp[out] TX hardware timestamp
clock_valueNot used
lastNot used
Returns
-1 if error, 0 if success;

Implements HWTimestamper.


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