Specifications

57
Possible values for this parameter are:
Value
Meaning
HTTP_START_OF_VAR
This is the very first callback for
given variable for the current
instance. If a multi-byte data
transfer is required, this value
should be used to conditionally
initialize index to the multi-byte
array that will be transferred for
current variable
For all others
Main application specific value.
val [out]
One byte of data that is to be transferred
Return Values
New reference value as determined by main application. If this value is other
than HTTP_END_OF_VAR, HTTP will call this function again with return value
from previous call.
If HTTP_END_OF_VAR is returned, HTTP will not call this function and
assumes that variable value transfer is finished.
Possible values for this parameter are:
Value
Meaning
HTTP_END_OF_VAR
This is a last data byte for given variable.
HTTP will not call this function until
another variable value is needed.
For all Others
Main application specific value.
Pre-Condition
None
Figure 18 CGI Page Calling the HTTPGetVar Function
With the information provided by the previously introduced function, we are able
to provide real time data from the microcontroller to the user via a dynamically
updating web page. Figure 19 shown below is an example of one such
implementation.
“status.cgi” contains following HTML line:
<td>S3=%04</td><td>D6=%01</td><td>D5=%00</td>
Figure 19 Dynamically Updated Web Page using HTML code