01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Web server CGI interface - <strong>SC12</strong> <strong>@CHIP</strong>-<strong>RTOS</strong> <strong>V1.10</strong><br />

<strong>IPC<strong>@CHIP</strong></strong> <strong>Documentation</strong> Index CGI API News<br />

CGI API<br />

The CGI ("Common Gateway Interface") API uses interrupt 0xAB with a service number in the high order byte of<br />

the AX register (AH). This interface provides access to the CGI implementation of the <strong>IPC<strong>@CHIP</strong></strong> Web server.<br />

CGI at the <strong>IPC<strong>@CHIP</strong></strong> provides the possibility to install at the <strong>IPC<strong>@CHIP</strong></strong> Web server own programmed CGI<br />

functions. These functions are bound with a fixed name and are executed by the Web server task, if a http<br />

request with such a fixed name comes in. This mechanism allows dynamic usage of the <strong>IPC<strong>@CHIP</strong></strong> Web server.<br />

For better understanding of CGI and possibilities for using, see description of available program examples at the<br />

example link below.<br />

File Upload:<br />

Also there is a possibility to upload files to the <strong>@CHIP</strong>'s disk. This does not use the CGI interface but the Web<br />

server. Therefore you only need a defined HTML formular which sends the required data to the <strong>@CHIP</strong> Web<br />

server. An example can be found in the CGI Example Zip file.<br />

Notes:<br />

1. For test and demonstration purpose two pages are preinstalled at the <strong>IPC<strong>@CHIP</strong></strong>:<br />

a)main.htm: Static html introduction page.<br />

b)chipcfg : Dynamic page with system time/date and configuration data of the requested <strong>IPC<strong>@CHIP</strong></strong>.<br />

2. For configuring the webserver and CGI, see the provided chip.ini entries.<br />

3. For some useful comments see also under Programming notes<br />

Topics<br />

Web Server Overview<br />

Web Server FileTypes<br />

CGI API News<br />

CGI API Error Codes<br />

CGI API DeveloperNotes<br />

CGI API ExamplesAvailable<br />

CGI API Data Structures<br />

API Functions Available<br />

● Interrupt_0xAB_function_0x01:_CGI_INSTALL, Install a CGI function<br />

● Interrupt_0xAB_function_0x02:_CGI_REMOVE, Remove a CGI function<br />

● Interrupt_0xAB_function_0x03:_CGI_SETMAIN, Set a new main page<br />

● Interrupt_0xAB_function_0x04:_CGI_SETROOTDIR, Set Web server's root directory<br />

● Interrupt_0xAB_function_0x05:_CGI_GETROOTDIR, Get Web server's root directory<br />

● Interrupt_0xAB_function_0x06:_CGI_GETMAIN, Get main page name<br />

Page 358 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!