You are looking at historical revision 33273 of this page. It may differ significantly from its current revision.

ola

:toc:

Description

Basic bindings for libola, Open Lighting Architecture. Classes covered so far are DmxBuffer and StreamingClient.

Authors

Requirements

Chicken Eggs

C Headers

API

Logging

[procedure] (init-logging [level] [output]) => bool

Level may be one of the following symbols:

Output may be one of the following symbols:

DmxBuffer

[procedure] (dmxbuffer) => dmxbuffer

Construct a new empty dmxbuffer.

[procedure] (dmxbuffer other-dmxbuffer) => dmxbuffer

Construct a new dmxbuffer with the same contents as other-dmxbuffer.

[procedure] (dmxbuffer blob) => dmxbuffer

Contents a new dmxbuffer with the same contents as blob.

[procedure] (dmxbuffer? dmxbuffer) => bool

Dmxbuffer predicate.

[procedure] (dmxbuffer=? dmxbuffer-a dmxbuffer-b) => bool

Test whether dmxbuffer-a and dmxbuffer-b have equal contents.

[procedure] (dmxbuffer-size dmxbuffer) => size

Size of dmxbuffer.

[procedure] (dmxbuffer-get dmxbuffer) => blob

Return contents of dmxbuffer as a blob.

[procedure] (dmxbuffer-get-channel dmxbuffer channel) => value

Return the value of the given channel in dmxbuffer.

[procedure] (dmxbuffer-get-range dmxbuffer offset length) => blob

Return a blob of the requested range in dmxbuffer.

[procedure] (dmxbuffer-set! dmxbuffer blob offset size) => bool

Set the contents of dmxbuffer to contents of blob at given offset and size.

[procedure] (dmxbuffer-set! dmxbuffer blob) => bool

Set the contents of dmxbuffer to contents of blob.

[procedure] (dmxbuffer-set! dmxbuffer dmxbuffer-other) => bool

Set the contents of dmxbuffer to contents of dmxbuffer-other.

[procedure] (dmxbuffer-set-channel! dmxbuffer channel value) => undefined

Set dmxbuffer channel to value.

[procedure] (dmxbuffer-set-from-string! dmxbuffer str) => bool

Complement of dmxbuffer->string. Sets the contents of dmxbuffer according to the specially formatted string str. The format of the string is integers separated by commas, where 0's may be omitted, e.g. "1,2,,255"

[procedure] (dmxbuffer-set-range! dmxbuffer dst-offset blob) => bool

Set contents of dmxbuffer from dst-offset to contents of blob.

[procedure] (dmxbuffer-set-range! dmxbuffer dst-offset blob src-offset src-length) => bool

Set contents of dmxbuffer from dst-offset to contents of blob, from src-offset, src-length bytes.

[procedure] (dmxbuffer-set-range-to-value! dmxbuffer offset value length) => bool

Set contents of dmxbuffer from offset for length to value.

[procedure] (dmxbuffer-htp-merge! dmxbuffer other-dmxbuffer) => bool

Perform an HTP merge (high value merge) with other-dmxbuffer into dmxbuffer.

[procedure] (dmxbuffer-blackout! dmxbuffer) => bool

Set all channels to 0 in dmxbuffer.

[procedure] (dmxbuffer-reset! dmxbuffer) => undefined

Reset dmxbuffer size to 0.

[procedure] (dmxbuffer->string dmxbuffer) => string

Complement of 'dmxbuffer-set-from-string!'. Returns a human-readable string representing the contents of dmxbuffer - comma separated decimal values.

StreamingClient

[procedure] (streamingclient [auto-start: bool] [server-port: port]) => streamingclient

Constructs a client. Auto-start is whether to start olad if it is not already running, default true. Server-port is the port to use, default 9010.

[procedure] (streamingclient-setup streamingclient) => bool

Required initialization of a streamingclient.

[procedure] (streamingclient-stop streamingclient) => undefined

Stops a streamingclient.

[procedure] (streamingclient-send-dmx streamingclient universe dmxbuffer) => bool

Sends contents of dmxbuffer to the given universe on streamingclient.

Examples

(use ola miscmacros)
(let ((client (streamingclient auto-start: #f)))
  (unless (streamingclient-setup client)
    (error "OLA StreamingClient setup failed"))
  (streamingclient-send-dmx client 0 (dmxbuffer (string->blob "AeIoUaEiO"))))

License

LGPL 3

Version History