/*** * 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). * * @return Stratum level as defined in RFC-1305. */ @Override public int getStratum() { return ui(buf[STRATUM_INDEX]); }
/*** * Returns mode as defined in RFC-1305 which is a 3-bit integer * whose value is indicated by the MODE_xxx parameters. * * @return mode as defined in RFC-1305. */ @Override public int getMode() { return (ui(buf[MODE_INDEX]) >> MODE_SHIFT) & 0x7; }
/*** * Returns NTP version number as defined in RFC-1305. * * @return NTP version number. */ @Override public int getVersion() { return (ui(buf[VERSION_INDEX]) >> VERSION_SHIFT) & 0x7; }
/*** * Returns leap indicator as defined in RFC-1305 which is a two-bit code: * 0=no warning * 1=last minute has 61 seconds * 2=last minute has 59 seconds * 3=alarm condition (clock not synchronized) * * @return leap indicator as defined in RFC-1305. */ @Override public int getLeapIndicator() { return (ui(buf[LI_INDEX]) >> LI_SHIFT) & 0x3; }
/*** * 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). * * @return Stratum level as defined in RFC-1305. */ public int getStratum() { return ui(buf[STRATUM_INDEX]); }
/*** * Returns mode as defined in RFC-1305 which is a 3-bit integer * whose value is indicated by the MODE_xxx parameters. * * @return mode as defined in RFC-1305. */ public int getMode() { return (ui(buf[MODE_INDEX]) >> MODE_SHIFT) & 0x7; }
/*** * Returns NTP version number as defined in RFC-1305. * * @return NTP version number. */ public int getVersion() { return (ui(buf[VERSION_INDEX]) >> VERSION_SHIFT) & 0x7; }
/*** * Returns NTP version number as defined in RFC-1305. * * @return NTP version number. */ public int getVersion() { return (ui(buf[VERSION_INDEX]) >> VERSION_SHIFT) & 0x7; }
/*** * Returns leap indicator as defined in RFC-1305 which is a two-bit code: * 0=no warning * 1=last minute has 61 seconds * 2=last minute has 59 seconds * 3=alarm condition (clock not synchronized) * * @return leap indicator as defined in RFC-1305. */ public int getLeapIndicator() { return (ui(buf[LI_INDEX]) >> LI_SHIFT) & 0x3; }
/*** * Returns mode as defined in RFC-1305 which is a 3-bit integer * whose value is indicated by the MODE_xxx parameters. * * @return mode as defined in RFC-1305. */ public int getMode() { return (ui(buf[MODE_INDEX]) >> MODE_SHIFT) & 0x7; }
/*** * 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). * * @return Stratum level as defined in RFC-1305. */ public int getStratum() { return ui(buf[STRATUM_INDEX]); }
/*** * Returns leap indicator as defined in RFC-1305 which is a two-bit code: * 0=no warning * 1=last minute has 61 seconds * 2=last minute has 59 seconds * 3=alarm condition (clock not synchronized) * * @return leap indicator as defined in RFC-1305. */ public int getLeapIndicator() { return (ui(buf[LI_INDEX]) >> LI_SHIFT) & 0x3; }