HTML Variable Example
This example program uses the FUNCTIONCALL and VARIABLE tags to display variables
and use parameters in function calls.
Display System Configuration Variables:
| Text For The Left Size Here |
| Text For The Right Side Here |
| Description |
Static |
Runtime |
| IP Address |
|
|
| IP Mask |
|
|
| IP Gateway |
|
|
| IP DNS Server |
|
|
| Boot Baud Rate |
|
Baud |
| Boot Delay |
|
Seconds |
| System Tick Count |
|
Seconds |
| UNIT NAME |
|
TYPE ID |
|
ELAPSED TIME |
sec. |
|
|
|
HTML Source Code:
The first line of the table and an equation are shown below. The
IPCAST() macro is used to convert a 32-bit value into an IP
address format.
Display a single variable:
<td>IP Address</td>
<td> <!--VARIABLE IPCAST(gConfigRec.ip_Addr) --> </td>
<td> <!--VARIABLE IPCAST(EthernetIP) --> </td>
Display the result of an equation:
Tick count is : <!--VARIABLE TimeTick/TICKS_PER_SECOND --> seconds
Function Call
The FUNCTIONCALL tag passes the socket fd and URL to a 'C' function in your application code:
HTML Source Code:
<!--FUNCTIONCALL Foo -->
Function Call with Parameters
The VARIABLE tag can be used to call a 'C++' function with multiple parameters.
The example below shows 2 parameters:
HTML Source Code:
<!--VARIABLE FooWithParameters( fd, 123 ) -->