Method Summary |
|
public DatagramPacket | getDatagramPacket() Returns the datagram packet with the NTP details already filled in. |
public int | getLeapIndicator() |
public int | getMode() Returns mode as defined in RFC-1305 which is a 3-bit integer
whose value is indicated by the MODE_xxx parameters. |
public String | getModeName() Return human-readable name of message mode type as described in
RFC 1305. |
public TimeStamp | getOriginateTimeStamp() Returns the originate time as defined in RFC-1305. |
public int | getPoll() Returns poll interval as defined in RFC-1305, which is an eight-bit
signed integer indicating the maximum interval between successive
messages, in seconds to the nearest power of two (e.g. |
public int | getPrecision() Returns precision as defined in RFC-1305 encoded as an 8-bit signed
integer (seconds to nearest power of two). |
public TimeStamp | getReceiveTimeStamp() Returns receive timestamp as defined in RFC-1305. |
public int | getReferenceId() Returns the reference id as defined in RFC-1305, which is
a 32-bit integer whose value is dependent on several criteria. |
public String | getReferenceIdString() Returns the reference id string. |
public TimeStamp | getReferenceTimeStamp() Returns the reference time as defined in RFC-1305. |
public int | getRootDelay() Return root delay as defined in RFC-1305, which is the total roundtrip delay
to the primary reference source, in seconds. |
public double | getRootDelayInMillisDouble() Return root delay as defined in RFC-1305 in milliseconds, which is
the total roundtrip delay to the primary reference source, in
seconds. |
public int | getRootDispersion() Returns root dispersion as defined in RFC-1305. |
public long | getRootDispersionInMillis() Returns root dispersion (as defined in RFC-1305) in milliseconds. |
public double | getRootDispersionInMillisDouble() Returns root dispersion (as defined in RFC-1305) in milliseconds
as double precision value. |
public int | getStratum() Returns Stratum as defined in RFC-1305, which indicates the stratum level
of the local clock, with values defined as follows: 0=unspecified,
1=primary ref clock, and all others a secondary reference (via NTP). |
public TimeStamp | getTransmitTimeStamp() Returns the transmit timestamp as defined in RFC-1305. |
public String | getType() Return type of time packet. |
public int | getVersion() Returns NTP version number as defined in RFC-1305. |
public void | setDatagramPacket(DatagramPacket srcDp) Set the contents of this object from source datagram packet. |
public void | setLeapIndicator(int li) Set leap indicator as defined in RFC-1305. |
public void | setMode(int mode) Set mode as defined in RFC-1305. |
public void | setOriginateTimeStamp(TimeStamp ts) Set originate timestamp given NTP TimeStamp object. |
public void | setPoll(int poll) Set poll interval as defined in RFC-1305. |
public void | setPrecision(int precision) Set precision as defined in RFC-1305. |
public void | setReceiveTimeStamp(TimeStamp ts) Set receive timestamp given NTP TimeStamp object. |
public void | setReferenceId(int refId) Set reference clock identifier field with 32-bit unsigned integer value. |
public void | setReferenceTime(TimeStamp ts) Set Reference time with NTP timestamp. |
public void | setStratum(int stratum) Set stratum level as defined in RFC-1305. |
public void | setTransmitTime(TimeStamp ts) Set transmit time with NTP timestamp. |
public void | setVersion(int version) Set NTP version as defined in RFC-1305. |
public String | toString() Returns details of NTP packet as a string. |
final protected static int | ui(byte b) Convert byte to unsigned integer. |
final protected static long | ul(byte b) Convert byte to unsigned long. |