Datasheet
Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
The updated value is written to the status.xml file by a specific callback function in Flyport's HTTP
firmware.
Each time Flyport handles a dynamic variable, it executes the related callback function, for example
HTTPPrint_test(). All the callback functions start with “HTTPPrint_” plus the name of the dynamic
variable (“test” in this case). When Flyport sends the file “status.xml” to the browser, it identifies the
dynamic variables in the file and executes the appropriate callback function(s).
Flyport's HTTP task updates the value of the dynamic variable ~test~ using the function:
void HTTPPrint_test()
{
TCPPutString(sktHTTP,(BYTE *)string_serial);
}
To see the result of using AJAX in the example webpage, you can write a string like “new value!” on
UART1 using a simple serial terminal (like the one provided by openPicus IDE) and at the same time
look at the changes made to the web page!
This is the way AJAX permits Flyport to update automatically the variables displayed in the web
browser. It can be used to monitor Flyport's hardware status, external devices such as sensors, or
anything else the firmware can handle.
65










