Communication and Control, cont’d

Server Side Include Using a Remote SIS command

 

 

SIS Command

 

 

 

<!--#echo var=" W 1

* 5

* 3 *

3L

RS

 

Hello

"-->

 

 

 

Delimiter

 

 

 

 

 

Delimiter

 

Port

Time to wait

Time between

Length or

Command

 

Data to be passed to

 

Number

for first character

characters

Delimiter

 

 

external device

 

 

of response

in response

parameter

 

 

via a serial port

 

 

 

 

 

 

 

 

SIS Command

Elements

*type with no spaces

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

 

 

 

SIS Command

 

 

 

<a href="index.html ?

cmd=

W0DH

">

DHCP off </a>

 

Starts

 

 

 

 

 

HTML code

Query String

Tells web server

SIS command

HTML code

Linked Text

Closes

for a link

 

the an SIS follows

to be processed

for a link

 

Link

 

 

 

by the IP Link

 

 

 

*type with no spaces

Figure 4-24 — Example of a host query string command

4-30 IPL T SF24 and IPL T SFI244 • Communication and Control

URL with a Query String using a Remote SIS command

 

 

 

 

SIS Command

 

 

 

 

 

<a href="index.html ?

cmd=

W 2

 

 

">

Input #1

 

</a>

RS

 

1!

 

 

 

 

Starts

 

Delimiter

 

Delimiter

 

 

 

 

 

HTML code

Query String

Tells web server

Port

Command

Data to be passed to

HTML code

Linked Text

 

Closes

for a link

 

the an SIS follows

Number

 

 

for a link

 

 

Link

 

 

 

external device

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

via a serial port

 

 

 

 

 

 

 

 

 

 

 

 

*type with no spaces

 

 

 

 

 

 

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><!--#echovar="1I"--></b>

"host" SSI

<br>

commands

IPLink Product Description: <b><!--#echovar="2I"--></b>

 

<br>

 

IPLink Product Part Number: <b><!--#echovar="N"--></b>

 

<br><hr>

 

<p>

 

This example requires an Extron Crosspoint 84HVA connected to IPL T SF244

serial

 

port #1.

 

<p>

"remote" SSI

Part Number: <b><!--#echo var="W01RSN"--></b>

commands

<br>

 

Connection Info: <b><!--#echo var="W01RSI"--></b>

 

<br>

 

Firmware Version: <b><!--#echo var="W01RSQ"--></b>

 

Figure 4-26a — HTML source code document showing server side includes

IPL T SF24 and IPL T SFI244 • Communication and Control 4-31

Page 33
Image 33
Extron electronic SFI244 Series, IPL T SF24 user manual Query string, Code examples, Example