Shared Variables

List of Commands

Network API Commands

UPDATE

Syntax:

 

UPDATE [timestamp] “name” “value”\r\n

 

Used to send or receive updates. The timestamp is the number of microseconds since Jan 1st 1970

 

UTC. The timestamp may be omitted, in which case the server will use the time the command is

 

received as the timestamp. It is only possible to send an 'UPDATE' command to an IS-SPX Player if

 

the network API is enabled. Note that no response is sent back by the server. Please note that the

 

protocol is case sensitive, so the word UPDATE must be in capital letters.

 

Example:

 

GET / UPDATE?name1=value1&name2=value2... HTTP/1.0\r\n

 

\r\n

 

Used to send an update for one or more shared variables. The URL is also case sensitive, but the

 

update must be lower case in this instance. It is not possible to specify a timestamp with this interface.

 

Instead of opening a TCP socket and managing the low level protocol, you can get a web browser to

 

send the request by entering the address below:

 

http://[server]:[port]/update?name1=value1&name2=value2...

EVENT

Syntax:

 

EVENT [timestamp] “name” “value”\r\n

 

Used to send or receive UI events. The timestamp is optional. The name must be one of the UI trigger

 

names:

 

• “keydown”, “keyup”: the value is an SVG key identifier, e.g. “Enter”, a character, e.g. “A” or an

 

hexadecimal unicode character, e.g. “U+0041”; it may be prefixed by one or more of the following

 

modifiers: “Ctrl+”, “Shift+”, “Alt+”, “Meta+”, “AltGr+”, e.g. “Shift+A”.

 

• “textInput”: the value is the text string input by the user, utf-8 encoded.

 

• “mousedown”, “mouseup”, “mousemove” or “mousewheel”: the value is a comma-separated list

 

of the following argument: “x”, “y”, “button” and “delta” as applicable, e.g. for a mousedown on the

 

left button at coordinates 45,20, the value string is “x=45,y=20,button=0”

 

• “focusin” and “focusout”: the value must be empty.

 

It is only possible to send an 'EVENT' command to an IS-SPX Player if the network API is enabled.

 

Example:

 

GET / event?name1=value1&name2=value2... HTTP/1.0\r\n

 

\r\n

 

Used to send one or more events.

 

Instead of opening a TCP socket and managing the low level protocol, you can get a web browser to

 

send the request by entering the address below:

 

http://[server]:[port]/event?event_name1=value1&event_name2=value2...

SUBSCRIBE

Syntax:

 

SUBSCRIBE “name”\r\n

 

Subscribe to a variable on this server (the @ sign and hostname must be removed). The subscriber

 

will be notified each time the variable is modified. If the client subscribes to a variable, it will received

 

an 'UPDATE' command each time the variable is modified. If the client subscribe to the special variable

 

“%EVENTS%”, it will receive an 'EVENT' command each time an event is generated on the server, i.e.

 

each time a keyboard or a mouse input is received on the server. It is only possible to send an

 

'SUBSCRIBE' command to an IS-SPX Player if the network API is enabled.

UNSUBSCRIBE Syntax:

UNSUBSCRIBE “name”\r\n

Unsubscribe to a variable.

Inspired XPress - Programming Guide

87

 

 

Page 95
Image 95
AMX IS-SPX-1000/1300 manual List of Commands, Network API Commands