Query String; Code Examples - Extron electronics IPL T SF24 Series User Manual

Ip link tools
Hide thumbs Also See for IPL T SF24 Series:
Table of Contents

Advertisement

Communication and Control, cont'd
Server Side Include Using a Remote SIS command
<!--#echo var="
W
1 *
5
*
Delimiter
Port
Time to wait
Number
for first character
of response
Figure 4-23 — Example of SSI "remote" command
In figure 4-23 above, a "remote" serial command sends the
word "hello" and will wait up to 50ms for a response (until
three characters are received). For more information on this
command, refer to the Command/response table for Simple
Instruction Set (SIS) commands earlier in this chapter.

Query string

A query string is the portion of a URL that appears after the
question mark. The query string contains parameters or
instructions for the Web server to execute.
The basic format for a query string within a link is:
<a href="index.html?cmd=x">Input #1</a>
Where x is the SIS command to be executed.
When a link is accessed on a Web page, the URL is passed to the
Web server to tell it which Web page to return to the browser.
The portion of the URL after the question mark is the query
string, which contains the SIS command that the IP Link
product will remove and execute.
As with SSI formatted commands, query strings can use any
valid SIS command—either "host" or "remote".
The query string in figure 4-24 below will turn off DHCP on the
IP Link device.
URL with a Query String using a Host SIS command
<a href="index.html ?
cmd=
Starts
HTML code
Query String
Tells web server
for a link
the an SIS follows
Figure 4-24 — Example of a host query
string command
IPL T SF24 and IPL T SFI244 • Communication and Control
4-30
SIS Command
3
*
3L
RS
Hello
Delimiter
Time between
Length or
Command
Data to be passed to
characters
Delimiter
external device
in response
parameter
via a serial port
SIS Command
Elements
*type with no spaces
SIS Command
W0DH|
">
DHCP off
</a>
SIS command
HTML code
Linked Text
to be processed
for a link
by the IP Link
*type with no spaces
<a href="index.html ?
"-->
Closes
Link
URL with a Query String using a Remote SIS command
SIS Command
cmd=
W
2
RS
Starts
Delimiter
Query String
HTML code
Tells web server
Port
Command
for a link
the an SIS follows
Number
Figure 4-25 — Example of a remote query string
command
In figure 4-25 above, the data string that follows the pipe ( )
symbol will be sent to the attached controlled device on serial
port #2. This string will instruct an attached Extron switcher to
change to input #1.

Code examples

This section shows practical uses for both SSIs and query
strings.
Before attempting to develop new Web pages, the user
should have a good, working knowledge of JavaScript,
HTML, and server side includes.
Example 1
In figure 4-26a, both host SSI and remote SSI commands are
used within the same Web page. You will notice six SSIs: three
host commands and three remote commands.
<html>
<head><title>Example 1</title></head>
<h2 b>HTML Example #1</h2 b>
<body>
The following lines demonstrate how to read status from the IPLink Product:
<p>
IPLink Product Name: <b><!--#echo var="1I"--></b>
<br>
IPLink Product Description: <b><!--#echo var="2I"--></b>
<br>
IPLink Product Part Number: <b><!--#echo var="N"--></b>
<br><hr>
<p>
This example requires an Extron Crosspoint 84HVA connected to IPL T SF244
serial
port #1.
<p>
Part Number: <b><!--#echo var="W01RS|N"--></b>
<br>
Connection Info: <b><!--#echo var="W01RS|I"--></b>
<br>
Firmware Version: <b><!--#echo var="W01RS|Q"--></b>
Figure 4-26a — HTML source code document
showing server side includes
IPL T SF24 and IPL T SFI244 • Communication and Control
">
Input #1
</a>
1!
Delimiter
HTML code
Linked Text
Closes
Data to be passed to
for a link
Link
external device
via a serial port
*type with no spaces
"host" SSI
commands
"remote" SSI
commands
4-31

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sfi244 series

Table of Contents