The uuid Reference Manual

This is the uuid Reference Manual, version 2012.12.26, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed May 15 07:15:50 2024 GMT+0.

Table of Contents


1 Systems

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


1.1 uuid

UUID Generation

Maintainer

Boian Tzonev

Author

Boian Tzonev

License

LLGPL

Long Description

Lisp implementation of rfc 4122

Version

2012.12.26

Dependencies
  • ironclad (system).
  • trivial-utf-8 (system).
Source

uuid.asd.

Child Component

uuid.lisp (file).


2 Files

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


2.1 Lisp


2.1.1 uuid/uuid.asd

Source

uuid.asd.

Parent Component

uuid (system).

ASDF Systems

uuid.

Packages

uuid-asd.


2.1.2 uuid/uuid.lisp

Source

uuid.asd.

Parent Component

uuid (system).

Packages

uuid.

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 uuid

Source

uuid.lisp.

Use List

common-lisp.

Public Interface
Internals

3.2 uuid-asd

Source

uuid.asd.

Use List
  • asdf/interface.
  • common-lisp.

4 Definitions

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


4.1 Public Interface


4.1.1 Special variables

Special Variable: *ticks-per-count*

Holds the amount of ticks per count. The ticks per count determine the number of possible version 1 uuids created for one time interval. Common Lisp provides INTERNAL-TIME-UNITS-PER-SECOND which gives the ticks per count for the current system so *ticks-per-count* can be set to INTERNAL-TIME-UNITS-PER-SECOND

Package

uuid.

Source

uuid.lisp.

Special Variable: +namespace-dns+

The DNS Namespace. Can be used for the generation of uuids version 3 and 5

Package

uuid.

Source

uuid.lisp.

Special Variable: +namespace-oid+

The OID Namespace. Can be used for the generation of uuids version 3 and 5

Package

uuid.

Source

uuid.lisp.

Special Variable: +namespace-url+

The URL Namespace. Can be used for the generation of uuids version 3 and 5

Package

uuid.

Source

uuid.lisp.

Special Variable: +namespace-x500+

The x500+ Namespace. Can be used for the generation of uuids version 3 and 5

Package

uuid.

Source

uuid.lisp.


4.1.2 Ordinary functions

Function: byte-array-to-uuid (array)

Converts a byte-array generated with uuid-to-byte-array to an uuid.

Package

uuid.

Source

uuid.lisp.

Function: format-as-urn (stream uuid)

Prints the uuid as a urn

Package

uuid.

Source

uuid.lisp.

Function: make-null-uuid ()

Generates a NULL uuid (i.e 00000000-0000-0000-0000-000000000000)

Package

uuid.

Source

uuid.lisp.

Function: make-uuid-from-string (string)

Creates an uuid from the string represenation of an uuid. (example input string 6ba7b810-9dad-11d1-80b4-00c04fd430c8)

Package

uuid.

Source

uuid.lisp.

Function: make-v1-uuid ()

Generates a version 1 (time-based) uuid.

Package

uuid.

Source

uuid.lisp.

Function: make-v3-uuid (namespace name)

Generates a version 3 (named based MD5) uuid.

Package

uuid.

Source

uuid.lisp.

Function: make-v4-uuid ()

Generates a version 4 (random) uuid

Package

uuid.

Source

uuid.lisp.

Function: make-v5-uuid (namespace name)

Generates a version 5 (name based SHA1) uuid.

Package

uuid.

Source

uuid.lisp.

Function: print-bytes (stream uuid)

Prints the raw bytes in hex form. (example output 6ba7b8109dad11d180b400c04fd430c8)

Package

uuid.

Source

uuid.lisp.

Function: uuid-to-byte-array (uuid)

Converts an uuid to byte-array

Package

uuid.

Source

uuid.lisp.

Function: uuid= (uuid1 uuid2)
Package

uuid.

Source

uuid.lisp.


4.1.3 Standalone methods

Method: print-object ((id uuid) stream)

Prints an uuid in the string represenation of an uuid. (example string 6ba7b810-9dad-11d1-80b4-00c04fd430c8)

Source

uuid.lisp.


4.1.4 Classes

Class: uuid

Represents an uuid

Package

uuid.

Source

uuid.lisp.

Direct methods
Direct slots
Slot: time-low
Type

