Class Poco::Net::NTPPacket
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco::Net

# class NTPPacket

Library: Net
Package: NTP
Header: Poco/Net/NTPPacket.h

## Description

This class is the NTP packet abstraction.

## Member Summary

Member Functions: leapIndicator, mode, originateTime, originateTimestamp, packet, pool, precision, receiveTime, receiveTimestamp, referenceId, referenceTime, referenceTimestamp, rootDelay, rootDispersion, setPacket, stratum, transmitTime, transmitTimestamp, version

## Constructors

### NTPPacket

NTPPacket();

Creates an NTPPacket.

### NTPPacket

NTPPacket(
Poco::UInt8 * packet
);

Creates an NTPPacket.

Assumed to have at least 48 bytes.

## Destructor

### ~NTPPacket

~NTPPacket();

Destroys the NTPPacket.

## Member Functions

### leapIndicator

Poco::Int8 leapIndicator() const;

Returns the leap indicator.

### mode

Poco::Int8 mode() const;

Returns the mode.

### originateTime

Poco::Timestamp originateTime() const;

Returns the originate time

### originateTimestamp

Poco::Int64 originateTimestamp() const;

Returns the originate timestamp

### packet

void packet(
Poco::UInt8 * packet
) const;

Returns the NTP packet.

Assumed to have at least 48 bytes.

### pool

Poco::Int8 pool() const;

Returns the pool.

### precision

Poco::Int8 precision() const;

Returns the precision

### receiveTime

Poco::Timestamp receiveTime() const;

Returns the receive time

### receiveTimestamp

Poco::Int64 receiveTimestamp() const;

Returns the receive timestamp

### referenceId

Poco::Int32 referenceId() const;

Returns the reference id

### referenceTime

Poco::Timestamp referenceTime() const;

Returns the reference time

### referenceTimestamp

Poco::Int64 referenceTimestamp() const;

Returns the reference timestamp

### rootDelay

Poco::Int32 rootDelay() const;

Returns the root delay

### rootDispersion

Poco::Int32 rootDispersion() const;

Returns the root dispersion

### setPacket

void setPacket(
Poco::UInt8 * packet
);

Returns the NTP packet.

Assumed to have exactly 48 bytes.

### stratum

Poco::Int8 stratum() const;

Returns the stratum.

### transmitTime

Poco::Timestamp transmitTime() const;

Returns the transmit time

### transmitTimestamp

Poco::Int64 transmitTimestamp() const;

Returns the transmit timestamp

### version

Poco::Int8 version() const;

Returns the version.