Datasheet
Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
As can be seen, the only content of the body of this webpage is the ~string_serial~ dynamic variable.
If this index.htm is opened with a browser in a pc, the result will be:
In this case, since there is no Flyport to change the dynamic variable value, the browser regards the
statement as a constant text.
What happens in Flyport's webserver? If we define the variable string_serial inside our
“taskFlyport.c” as:
char string_serial[20] = “dynamic variable!”;
the Flyport webserver will now return the VALUE of string_serial[20] , placing it on the
webpage in the location where ~string_serial~ is found. It does this using the related callback
function placed by the user in HTTPApp.c:
HTTPPrint_string_serial()
{
TCPPutString(sktHTTP,(BYTE *)string_serial);
}
This specific callback function executes a TCP string write to our sktHTTP that is the current HTTP-
socket.
The needed callback functions are declared automatically with an “HTTPPrint_variablename” name
by the webpage import tool, which detects the ~variablename~
statements for every dynamic
variable found.
The webpage import tool puts the declaration of every “void HTTPPrint_variablename();” function
inside the file HTTPPrint.h. The openPicus IDE will generate a compiler error if all the callback
functions are not written inside HTTPApp.c by the user.
The code example above will result in the web browser displaying the following page:
59