(unsigned-byte 32)

Initform

0

Initargs

:time-low

Readers

time-low.

Writers

(setf time-low).

Slot: time-mid
Type

(unsigned-byte 16)

Initform

0

Initargs

:time-mid

Readers

time-mid.

Writers

(setf time-mid).

Slot: time-high-and-version
Type

(unsigned-byte 16)

Initform

0

Initargs

:time-high

Readers

time-high.

Writers

(setf time-high).

Slot: clock-seq-and-reserved
Type

(unsigned-byte 8)

Initform

0

Initargs

:clock-seq-var

Readers

clock-seq-var.

Writers

(setf clock-seq-var).

Slot: clock-seq-low
Type

(unsigned-byte 8)

Initform

0

Initargs

:clock-seq-low

Readers

clock-seq-low.

Writers

(setf clock-seq-low).

Slot: node
Type

(unsigned-byte 48)

Initform

0

Initargs

:node

Readers

node.

Writers

(setf node).


4.2 Internals


4.2.1 Special variables

Special Variable: *clock-seq*

Holds the clock sequence. It is set when a version 1 uuid is generated for the first time and remains unchanged during a whole session.

Package

uuid.

Source

uuid.lisp.

Special Variable: *node*

Holds the IEEE 802 MAC address or a random number when such is not available

Package

uuid.

Source

uuid.lisp.

Special Variable: *uuid-random-state*

Holds the random state used for generation of random numbers

Package

uuid.

Source

uuid.lisp.


4.2.2 Macros

Macro: arr-to-bytes (from to array)

Helper macro used in byte-array-to-uuid.

Package

uuid.

Source

uuid.lisp.


4.2.3 Ordinary functions

Function: digest-uuid (digest uuid name)

Helper function that produces a digest from a namespace (a byte array) and a string. Used for the generation of version 3 and 5 uuids.

Package

uuid.

Source

uuid.lisp.

Function: format-v3or5-uuid (hash ver)

Helper function to format a version 3 or 5 uuid. Formatting means setting the appropriate version bytes.

Package

uuid.

Source

uuid.lisp.

Function: get-node-id ()

Get MAC address of first ethernet device

Package

uuid.

Source

uuid.lisp.

Function: get-timestamp ()

Get timestamp, compensate nanoseconds intervals

Package

uuid.

Source

uuid.lisp.


4.2.4 Generic functions

Generic Reader: clock-seq-low (object)
Package

uuid.

Methods
Reader Method: clock-seq-low ((uuid uuid))

automatically generated reader method

Source

uuid.lisp.

Target Slot

clock-seq-low.

Generic Writer: (setf clock-seq-low) (object)
Package

uuid.

Methods
Writer Method: (setf clock-seq-low) ((uuid uuid))

automatically generated writer method

Source

uuid.lisp.

Target Slot

clock-seq-low.

Generic Reader: clock-seq-var (object)
Package

uuid.

Methods
Reader Method: clock-seq-var ((uuid uuid))

automatically generated reader method

Source

uuid.lisp.

Target Slot

clock-seq-and-reserved.

Generic Writer: (setf clock-seq-var) (object)
Package

uuid.

Methods
Writer Method: (setf clock-seq-var) ((uuid uuid))

automatically generated writer method

Source

uuid.lisp.

Target Slot

clock-seq-and-reserved.

Generic Reader: node (object)
Package

uuid.

Methods
Reader Method: node ((uuid uuid))

automatically generated reader method

Source

uuid.lisp.

Target Slot

node.

Generic Writer: (setf node) (object)
Package

uuid.

Methods
Writer Method: (setf node) ((uuid uuid))

automatically generated writer method

Source

uuid.lisp.

Target Slot

node.

Generic Reader: time-high (object)
Package

uuid.

Methods
Reader Method: time-high ((uuid uuid))

automatically generated reader method

Source

uuid.lisp.

Target Slot

time-high-and-version.

Generic Writer: (setf time-high) (object)
Package

uuid.

Methods
Writer Method: (setf time-high) ((uuid uuid))

automatically generated writer method

Source

uuid.lisp.

Target Slot

time-high-and-version.

Generic Reader: time-low (object)
Package

uuid.

Methods
Reader Method: time-low ((uuid uuid))

automatically generated reader method

Source

uuid.lisp.

Target Slot

