pCOWeb
+030220966 – rel. 1.1 – 12.12.2017
73
INFORMATION TAGS:
macaddress
,
fw_release
,
bootvalues
,
ipaddr_eth0
,
date
Return information about
pCOWeb
.
SYNTAX AND MEANINGS
<%macaddress%>
MAC address
<%fw_release%>
pCOWeb
firmware version
<%bootvalues%>
Type of parameters used when starting: User/Bootswitch, see 3.1.2 a pagina 12
<%ipaddr,eth0%>
IP address of the eth0 interface; use eth0:1, eth0:2, eth0:3 for the others
<%date%>
Current time on the
pCOWeb
in the format 1970-01-03 20:27
Example (Figure G.i)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<!--tagparser="/pcotagfilt"-->
<head>
<meta content="text/html; charset=ISO-8859-15" http-equiv="content-type">
<title>pCOWeb Configuration</title>
</head>
<body>
<div>The ethernet Mac Address is: <%macaddress%></div>
<div>The pCOWeb firmware release is: <%fw_release%></div>
<div>The pCOWeb started using: <%bootvalues%></div>
<div>pCOWeb IP address (Eth0): <%ipaddr,eth0%></div>
<div>pCOWeb date/time: <%date%></div>
</body>
</html>
Figure G.i - The information TAGS: example
SPECIAL TAGS
These are used in the configuration web pages; their use is closely related to the operating system, and incorrect usage may cause instability on the
pCOWeb
.
•
“
factdefcfg
”
: extracts from non-volatile read-only memory the factory values of the parameters used by pressing the button when starting the
pCOWeb
(paragraph 3.1.2 on page 12).
Used in the link to “View factory bootswitch parameters” (see
Figure 9.g
on page 44).
•
“
rcresult
”
: directly returns the result of certain operations from the operating system. This is particularly delicate, as if not used correctly may
require the
pCOWeb
to be rebooted.
•
“
env
”
: returns all the information available from the
pCOWeb
.
This takes a long time to run; if when running (that is, until the web page is returned) other web pages are requested,
pCOWeb
will need to be
rebooted. To use this, type the following command directly into the address field in the web browser:
http://172.16.0.1/config/result.html?%3fscript%3arccmd%28%27do_log%27%29
replacing the address 172.16.0.1 with the IP address of
pCOWeb
in question.
•
“
do_flashroom
”
: returns the size of the remaining free space in the area of non-volatile memory reserved for the web pages.
One example of this is “View used / free disk space” on the configuration page (see
Figure 9.h
on page 44);
•
“
do_ifconfig
”
: returns the current configuration of the Ethernet network, including the IP address obtained from the server in DHCP mode;
one example is “View network configuration” on the configuration page (see
Figure 9.g
on page 44).
TYPICAL ERRORS INVOLVING THE TAGS
These are some typical errors that may be committed when using the tags inside the web pages.
•
The tag is not replaced by the corresponding value.
Solution:
−
check that the following row is included in the html page:
−
<!--tagparser="/pcotagfilt"-->
−
check that the editor used to create the page does not replace the special characters used in the tags with the corresponding html code; for
example, the “<” and “>” characters may have been replaced with “<” and “>” respectively.
•
The web pages containing tags are not displayed.
Causes: the syntax of the tag has not been observed.
Solution: make sure the “%” characters have been entered correctly inside the tags; the last tag on the page is often forgotten.
•
The value displayed on the web pages does not change when the variable changes.
Causes: the web page has been made by copying the source of another page (for example, displaying “Source code” in the browser); it does not work
because the page obtained does not contain the tags, but rather the values that pcotagfilt has already replaced them with.