The cl-ntp-client Reference Manual

This is the cl-ntp-client Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:30:35 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-ntp-client

A simple NTP (Network Time Protocol) client in Common Lisp

Author

Eugene Zaikonnikov

License

BSD

Dependencies
  • alexandria (system).
  • usocket (system).
Source

cl-ntp-client.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-ntp-client/cl-ntp-client.asd

Source

cl-ntp-client.asd.

Parent Component

cl-ntp-client (system).

ASDF Systems

cl-ntp-client.


3.1.2 cl-ntp-client/package.lisp

Source

cl-ntp-client.asd.

Parent Component

cl-ntp-client (system).

Packages

cl-ntp-client.


3.1.3 cl-ntp-client/cl-ntp-client.lisp

Dependency

package.lisp (file).

Source

cl-ntp-client.asd.

Parent Component

cl-ntp-client (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-ntp-client

Source

package.lisp.

Nickname

ntp

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Constants

Constant: +micros+
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Constant: +millis+
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Constant: +nanos+
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.


5.1.2 Macros

Macro: big-time (values)

Convert the NTP second/fraction value pair into a (large) integer

Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Macro: small-time (time)

Convert the integer time representation back into NTP value pair domain

Package

cl-ntp-client.

Source

cl-ntp-client.lisp.


5.1.3 Ordinary functions

Function: fraction-to-internal (fraction)
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: fraction-to-seconds (fraction)
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: fraction-to-usec (fraction)

Fixed point conversion to microseconds

Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: from-fraction (fraction unit)
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: seconds-to-fraction (seconds)
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: sub-internal (fraction)

Returns the remainder of ntp value less than internal-time-units-per-second

Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: to-fraction (time divisor-unit)
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: usec-to-fraction (usec)

Fixed point conversion from microseconds

Package

cl-ntp-client.

Source

cl-ntp-client.lisp.


5.1.4 Generic functions

Generic Function: adjusted-big-time (o)
Package

cl-ntp-client.

Methods
Method: adjusted-big-time ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: get-adjusted-universal-time (o)
Package

cl-ntp-client.

Methods
Method: get-adjusted-universal-time ((o ntp))
Source

cl-ntp-client.lisp.

Generic Reader: local-stratum (object)
Package

cl-ntp-client.

Methods
Reader Method: local-stratum ((ntp ntp))

automatically generated reader method

Source

cl-ntp-client.lisp.

Target Slot

local-stratum.

Generic Writer: (setf local-stratum) (object)
Package

cl-ntp-client.

Methods
Writer Method: (setf local-stratum) ((ntp ntp))

automatically generated writer method

Source

cl-ntp-client.lisp.

Target Slot

local-stratum.

Generic Reader: ntp-address (object)
Package

cl-ntp-client.

Methods
Reader Method: ntp-address ((ntp ntp))

automatically generated reader method

Source

cl-ntp-client.lisp.

Target Slot

address.

Generic Writer: (setf ntp-address) (object)
Package

cl-ntp-client.

Methods
Writer Method: (setf ntp-address) ((ntp ntp))

automatically generated writer method

Source

cl-ntp-client.lisp.

Target Slot

address.

Generic Function: synchronize (o &optional server)
Package

cl-ntp-client.

Methods
Method: synchronize ((o ntp) &optional server)
Source

cl-ntp-client.lisp.


5.1.5 Classes

Class: ntp
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Direct methods
Direct slots
Slot: buffer
Type

(simple-array (unsigned-byte 8) (48))

Initform

(make-array 48 :element-type (quote (unsigned-byte 8)) :initial-element 0)

Readers

buffer.

Writers

This slot is read-only.

Slot: offset
Type

integer

Initform

(- (cl-ntp-client:big-time (values (get-universal-time) 0)) (cl-ntp-client::real-big-time))

Readers

offset.

Writers

(setf offset).

Slot: local-stratum
Type

integer

Initform

8

Readers

local-stratum.

Writers

(setf local-stratum).

Slot: address
Initform

:ntp-address

Readers

ntp-address.

Writers

(setf ntp-address).


5.2 Internals


5.2.1 Ordinary functions

Function: delay-to-usec (delay)

Scaled delay to microseconds conversion

Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: read32 (array pos)
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: real-big-time ()
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.

Function: write32 (array pos val)
Package

cl-ntp-client.

Source

cl-ntp-client.lisp.


5.2.2 Generic functions

Generic Reader: buffer (object)
Package

cl-ntp-client.

Methods
Reader Method: buffer ((ntp ntp))

automatically generated reader method

Source

cl-ntp-client.lisp.

Target Slot

buffer.

Generic Function: leap-indicator (o)
Package

cl-ntp-client.

Methods
Method: leap-indicator ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: mode (o)
Package

cl-ntp-client.

Methods
Method: mode ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: (setf mode) (o)
Package

cl-ntp-client.

Methods
Method: (setf mode) ((o ntp))
Source

cl-ntp-client.lisp.

Generic Reader: offset (object)
Package

cl-ntp-client.

Methods
Reader Method: offset ((ntp ntp))

automatically generated reader method

Source

cl-ntp-client.lisp.

Target Slot

offset.

Generic Writer: (setf offset) (object)
Package

cl-ntp-client.

Methods
Writer Method: (setf offset) ((ntp ntp))

automatically generated writer method

Source

cl-ntp-client.lisp.

Target Slot

offset.

Generic Function: origtm-f (o)
Package

cl-ntp-client.

Methods
Method: origtm-f ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: (setf origtm-f) (o)
Package

cl-ntp-client.

Methods
Method: (setf origtm-f) ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: origtm-s (o)
Package

cl-ntp-client.

Methods
Method: origtm-s ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: (setf origtm-s) (o)
Package

cl-ntp-client.

Methods
Method: (setf origtm-s) ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: poll (o)
Package

cl-ntp-client.

Methods
Method: poll ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: precision (o)
Package

cl-ntp-client.

Methods
Method: precision ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: ref-id (o)
Package

cl-ntp-client.

Methods
Method: ref-id ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: reftm-f (o)
Package

cl-ntp-client.

Methods
Method: reftm-f ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: reftm-s (o)
Package

cl-ntp-client.

Methods
Method: reftm-s ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: root-delay (o)
Package

cl-ntp-client.

Methods
Method: root-delay ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: root-dispersion (o)
Package

cl-ntp-client.

Methods
Method: root-dispersion ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: run-server-exchange (o address)
Package

cl-ntp-client.

Methods
Method: run-server-exchange ((o ntp) address)

Communicates with remote server to return time offset from the local clock

Source

cl-ntp-client.lisp.

Generic Function: rxtm-f (o)
Package

cl-ntp-client.

Methods
Method: rxtm-f ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: rxtm-s (o)
Package

cl-ntp-client.

Methods
Method: rxtm-s ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: stratum (o)
Package

cl-ntp-client.

Methods
Method: stratum ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: txtm-f (o)
Package

cl-ntp-client.

Methods
Method: txtm-f ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: txtm-s (o)
Package

cl-ntp-client.

Methods
Method: txtm-s ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: version-number (o)
Package

cl-ntp-client.

Methods
Method: version-number ((o ntp))
Source

cl-ntp-client.lisp.

Generic Function: (setf version-number) (o)
Package

cl-ntp-client.

Methods
Method: (setf version-number) ((o ntp))
Source

cl-ntp-client.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   D   F   G   L   M   N   O   P   R   S   T   U   V   W  
Index Entry  Section

(
(setf local-stratum): Public generic functions
(setf local-stratum): Public generic functions
(setf mode): Private generic functions
(setf mode): Private generic functions
(setf ntp-address): Public generic functions
(setf ntp-address): Public generic functions
(setf offset): Private generic functions
(setf offset): Private generic functions
(setf origtm-f): Private generic functions
(setf origtm-f): Private generic functions
(setf origtm-s): Private generic functions
(setf origtm-s): Private generic functions
(setf version-number): Private generic functions
(setf version-number): Private generic functions

A
adjusted-big-time: Public generic functions
adjusted-big-time: Public generic functions

B
big-time: Public macros
buffer: Private generic functions
buffer: Private generic functions

D
delay-to-usec: Private ordinary functions

F
fraction-to-internal: Public ordinary functions
fraction-to-seconds: Public ordinary functions
fraction-to-usec: Public ordinary functions
from-fraction: Public ordinary functions
Function, delay-to-usec: Private ordinary functions
Function, fraction-to-internal: Public ordinary functions
Function, fraction-to-seconds: Public ordinary functions
Function, fraction-to-usec: Public ordinary functions
Function, from-fraction: Public ordinary functions
Function, read32: Private ordinary functions
Function, real-big-time: Private ordinary functions
Function, seconds-to-fraction: Public ordinary functions
Function, sub-internal: Public ordinary functions
Function, to-fraction: Public ordinary functions
Function, usec-to-fraction: Public ordinary functions
Function, write32: Private ordinary functions

G
Generic Function, (setf local-stratum): Public generic functions
Generic Function, (setf mode): Private generic functions
Generic Function, (setf ntp-address): Public generic functions
Generic Function, (setf offset): Private generic functions
Generic Function, (setf origtm-f): Private generic functions
Generic Function, (setf origtm-s): Private generic functions
Generic Function, (setf version-number): Private generic functions
Generic Function, adjusted-big-time: Public generic functions
Generic Function, buffer: Private generic functions
Generic Function, get-adjusted-universal-time: Public generic functions
Generic Function, leap-indicator: Private generic functions
Generic Function, local-stratum: Public generic functions
Generic Function, mode: Private generic functions
Generic Function, ntp-address: Public generic functions
Generic Function, offset: Private generic functions
Generic Function, origtm-f: Private generic functions
Generic Function, origtm-s: Private generic functions
Generic Function, poll: Private generic functions
Generic Function, precision: Private generic functions
Generic Function, ref-id: Private generic functions
Generic Function, reftm-f: Private generic functions
Generic Function, reftm-s: Private generic functions
Generic Function, root-delay: Private generic functions
Generic Function, root-dispersion: Private generic functions
Generic Function, run-server-exchange: Private generic functions
Generic Function, rxtm-f: Private generic functions
Generic Function, rxtm-s: Private generic functions
Generic Function, stratum: Private generic functions
Generic Function, synchronize: Public generic functions
Generic Function, txtm-f: Private generic functions
Generic Function, txtm-s: Private generic functions
Generic Function, version-number: Private generic functions
get-adjusted-universal-time: Public generic functions
get-adjusted-universal-time: Public generic functions

L
leap-indicator: Private generic functions
leap-indicator: Private generic functions
local-stratum: Public generic functions
local-stratum: Public generic functions

M
Macro, big-time: Public macros
Macro, small-time: Public macros
Method, (setf local-stratum): Public generic functions
Method, (setf mode): Private generic functions
Method, (setf ntp-address): Public generic functions
Method, (setf offset): Private generic functions
Method, (setf origtm-f): Private generic functions
Method, (setf origtm-s): Private generic functions
Method, (setf version-number): Private generic functions
Method, adjusted-big-time: Public generic functions
Method, buffer: Private generic functions
Method, get-adjusted-universal-time: Public generic functions
Method, leap-indicator: Private generic functions
Method, local-stratum: Public generic functions
Method, mode: Private generic functions
Method, ntp-address: Public generic functions
Method, offset: Private generic functions
Method, origtm-f: Private generic functions
Method, origtm-s: Private generic functions
Method, poll: Private generic functions
Method, precision: Private generic functions
Method, ref-id: Private generic functions
Method, reftm-f: Private generic functions
Method, reftm-s: Private generic functions
Method, root-delay: Private generic functions
Method, root-dispersion: Private generic functions
Method, run-server-exchange: Private generic functions
Method, rxtm-f: Private generic functions
Method, rxtm-s: Private generic functions
Method, stratum: Private generic functions
Method, synchronize: Public generic functions
Method, txtm-f: Private generic functions
Method, txtm-s: Private generic functions
Method, version-number: Private generic functions
mode: Private generic functions
mode: Private generic functions

N
ntp-address: Public generic functions
ntp-address: Public generic functions

O
offset: Private generic functions
offset: Private generic functions
origtm-f: Private generic functions
origtm-f: Private generic functions
origtm-s: Private generic functions
origtm-s: Private generic functions

P
poll: Private generic functions
poll: Private generic functions
precision: Private generic functions
precision: Private generic functions

R
read32: Private ordinary functions
real-big-time: Private ordinary functions
ref-id: Private generic functions
ref-id: Private generic functions
reftm-f: Private generic functions
reftm-f: Private generic functions
reftm-s: Private generic functions
reftm-s: Private generic functions
root-delay: Private generic functions
root-delay: Private generic functions
root-dispersion: Private generic functions
root-dispersion: Private generic functions
run-server-exchange: Private generic functions
run-server-exchange: Private generic functions
rxtm-f: Private generic functions
rxtm-f: Private generic functions
rxtm-s: Private generic functions
rxtm-s: Private generic functions

S
seconds-to-fraction: Public ordinary functions
small-time: Public macros
stratum: Private generic functions
stratum: Private generic functions
sub-internal: Public ordinary functions
synchronize: Public generic functions
synchronize: Public generic functions

T
to-fraction: Public ordinary functions
txtm-f: Private generic functions
txtm-f: Private generic functions
txtm-s: Private generic functions
txtm-s: Private generic functions

U
usec-to-fraction: Public ordinary functions

V
version-number: Private generic functions
version-number: Private generic functions

W
write32: Private ordinary functions