Communication and Control, cont’d
Server Side Include Using a Remote SIS command
|
|
| SIS Command |
|
| |
* 50 * | 3 * | 3L RS |
| Hello | ||
| ||||||
| ||||||
Delimiter | Port | Time to | Time | Length or Command | Delimiter | |
|
| Data to be | ||||
| Number | wait for | between | Delimiter |
| passed to |
|
| first character | characters | parameter |
| external device |
|
| of response | in response |
|
| via a serial port |
SIS Command
Elements
*Type with no spaces.
Figure 4-2 — Example of an SSI “remote” command
In the example above, a “remote” serial command sends the word “Hello” and waits up to 50 ms for a response (until three characters are received). For more information on this command, see 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 IPL T S interface removes and executes.
As with SSI formatted commands, query strings can use any valid SIS command — either “host” or “remote”.
The query string in the figure below turns 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> | ||
HTML code | Starts | Tells Web server | SIS command | HTML code | Linked Text | Closes | |
Query String | |||||||
for a link |
|
| an SIS command | to be processed | for a link |
| Link |
|
|
| follows | by the IP Link |
|
|
|
|
|
|
|
|
| *Type with no spaces. |
Figure 4-3 — 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 RS | 1! | "> Input #1 </a> |
HTML code
for a link
Starts | Tells Web | Delimiter | Port Command | Delimiter Data to |
Query String |
| |||
| server an |
| Number | be passed to |
SIS command | external device | |
follows | ||
via a serial port | ||
|
HTML | Linked | Closes |
code | Text | Link |
for a link |
|
|
*Type with no spaces.