pCOWeb +030220471 – rel. 1.0 – 02.05.2007 65
CAREL TAGS FOR HANDLING THE pCOWeb CONFIGURATION FILES
pCOWeb saves the user settings in a number of files (paragraph
8.1 on page 35), in the following format:
<parameter>=<value>
An example of these files (SNMP TRAP configuration, ‘snmptrap’ file) is as follows:
r1_enabled=1
r1_trigger=0
r1_dest1=1
r1_dest2=0
r1_dest3=0
r1_dest4=0
r1_trapoid=1.3.6.1.4.1.9839.2.1.1.0
r1_ack=0
r1_time=1
host1=10.0.0.131
community1=carel
enabled1=1
enabled2=0
enabled3=0
enabled4=0
pcoprotfail_enab=0
pcoprotfail_ack=0
pcoprotfail_time=1
r1_valoid1=1.3.6.1.2.1.1.5.0
The following tags are available for handling the configuration files:
• “
getdb”: read a parameter from file;
• “
setdb”: write a parameter to file;
• “
checkdbsel”: search for a parameter in a file and check the value (useful for html “select” tools);
• “checkdbradio”: search for a parameter in a file and check the value (useful for html “radiobutton” tools).
“getdb”: read a pCOWeb parameter from a file
Returns the value of a pCOWeb parameter read from a specified file.
SYNTAX
<%getdb('Filename', 'ParameterName')%>
IMPORTANT: the names of the pCOWeb files are case sensitive.
The file is searched by default in
/usr/local/root/flash/etc/sysconfig/, which contains the pCOWeb configuration files. To use a new file
of parameters for new applications, a path other than the default can be specified, always starting from root (“/”); nonetheless, it is recommended to save the files in the
default path so as to group all the pCOWeb parameter settings in the same location.
Example (
Figure G.e on page 66)
The ‘commcfg’ file contains the pCOWeb and pCO communication configurations. The row that defines the baud rate is:
speed=19200
Figure G.d – The “setres” TAG: example
Commentaires sur ces manuels