public interface NtpV3Packet
Modifier and Type | Field and Description |
---|---|
static int |
LI_ALARM_CONDITION |
static int |
LI_LAST_MINUTE_HAS_59_SECONDS |
static int |
LI_LAST_MINUTE_HAS_61_SECONDS |
static int |
LI_NO_WARNING |
static int |
MODE_BROADCAST |
static int |
MODE_CLIENT |
static int |
MODE_CONTROL_MESSAGE |
static int |
MODE_PRIVATE |
static int |
MODE_RESERVED |
static int |
MODE_SERVER |
static int |
MODE_SYMMETRIC_ACTIVE |
static int |
MODE_SYMMETRIC_PASSIVE |
static int |
NTP_MAXCLOCK |
static int |
NTP_MAXPOLL |
static int |
NTP_MINCLOCK |
static int |
NTP_MINPOLL |
static int |
NTP_PORT
Standard NTP UDP port
|
static String |
TYPE_DAYTIME |
static String |
TYPE_ICMP |
static String |
TYPE_NTP |
static String |
TYPE_TIME |
static int |
VERSION_3 |
static int |
VERSION_4 |
Modifier and Type | Method and Description |
---|---|
DatagramPacket |
getDatagramPacket() |
int |
getLeapIndicator() |
int |
getMode() |
String |
getModeName() |
TimeStamp |
getOriginateTimeStamp() |
int |
getPoll() |
int |
getPrecision() |
TimeStamp |
getReceiveTimeStamp() |
int |
getReferenceId() |
String |
getReferenceIdString() |
TimeStamp |
getReferenceTimeStamp() |
int |
getRootDelay() |
double |
getRootDelayInMillisDouble() |
int |
getRootDispersion() |
long |
getRootDispersionInMillis() |
double |
getRootDispersionInMillisDouble() |
int |
getStratum() |
TimeStamp |
getTransmitTimeStamp() |
String |
getType()
Return type of time packet.
|
int |
getVersion() |
void |
setDatagramPacket(DatagramPacket dp)
Set the contents of this object from the datagram packet
|
void |
setLeapIndicator(int li)
Set leap indicator.
|
void |
setMode(int mode)
Set mode as defined in RFC-1305
|
void |
setOriginateTimeStamp(TimeStamp ts)
Set originate timestamp given NTP TimeStamp object.
|
void |
setPoll(int poll)
Set poll interval as defined in RFC-1305.
|
void |
setPrecision(int precision)
Set precision as defined in RFC-1305
|
void |
setReceiveTimeStamp(TimeStamp ts)
Set receive timestamp given NTP TimeStamp object.
|
void |
setReferenceId(int refId)
Set reference clock identifier field.
|
void |
setReferenceTime(TimeStamp ts)
Set the reference timestamp given NTP TimeStamp object.
|
void |
setRootDelay(int delay)
Set root delay as defined in RFC-1305
|
void |
setRootDispersion(int dispersion) |
void |
setStratum(int stratum)
Set stratum as defined in RFC-1305
|
void |
setTransmitTime(TimeStamp ts)
Set the transmit timestamp given NTP TimeStamp object.
|
void |
setVersion(int version)
Set version as defined in RFC-1305
|
static final int NTP_PORT
static final int LI_NO_WARNING
static final int LI_LAST_MINUTE_HAS_61_SECONDS
static final int LI_LAST_MINUTE_HAS_59_SECONDS
static final int LI_ALARM_CONDITION
static final int MODE_RESERVED
static final int MODE_SYMMETRIC_ACTIVE
static final int MODE_SYMMETRIC_PASSIVE
static final int MODE_CLIENT
static final int MODE_SERVER
static final int MODE_BROADCAST
static final int MODE_CONTROL_MESSAGE
static final int MODE_PRIVATE
static final int NTP_MINPOLL
static final int NTP_MAXPOLL
static final int NTP_MINCLOCK
static final int NTP_MAXCLOCK
static final int VERSION_3
static final int VERSION_4
static final String TYPE_NTP
static final String TYPE_ICMP
static final String TYPE_TIME
static final String TYPE_DAYTIME
DatagramPacket getDatagramPacket()
void setDatagramPacket(DatagramPacket dp)
dp
- the packetint getLeapIndicator()
void setLeapIndicator(int li)
li
- - leap indicator codeint getMode()
String getModeName()
void setMode(int mode)
mode
- the mode to setint getPoll()
void setPoll(int poll)
poll
- the interval to setint getPrecision()
void setPrecision(int precision)
precision
- Precisionint getRootDelay()
void setRootDelay(int delay)
delay
- the delay to setdouble getRootDelayInMillisDouble()
int getRootDispersion()
void setRootDispersion(int dispersion)
dispersion
- the value to setlong getRootDispersionInMillis()
double getRootDispersionInMillisDouble()
int getVersion()
void setVersion(int version)
version
- the version to setint getStratum()
void setStratum(int stratum)
stratum
- the stratum to setString getReferenceIdString()
int getReferenceId()
void setReferenceId(int refId)
refId
- the clock id field to setTimeStamp getTransmitTimeStamp()
TimeStamp getReferenceTimeStamp()
TimeStamp getOriginateTimeStamp()
TimeStamp getReceiveTimeStamp()
void setTransmitTime(TimeStamp ts)
ts
- - timestampvoid setReferenceTime(TimeStamp ts)
ts
- - timestampvoid setOriginateTimeStamp(TimeStamp ts)
ts
- - timestampvoid setReceiveTimeStamp(TimeStamp ts)
ts
- - timestampCopyright © 2001–2016 The Apache Software Foundation. All rights reserved.