Communication and Control, cont’d
Server Side Include Using a Remote SIS command
|
| SIS Command |
|
|
| ||
| * 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
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
The query string in figure
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
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 |
|
| |||||||
| command |
|
|
|
|
|
|
|
| |
| In figure |
| ) | |||||||
|
| |||||||||
|
| |||||||||
|
| |||||||||
| 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
<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: | "host" SSI | |
<br> | ||
commands | ||
IPLink Product Description: | ||
| ||
<br> |
| |
IPLink Product Part Number: |
| |
<br><hr> |
| |
<p> |
| |
This example requires an Extron Crosspoint 84HVA connected to IPL T SF244 | ||
serial |
| |
port #1. |
| |
<p> | "remote" SSI | |
Part Number: | commands | |
<br> |
| |
Connection Info: |
| |
<br> |
| |
Firmware Version: |
|
Figure 4-26a — HTML source code document showing server side includes
IPL T SF24 and IPL T SFI244 • Communication and Control