|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcgl.narada.service.time.ntptime.NTP
public class NTP
This class implements NTP algorithms described in rfc 1305. Algorithms implemented are combine, filter and select. It also describes static values that can be used or set in the NTP protocol v3 implementation.
| Field Summary | |
|---|---|
static double |
FILTER
filter weight |
static int |
FMAX
max filter size |
static int |
HZ
clock rate |
static int |
MAXAGE
Max Clock Age |
static int |
MAXCLOCK
Max Select Clocks |
static int |
MAXDISP
Max Dispersion |
static int |
MAXDISTANCE
Max Distance |
static int |
MAXPOLL
Max Polling Interval |
static int |
MAXSKEW
Max Skew error per MAXAGE |
static int |
MAXSTRATUM
Max Stratum |
static int |
MINCLOCK
Min Select Clocks |
static double |
MINDISP
Max Dispersion |
static int |
MINPOLL
Min Polling Interval |
static int |
NMAX
max clocks |
static int |
PORT
NTP Port |
static double |
SELECT
select weight |
static int |
SHIFT
Filter Size |
static int |
VERSION
Version Number |
static int |
WINDOW
Reachability Reg Size |
| Constructor Summary | |
|---|---|
NTP()
|
|
| Method Summary | |
|---|---|
double |
combine(int m)
Computes weighted ensemble average. |
double |
dist(int n)
Computes synchronization distance. |
void |
dts()
Computes interval intersection, that is bot and top values. |
void |
filter(NtpInfo ntpInfo)
It filters the NtpInfo object, which contains NTP time information received from a server |
double |
getTheta()
Gets offset |
void |
initialize()
Initializes the vairbales used in this class. |
void |
select()
Selects best subset of clocks in candidate list |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int VERSION
public static final int PORT
public static int NMAX
public static int FMAX
public static final int HZ
public static final int MAXSTRATUM
public static final int MAXSKEW
public static final int MAXAGE
public static final int MAXDISTANCE
public static final int MINPOLL
public static final int MAXPOLL
public static final int MAXDISP
public static final double MINDISP
public static final int WINDOW
public static final int SHIFT
public static final int MINCLOCK
public static final int MAXCLOCK
public static final double FILTER
public static final double SELECT
| Constructor Detail |
|---|
public NTP()
| Method Detail |
|---|
public double getTheta()
public double combine(int m)
m - int - number of candidates to be weighted
public double dist(int n)
n - int - peer id
public void dts()
public void filter(NtpInfo ntpInfo)
ntpInfo - NtpInfo - NtpInfo object related to a received NTPDatagramPacketpublic void initialize()
public void select()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||