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

Page 33

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

Image 33
Contents USA IP Link ToolsPrecautions Extron’s WarrantyFCC Class a Notice Under Desk Projector Mount Quick Start Guide IPL T SF24 and SFI244Table of Contents Table of Contents, cont’d One IntroductionIPL T SF24 and SFI244 Introduction FeaturesAbout this Manual About the IPL T SF24 and SFI244 InterfacesEasily configured and controlled Installation and OperationTwo Introduction, cont’dInstallation Overview Installation and OperationIPL T SF24 and IPL T SFI244 Installation and Operation Mounting the IPL T InterfaceRear Panel Features and Cabling Installation and Operation, cont’dPower Furniture or projector mountingSerial communication Ethernet/LANFront panel indicators OperationIdentification Resetting the unit Three Connection and ConfigurationConnecting the Hardware Connection and Configuration, cont’dSerial connection Ethernet connectionPC configuration Configuring the HardwareIPL T interface configuration Flex I/O connectionConfiguring the IPL T using direct PC connection Arp -s 10.13.170.15 00-05-A6-00-0A-90Ping Firmware upgrades Connection and Configuration, cont’dFour Communication and ControlPorts Overview Communication and Control, cont’dFlex I/O ports Digital inputBidirectional serial control interface ports Digital outputAnalog input Establishing or changing system or port settings Accessing and using the Web server Logon and system statusCommunication with the Interface Web serverControlling IR devices or sending IR commands SFI244 only 10 Web server System Settings screenSetting and changing your passwords Communication and Control, cont’dEditing and adding e-mail alerts Esc 4 SM Sending an e-mail alert through TelnetUpgrading the firmware Managing filesCreating a driver with the IR Learner software IR Learning SFI244 onlyProgrammer’s Guide for the Telnet and Web browser Using the command/response tableSymbol definitions Copyright information Password informationError responses 28 = Commands that may give E28 file not foundBidirectional Serial Data port Flex I/O Data portIP Setup Commands IR/Serial Data port SFI244 onlyFirmware Version/Part Number/Information Re-map port designations File CommandsWeb Browser Specific MailCommunication and Control, cont’d Customization Reset ZAP/Erase CommandsServer side includes ControlQuery string Code examplesExample 26c Browser view 28a Html source code using a query string 30b Browser view Href=index.html?cmd=W1*1*15*0irPlay/aURL encoding Reserved charactersUnsafe characters Communication and Control, cont’d Device Control Direct port access ports 2001 throughCustom Web pages Telnet PortPower connections TroubleshootingPort redirect Data connectionsAAppendix a Specifications, Part Numbers AccessoriesSpecifications Glossary AppendixBBParts Included partsGlossary GlossaryGlossary, cont’d