biz.neustar.wpm.api
Interface Sntp.SntpResult

Enclosing interface:
Sntp

public static interface Sntp.SntpResult

SNTP V4 message according to RFC 4330 (backward compatible with V3)


Method Summary
 int getLeapIndicator()
          Leap Indicator (LI): This is a two-bit code warning of an impending leap second to be inserted/deleted in the last minute of the current day, with bit 0 and bit 1, respectively, coded as follows:
 double getLocalClockOffset()
          Local clock offset based on this SNTP response, in seconds.
 int getMode()
          Mode: This is a three-bit integer indicating the mode, with values defined as follows:
 double getOriginateTime()
          Originate Timestamp: This is the time at which the request departed the client for the server, in seconds since 00:00 1-Jan-1900.
 byte getPollInterval()
          Poll Interval: This is an eight-bit signed integer indicating the maximum interval between successive messages, in seconds to the nearest power of two.
 byte getPrecision()
          Precision: This is an eight-bit signed integer indicating the precision of the local clock, in seconds to the nearest power of two.
 double getReceiveTime()
          Receive Timestamp: This is the time at which the request arrived at the server, in seconds since 00:00 1-Jan-1900.
 double getReferenceTime()
          Reference Timestamp: This is the time at which the local clock was last set or corrected, in seconds since 00:00 1-Jan-1900.
 byte getStratum()
          Stratum: This is a eight-bit unsigned integer indicating the stratum level of the local clock, with values defined as follows: Stratum Meaning ---------------------------------------------- 0 unspecified or unavailable 1 primary reference (e.g., radio clock) 2-15 secondary reference (via NTP or SNTP) 16-255 reserved
 double getTransmitTime()
          Transmit Timestamp: This is the time at which the reply departed the server for the client, in seconds since 00:00 1-Jan-1900.
 int getVersionNumber()
          Version Number (VN): This is a three-bit integer indicating the NTP/SNTP version number.
 

Method Detail

getLeapIndicator

int getLeapIndicator()
Leap Indicator (LI): This is a two-bit code warning of an impending leap second to be inserted/deleted in the last minute of the current day, with bit 0 and bit 1, respectively, coded as follows:
    LI       Value     Meaning
    -------------------------------------------------------
    00       0         no warning
    01       1         last minute has 61 seconds
    10       2         last minute has 59 seconds)
    11       3         alarm condition (clock not synchronized)


getVersionNumber

int getVersionNumber()

Version Number (VN): This is a three-bit integer indicating the NTP/SNTP version number. The version number is 3 for Version 3 (IPv4 only) and 4 for Version 4 (IPv4, IPv6 and OSI). If necessary to distinguish between IPv4, IPv6 and OSI, the encapsulating context must be inspected.


getMode

int getMode()
Mode: This is a three-bit integer indicating the mode, with values defined as follows:
 Mode     Meaning
 ------------------------------------
 0        reserved
 1        symmetric active
 2        symmetric passive
 3        client (default)
 4        server
 5        broadcast
 6        reserved for NTP control message
 7        reserved for private use
 

In unicast and anycast modes, the client sets this field to 3 (client) in the request and the server sets it to 4 (server) in the reply. In multicast mode, the server sets this field to 5 (broadcast).


getStratum

byte getStratum()
Stratum: This is a eight-bit unsigned integer indicating the stratum level of the local clock, with values defined as follows: Stratum Meaning ---------------------------------------------- 0 unspecified or unavailable 1 primary reference (e.g., radio clock) 2-15 secondary reference (via NTP or SNTP) 16-255 reserved


getPollInterval

byte getPollInterval()
Poll Interval: This is an eight-bit signed integer indicating the maximum interval between successive messages, in seconds to the nearest power of two. The values that can appear in this field presently range from 4 (16 s) to 14 (16284 s); however, most applications use only the sub-range 6 (64 s) to 10 (1024 s).


getPrecision

byte getPrecision()
Precision: This is an eight-bit signed integer indicating the precision of the local clock, in seconds to the nearest power of two. The values that normally appear in this field range from -6 for mains-frequency clocks to -20 for microsecond clocks found in some workstations.


getReferenceTime

double getReferenceTime()
Reference Timestamp: This is the time at which the local clock was last set or corrected, in seconds since 00:00 1-Jan-1900.


getOriginateTime

double getOriginateTime()
Originate Timestamp: This is the time at which the request departed the client for the server, in seconds since 00:00 1-Jan-1900.


getReceiveTime

double getReceiveTime()
Receive Timestamp: This is the time at which the request arrived at the server, in seconds since 00:00 1-Jan-1900.


getTransmitTime

double getTransmitTime()
Transmit Timestamp: This is the time at which the reply departed the server for the client, in seconds since 00:00 1-Jan-1900.


getLocalClockOffset

double getLocalClockOffset()
Local clock offset based on this SNTP response, in seconds.


Copyright © 2014 Neustar, Inc. All Rights Reserved.