time-low.

Generic Writer: (setf time-low) (object)
Package

uuid.

Methods
Writer Method: (setf time-low) ((uuid uuid))

automatically generated writer method

Source

uuid.lisp.

Target Slot

time-low.

Generic Reader: time-mid (object)
Package

uuid.

Methods
Reader Method: time-mid ((uuid uuid))

automatically generated reader method

Source

uuid.lisp.

Target Slot

time-mid.

Generic Writer: (setf time-mid) (object)
Package

uuid.

Methods
Writer Method: (setf time-mid) ((uuid uuid))

automatically generated writer method

Source

uuid.lisp.

Target Slot

time-mid.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
A   B   C   D   F   G   M   N   P   T   U  
Index Entry  Section

(
(setf clock-seq-low): Private generic functions
(setf clock-seq-low): Private generic functions
(setf clock-seq-var): Private generic functions
(setf clock-seq-var): Private generic functions
(setf node): Private generic functions
(setf node): Private generic functions
(setf time-high): Private generic functions
(setf time-high): Private generic functions
(setf time-low): Private generic functions
(setf time-low): Private generic functions
(setf time-mid): Private generic functions
(setf time-mid): Private generic functions

A
arr-to-bytes: Private macros

B
byte-array-to-uuid: Public ordinary functions

C
clock-seq-low: Private generic functions
clock-seq-low: Private generic functions
clock-seq-var: Private generic functions
clock-seq-var: Private generic functions

D
digest-uuid: Private ordinary functions

F
format-as-urn: Public ordinary functions
format-v3or5-uuid: Private ordinary functions
Function, byte-array-to-uuid: Public ordinary functions
Function, digest-uuid: Private ordinary functions
Function, format-as-urn: Public ordinary functions
Function, format-v3or5-uuid: Private ordinary functions
Function, get-node-id: Private ordinary functions
Function, get-timestamp: Private ordinary functions
Function, make-null-uuid: Public ordinary functions
Function, make-uuid-from-string: Public ordinary functions
Function, make-v1-uuid: Public ordinary functions
Function, make-v3-uuid: Public ordinary functions
Function, make-v4-uuid: Public ordinary functions
Function, make-v5-uuid: Public ordinary functions
Function, print-bytes: Public ordinary functions
Function, uuid-to-byte-array: Public ordinary functions
Function, uuid=: Public ordinary functions

G
Generic Function, (setf clock-seq-low): Private generic functions
Generic Function, (setf clock-seq-var): Private generic functions
Generic Function, (setf node): Private generic functions
Generic Function, (setf time-high): Private generic functions
Generic Function, (setf time-low): Private generic functions
Generic Function, (setf time-mid): Private generic functions
Generic Function, clock-seq-low: Private generic functions
Generic Function, clock-seq-var: Private generic functions
Generic Function, node: Private generic functions
Generic Function, time-high: Private generic functions
Generic Function, time-low: Private generic functions
Generic Function, time-mid: Private generic functions
get-node-id: Private ordinary functions
get-timestamp: Private ordinary functions

M
Macro, arr-to-bytes: Private macros
make-null-uuid: Public ordinary functions
make-uuid-from-string: Public ordinary functions
make-v1-uuid: Public ordinary functions
make-v3-uuid: Public ordinary functions
make-v4-uuid: Public ordinary functions
make-v5-uuid: Public ordinary functions
Method, (setf clock-seq-low): Private generic functions
Method, (setf clock-seq-var): Private generic functions
Method, (setf node): Private generic functions
Method, (setf time-high): Private generic functions
Method, (setf time-low): Private generic functions
Method, (setf time-mid): Private generic functions
Method, clock-seq-low: Private generic functions
Method, clock-seq-var: Private generic functions
Method, node: Private generic functions
Method, print-object: Public standalone methods
Method, time-high: Private generic functions
Method, time-low: Private generic functions
Method, time-mid: Private generic functions

N
node: Private generic functions
node: Private generic functions

P
print-bytes: Public ordinary functions
print-object: Public standalone methods

T
time-high: Private generic functions
time-high: Private generic functions
time-low: Private generic functions
time-low: Private generic functions
time-mid: Private generic functions
time-mid: Private generic functions

U
uuid-to-byte-array: Public ordinary functions
uuid=: Public ordinary functions