This is the pjlink Reference Manual, version 1.2.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:17:33 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
pjlink
A library for communicating with PJLink-compatible projectors over TCP/IP.
see https://pjlink.jbmia.or.jp/english/ for information on PJLink and compatible devices.
Wilfredo Velázquez-Rodríguez <zulu.inuoe@gmail.com>
CC0 1.0 Universal
1.2.1
alexandria
(system).
bordeaux-threads
(system).
ip-interfaces
(system).
md5
(system).
split-sequence
(system).
trivial-garbage
(system).
usocket
(system).
qlfile
(file).
package.lisp
(file).
pjlink.lisp
(file).
class1.lisp
(file).
class2.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
pjlink/package.lisp
pjlink/pjlink.lisp
package.lisp
(file).
pjlink
(system).
+default-port+
(constant).
+max-password-length+
(constant).
authorization-error
(condition).
host
(generic function).
(setf host)
(writer method).
hostname
(type).
local-host
(generic function).
(setf local-host)
(writer method).
local-port
(generic function).
(setf local-port)
(writer method).
out-of-parameter-error
(condition).
out-of-parameter-error-parameter
(reader method).
password
(generic function).
(setf password)
(writer method).
pjlink-config
(class).
port
(generic function).
(setf port)
(writer method).
projector-command-error
(condition).
projector-command-error-class
(reader method).
projector-command-error-command
(reader method).
projector-command-error-host
(reader method).
projector-display-error
(condition).
unavailable-time-error
(condition).
undefined-command-error
(condition).
%auth-handshake
(function).
%chars->string
(compiler macro).
%chars->string
(function).
%class->char
(function).
%defpjlink-get
(macro).
%defpjlink-set
(macro).
%encrypt-password
(function).
%md5->hex-str
(function).
%nibble->hex
(function).
%open-pjlink-socket
(function).
%pjlink-get
(function).
%pjlink-set
(function).
%read-pjlink-command-line
(function).
%read-response
(function).
%valid-command-response-p
(function).
%verify-connection-response-and-generate-digest
(function).
%with-pjlink-connection
(macro).
%write-command
(function).
+max-command-line-length+
(constant).
+max-connection-response-length+
(constant).
+seed-length+
(constant).
pjlink/class1.lisp
pjlink.lisp
(file).
pjlink
(system).
av-mute-status
(type).
error-component
(type).
error-status
(type).
get-av-mute
(function).
get-error-status
(function).
get-input
(function).
get-inputs
(function).
get-lamps
(function).
get-manufacturer-name
(function).
get-pjlink-class
(function).
get-power-status
(function).
get-product-name
(function).
get-projector-name
(function).
input-number
(function).
input-number
(type).
input-type
(function).
input-type
(type).
lamp-hours
(function).
lamp-hours
(type).
lamp-on-p
(function).
lamp-status
(function).
lamp-status
(type).
power-off
(function).
power-on
(function).
power-status
(type).
projector-input
(function).
projector-input
(type).
projector-status
(function).
projector-status
(type).
set-av-mute
(function).
set-input
(function).
set-input*
(function).
%avmt->string
(function).
%avmt->sym
(function).
%erst->sym
(function).
%input->string
(function).
%input->sym
(function).
%inst-str->projector-inputs
(function).
%lamp-str->lamp-status
(function).
%powr->sym
(function).
get-other-info
(function).
pjlink/class2.lisp
class1.lisp
(file).
pjlink
(system).
add-handler
(function).
decrease-microphone
(function).
decrease-speaker
(function).
freeze-screen
(function).
get-filter-model
(function).
get-filter-usage-time
(function).
get-freeze-status
(function).
get-input-name
(function).
get-input-name*
(function).
get-input2
(function).
get-inputs2
(function).
get-lamp-model
(function).
get-recommended-resolution
(function).
get-resolution
(function).
get-serial-number
(function).
get-software-version
(function).
increase-microphone
(function).
increase-speaker
(function).
input-number2
(function).
input-number2
(type).
input-type2
(function).
input-type2
(type).
mac-address
(type).
make-status-listener
(function).
projector-input2
(function).
projector-input2
(type).
projector-resolution
(type).
remove-handler
(function).
search-projectors
(function).
set-input2
(function).
set-input2*
(function).
start-listener
(function).
status-event
(type).
status-handler
(type).
status-listener
(class).
stop-listener
(function).
unfreeze-screen
(function).
%address-and-broadcast
(function).
%calculate-broadcast-addr
(function).
%calculate-broadcast-addr*
(function).
%find-broadcast-interface
(function).
%input2->string
(function).
%input2->sym
(function).
%inst-str2->projector-input2s
(function).
%make-end-thread-fn
(function).
%make-finalizer
(function).
%make-listener-thread
(function).
%make-ref
(function).
%normalize-hostname
(function).
%notify-handlers
(function).
%parse-erst-status
(function).
%parse-inpt-status
(function).
%parse-lkup-status
(function).
%parse-mac-address
(function).
%parse-powr-status
(function).
%parse-search-ack
(function).
%ref
(structure).
%ref-value
(reader).
(setf %ref-value)
(writer).
%res-str->resolution
(function).
%validate-and-parse-status
(function).
%validate-search-ack
(function).
Packages are listed by definition order.
pjlink
common-lisp
.
+default-port+
(constant).
+max-password-length+
(constant).
add-handler
(function).
authorization-error
(condition).
av-mute-status
(type).
decrease-microphone
(function).
decrease-speaker
(function).
error-component
(type).
error-status
(type).
freeze-screen
(function).
get-av-mute
(function).
get-error-status
(function).
get-filter-model
(function).
get-filter-usage-time
(function).
get-freeze-status
(function).
get-input
(function).
get-input-name
(function).
get-input-name*
(function).
get-input2
(function).
get-inputs
(function).
get-inputs2
(function).
get-lamp-model
(function).
get-lamps
(function).
get-manufacturer-name
(function).
get-pjlink-class
(function).
get-power-status
(function).
get-product-name
(function).
get-projector-name
(function).
get-recommended-resolution
(function).
get-resolution
(function).
get-serial-number
(function).
get-software-version
(function).
host
(generic function).
(setf host)
(generic writer).
hostname
(type).
increase-microphone
(function).
increase-speaker
(function).
input-number
(function).
input-number
(type).
input-number2
(function).
input-number2
(type).
input-type
(function).
input-type
(type).
input-type2
(function).
input-type2
(type).
lamp-hours
(function).
lamp-hours
(type).
lamp-on-p
(function).
lamp-status
(function).
lamp-status
(type).
local-host
(generic function).
(setf local-host)
(generic writer).
local-port
(generic function).
(setf local-port)
(generic writer).
mac-address
(type).
make-status-listener
(function).
out-of-parameter-error
(condition).
out-of-parameter-error-parameter
(generic reader).
password
(generic function).
(setf password)
(generic writer).
pjlink-config
(class).
port
(generic function).
(setf port)
(generic writer).
power-off
(function).
power-on
(function).
power-status
(type).
projector-command-error
(condition).
projector-command-error-class
(generic reader).
projector-command-error-command
(generic reader).
projector-command-error-host
(generic reader).
projector-display-error
(condition).
projector-input
(function).
projector-input
(type).
projector-input2
(function).
projector-input2
(type).
projector-resolution
(type).
projector-status
(function).
projector-status
(type).
remove-handler
(function).
search-projectors
(function).
set-av-mute
(function).
set-input
(function).
set-input*
(function).
set-input2
(function).
set-input2*
(function).
start-listener
(function).
status-event
(type).
status-handler
(type).
status-listener
(class).
stop-listener
(function).
unavailable-time-error
(condition).
undefined-command-error
(condition).
unfreeze-screen
(function).
%address-and-broadcast
(function).
%auth-handshake
(function).
%avmt->string
(function).
%avmt->sym
(function).
%calculate-broadcast-addr
(function).
%calculate-broadcast-addr*
(function).
%chars->string
(compiler macro).
%chars->string
(function).
%class->char
(function).
%defpjlink-get
(macro).
%defpjlink-set
(macro).
%encrypt-password
(function).
%erst->sym
(function).
%find-broadcast-interface
(function).
%input->string
(function).
%input->sym
(function).
%input2->string
(function).
%input2->sym
(function).
%inst-str->projector-inputs
(function).
%inst-str2->projector-input2s
(function).
%lamp-str->lamp-status
(function).
%make-end-thread-fn
(function).
%make-finalizer
(function).
%make-listener-thread
(function).
%make-ref
(function).
%md5->hex-str
(function).
%nibble->hex
(function).
%normalize-hostname
(function).
%notify-handlers
(function).
%open-pjlink-socket
(function).
%parse-erst-status
(function).
%parse-inpt-status
(function).
%parse-lkup-status
(function).
%parse-mac-address
(function).
%parse-powr-status
(function).
%parse-search-ack
(function).
%pjlink-get
(function).
%pjlink-set
(function).
%powr->sym
(function).
%read-pjlink-command-line
(function).
%read-response
(function).
%ref
(structure).
%ref-value
(reader).
(setf %ref-value)
(writer).
%res-str->resolution
(function).
%valid-command-response-p
(function).
%validate-and-parse-status
(function).
%validate-search-ack
(function).
%verify-connection-response-and-generate-digest
(function).
%with-pjlink-connection
(macro).
%write-command
(function).
+max-command-line-length+
(constant).
+max-connection-response-length+
(constant).
+seed-length+
(constant).
get-other-info
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Default PJLink port.
Max number of characters in a PJLink password.
Add a ‘status-handler’ to ‘status-listener’.
Decrement the microphone volume by one level.
Decrement the speaker volume by one level.
Freeze the screen.
Query the current ‘av-mute-status’ of the projector. see ‘set-av-mute’
Query the ‘projector-status’ projector.
Get the filter replacement model numbers.
nil if no replacement model numbers are available.
Get the filter usage time of the projector.
Query the current freeze status of the projector.
true if freeze is ON
false if freeze is OFF
Query the current ‘projector-input’ on the projector.
Get the input name of the given input type and number nil if not available.
As ‘get-input-name’ but using a ‘projector-input’ or ‘projector-input2’ object instead. nil if not available.
Query the available ‘projector-input’s on the projector as a list.
Query the available ‘projector-input2’s on the projector as a list.
Get the lamp replacement model numbers.
nil if no replacement model numbers are available.
Query the available ‘projector-lamp’s on the projector as a list.
Query the projector’s manufacturer name. nil if not available.
Query the pjlink class of the projector.
Query the ‘power-status’ of the projector. see ‘set-port-on’, ‘set-power-off’
Query the projector’s product name. nil if not available.
Query the projector’s name. nil if not available.
Get the recommended ‘resolution’ for the projector.
Get the current resolution of the active input. :no-signal if no signal is available :unknown-signal if there is an unknown signal active
Get the serial number of the projector. nil if not available.
Get the software version of the projector. nil if not available.
Increment the microphone volume by one level.
Increment the speaker volume by one level.
Get the ‘input-number’ part of ‘projector-input’
Get the ‘input-number2’ part of ‘projector-input2’
Get the ‘input-type’ part of ‘projector-input’
Get the ‘input-type2’ part of ‘projector-input2’
Get the ‘lamp-hours’ part of ‘lamp-status’
Get the ‘lamp-on-p’ part of ‘lamp-status’
Create a ‘lamp-status’ from ‘lamp-hours’ and ‘on-p’
Creates a projector status listener listening on ‘local-host’.
‘handlers’ is either a ‘status-handler’ handler or a list of ‘status-handler’s
these handlers will be initially registered as ‘add-handler’
if ‘handlers’ is non-nil, the listener will be started, as per ‘start-listener’
Instruct the projector to power off.
Instruct the projector to power on.
Create a ‘projector-input’ from ‘input-type’ and ‘input-number’
Create a ‘projector-input2’ from ‘input-type2’ and ‘input-number2’
Create a ‘projector-status’ from each ‘error-component’ ‘error-status’
Remove a ‘status-handler’ from a ‘status-listener’.
Performs a PJLink broadcast search.
Returns a list of ‘(‘hostname’ . ‘mac-address’)‘ pairs representing each projector that responded.
‘local-host’ indicates the local interface to use for the search. if nil will
use the general broadcast address instead.
‘port’ is the port used for the SRCH operation.
Set the ‘av-mute-status’ on the projector. see ‘get-av-mute’
Sets the input to the given ‘input-type’ and ‘input-number’ see ‘set-input*’, ‘get-input’
As ‘set-input’ but using a ‘projector-input’ object instead.
Sets the input to the given ‘input-type2’ and ‘input-number2’
see ‘set-input2*’
see ‘get-input2’
As ‘set-input2’ but using a ‘projector-input’ or ‘projector-input2’ object instead.
Start a ‘status-listener’ if it is not already started.
This will cause incoming status notifications to alert any registered handlers.
Stop a ‘status-listener’ if it is not already stopped. This will cease listening for status notification updates.
Unfreeze the screen.
Get the ‘hostname’ designated by ‘obj’
pjlink-config
)) ¶automatically generated reader method
Use ‘obj’ as a ‘hostname’.
pjlink-config
)) ¶automatically generated writer method
Get the ‘local-host’ designated by ‘obj’.
pjlink-config
)) ¶automatically generated reader method
No specific local-host
pjlink-config
)) ¶automatically generated writer method
Get the ‘local-port’ designated by ‘obj’.
pjlink-config
)) ¶automatically generated reader method
No specific local-port
pjlink-config
)) ¶automatically generated writer method
out-of-parameter-error
)) ¶Get the password designated by ‘obj’. nil if no password is to be used.
pjlink-config
)) ¶automatically generated reader method
Provide no password
pjlink-config
)) ¶automatically generated writer method
Get the port designated by ‘obj’
pjlink-config
)) ¶automatically generated reader method
Use the default PJLink port.
pjlink-config
)) ¶automatically generated writer method
projector-command-error
)) ¶projector-command-error
)) ¶projector-command-error
)) ¶:parameter
This slot is read-only.
error
.
:host
This slot is read-only.
:class
This slot is read-only.
:command
This slot is read-only.
Holds configuration for connecting with a PJLink projector
host - host to connect to
port - port to connect to
password to use (unused if authentication disabled)
local-host - Local interface to use
local-port - Local port to use
(or null sequence)
:password
pjlink:hostname
:local-host
(or null integer)
:local-port
bordeaux-threads:lock
(bordeaux-threads:make-lock)
pjlink:hostname
(alexandria:required-argument :address)
:address
integer
(alexandria:required-argument :port)
:port
pjlink::%ref
(pjlink::%make-ref nil)
pjlink::%ref
(pjlink::%make-ref nil)
Status of the audio-video mute setting on a projector.
Audio-video mute will cease output of audio or video, without powering off the projector.
see ‘get-av-mute’
see ‘set-av-mute’
A component of a projector that can be reported
see ‘get-error-status’
see ‘projector-status’
see ‘error-status’
Status of a component of a projector.
see ‘get-error-status’
see ‘projector-status’
A valid hostname for a projector or local inteface.
Input number for a projector
see ‘set-input’
An input number for class 2 projectors, expanding the range of input numbers to [1, 35].
see ‘set-projector-input2’
An input type for a projector.
Note that a projector may have several inputs of the same type, identified by an ‘input-number’
see ‘set-input’
An input type for a class2 projector, adding ‘:internal’
Note that a projector may have several inputs of the same type, identified by an ‘input-number‘
see ‘set-projector-input2’
Number of hours a lamp has been on.
A cons of (‘lamp-hours’ . on-p)
eg.
’(500 . nil)
see ‘get-lamps’
A MAC address as a vector of 6 octets.
see ‘search-projectors’
Power status of a projector.
see ‘power-on’
see ‘power-off’
see ‘get-power-status’
A cons of (‘input-type’ . ‘input-number’)
eg.
’(:digital . 5)
see ‘get-input’
see ‘set-input’
see ‘set-input*’
see ‘get-inputs’
A cons of (‘input-type2’ . ‘input-number2’)
eg.
’(:internal . 30)
see ‘get-input2’
see ‘set-input2*’
see ‘get-inputs2’
Resolution of a projector, as:
a cons of (<horz-resolution> . <vert-resolution>)
:no-signal if no signal is available
:unknown-signal if the signal is unknown
see ‘get-resolution’
see ‘get-recommended-resolution’
An alist representing the projector error state.
the keys are ‘error-component’ and values ‘error-status’
eg.
’((:fan . nil)
(:lamp . nil)
(:temperature . :warning)
(:cover-open . nil)
(:filter . :error)
(:other . nil))
see ‘get-error-status’
A keyword denoting a notification event type from the projector.
see ‘make-status-listener’
A function-designator for a function of three arguments: remote-host: a ‘hostname’ representing the origin of the status update event-type: a ‘status-event’ representing the status notification arg: an object representing the event status, depending on ‘event-type’:
:lkup - the ‘mac-address’ of the projector
:erst - ‘projector-status’
:powr - ‘power-status’
:inpt - ‘projector-input2’
see ‘make-status-listener’
The max length of a PJLink command line:
Header(1) Class(1) Command(4) Separator(1) Param(128) CR(1)
Max length of an initial connection response. This is one with authentication enabled: PJLINK 1 01234567<CR>
The number of random characters we receive from an authentication line, to be used as salt in our MD5 hash.
Helper macro to create a GET function.
‘name’ is the name of the resulting function
‘class’ indicates the class number for the command - eg 1
‘command’ is the string designating the command - eg "POWR"
‘input-args’ and ‘transform-body’ are used to receive input arguments and transform them into string PJLink parameters
eg. ((input-type input-number)
(%input2->string input-type input-number))
arguments defined in ‘input-args’ always preceed the host and key args
‘result-var’ is the variable holding the result of the get
‘body’ is the body of the function, which processes the result.
Helper macro to create a SET function.
‘name’ is the name of the resulting function
‘class’ indicates the class number for the command - eg 1
‘command’ is the string designating the command - eg "POWR"
‘args’ is a list of additional arguments to the function. These always preceed the host and key arguments.
‘body’ is the body of the function, which generates the string PJLink parameter to send.
Returns the address and broadcast address to use for the interface ‘local-host’ Finds a suitable broadcast interface matching ‘local-host’ and returns its address. When ‘local-host’ is nil, the general broadcast address is used
Read the initial connection line and output a digest, if necessary.
Calculate a broadcast address vector from an ipv4 address and subnet.
Calculates a broadcast address vector from an ‘ip-interfaces::ip-interface’
Convert a class number to its character representation.
Create a PJLink authentication digest from ‘seed’ and ‘password’ ‘seed-start’ indicates where reading from ‘seed’ should start. And password a sequence of characters length 32 or less.
Find an IP interface matching ‘interface-address’ with broadcast capabilities nil if no such interface is available.
Parses a inst string into a list of ‘projector-input’s ‘inst-str’ should be a string where each input is represented by
<Type><Number>
Additional inputs are separated by spaces.
eg
11 45 51
Parses a inst string into a list of ‘projector-input2”s ‘inst-str‘ should be a string where each input is represented by
<Type><Number>
Additional inputs are separated by spaces.
eg
11 2Z 3E 61
Parses a lamp string into a list of ‘lamp-status’s ‘lamps-str‘ should be a string where each lamp is represented by
<Hours> SPC <OnOrOff>
Additional lamps are separated by spaces.
eg
8262 1 13451 1 198 0
Convert a 16-octet md5 hash into a 32-char hex-encoded string.
Convert a nibble into its hex char.
Returns a normalized octet vector representation of host
Open a ‘usocker:socket’ on ‘host’ and authenticate if necessary using ‘password’
Conducts a ‘get‘ command on ‘stream‘, and returns the result string
uses
‘class’ as the command class
‘command’ as the command name
‘param’ as the command parameter, if any
This will issue a query such as
%1POWR ?
Then given a result of
%1POWR=0
returns the string "0"
Conducts a ‘set‘ command on ‘stream‘, and returns the result string
uses
‘class’ as the command class
‘command’ as the command name
‘param’ as the command parameter, if any
This will issue a query such as
%1POWR 1
Then given a result of
%1POWR=OK
will return no values.
Will error on error responses such as ERR1, ERRA, ERR3 etc.
Reads a pjlink command-line (delimited by #Return) from ‘stream‘ into ‘buffer‘ Returns the number of characters read, before encountering #Return
Reads and checks a PJLink response from ‘stream’, and returns the result.
Parses a resolution string of the form
<horz>x<vert>
eg
1920x1080.
Returns true if the response ‘response’ is a valid response string, given ‘class’ and ‘command’
Given ‘class’ = 1, and ‘command’ = "POWR", a valid response would be
%1POWR=
Verifies that ‘response’ is a valid connection response, and generates a digest from it and ‘password’ ‘rlen’ is the number of characters in ‘response’ we should read.
Writes a PJLink command to ‘stream’ using ‘class’, ‘command’, and ‘params’
eg.
%1CLSS ?<Return>
Query other information about the projector. nil if not available.
Jump to: | %
(
A C D F G H I L M O P R S U |
---|
Jump to: | %
(
A C D F G H I L M O P R S U |
---|
Jump to: | %
+
C S |
---|
Jump to: | %
+
C S |
---|
Jump to: | %
A C E F H I L M O P Q S T U |
---|
Jump to: | %
A C E F H I L M O P Q S T U |
---|