Poco::Net

class NTPPacket

File Information

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 inline

Poco::Int8 leapIndicator() const;

Returns the leap indicator.

mode inline

Poco::Int8 mode() const;

Returns the mode.

originateTime

Poco::Timestamp originateTime() const;

Returns the originate time

originateTimestamp inline

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 inline

Poco::Int8 pool() const;

Returns the pool.

precision inline

Poco::Int8 precision() const;

Returns the precision

receiveTime

Poco::Timestamp receiveTime() const;

Returns the receive time

receiveTimestamp inline

Poco::Int64 receiveTimestamp() const;

Returns the receive timestamp

referenceId inline

Poco::Int32 referenceId() const;

Returns the reference id

referenceTime

Poco::Timestamp referenceTime() const;

Returns the reference time

referenceTimestamp inline

Poco::Int64 referenceTimestamp() const;

Returns the reference timestamp

rootDelay inline

Poco::Int32 rootDelay() const;

Returns the root delay

rootDispersion inline

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 inline

Poco::Int8 stratum() const;

Returns the stratum.

transmitTime

Poco::Timestamp transmitTime() const;

Returns the transmit time

transmitTimestamp inline

Poco::Int64 transmitTimestamp() const;

Returns the transmit timestamp

version inline

Poco::Int8 version() const;

Returns the version.

Securely control IoT edge devices from anywhere   Connect a Device