Multi-Tech Systems MTS2SA-T ユーザーズマニュアル

ページ / 181
Chapter 12 – HTTP Server 
Multi-Tech Systems, Inc. MultiConnect Serial-to-Serial Adapter User Guide (S000354A) 
140
 
 
The Embedded HTML Page 
The embedded Web page stored on the MultiConnect IP consists of normal ASCII text HTML 
code, which can be generated using any HTML editing tool. The page can include scripts, links to 
remote Web sites, graphic images, text files, etc.  
A maximum 30 KB (uncompressed) of flash space for the OEM’s Home Page and an additional 
10 KB maximum memory is reserved for the device parameter list. 
The OEM Web page must contain the Parameter Tags, which are the placeholders in HTML 
files. These tags are replaced on the fly with real-time values when the page is sent to the 
browser. The value of the parameter tags also can be changed through the browser in order to 
configure the host through the MultiConnect IP. 
The developer should ensure that the parameter values, which are to be replaced, are qualified 
with %P<n>%
Example: 
<HTML> 
-- 
-- 
-- 
-- 
Efficiency  <input  type="text" name = "P1" value = "
%P1%
"> 
-- 
-- 
</HTML> 
In the above sample code segment, when the browser requests a page, the 
%P1%
 is replaced 
with Parameter P1's value. This value is extracted from the serial device parameter file. 
CGI Scripts 
• 
Post-Query is a built-in CGI script that will parse the new values set by the browser and 
replace them in the http-host-param file. See the section entitled Parameters Manipulation 
from the Browser for more technical information about the Post-Query CGI script. 
• 
The MultiConnect IP supports a user-defined CGI script, which performs host-specific 
processing to the parameters configured by the remote Web browser.  
Important:
 The user-defined CGI-script 
MUST
 be a shell script.  
File Naming and File Size Conventions 
The following file naming conventions and file size constraints must be followed by the OEM Web 
page developer. 
File Name(s) 
Description 
http-s0.HTML 
Serial Device Main Page 
http-host-param 
Default Serial Device Parameter List 
http-*.HTML 
Any HTML file, should have the filename prefixed with "http-" 
cgi-* 
Any cgi script should have the filename prefixed with "cgi-" 
Constraints 
The HTML file size cannot exceed 30KB Max. 
The Parameter list file cannot exceed 10KB Max. 
The Parameter tags <P1, P2, …> should be contained in the parameter list. 
The URL for 
Host Configuration 
is http-s0.HTML.  Therefore, the main page must have the filename 
http-s0.HTML when the host device's HTML page is uploaded to the MultiConnect IP.