Carel plug-in Manuel d'utilisateur Page 22

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 80
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 21
pCOWeb +030220471 – rel. 1.0 – 02.05.2007 22
4.3.2 Generation of the XML file
When a notification event occurs, pCOWeb can generate an XML file containing information on the pCOWeb and the values of the pCO variables, which can be sent via
FTP or as an e-mail attachment.
XML (eXtended Markup Language) is a standard file format for conveying information organised in a diagram; it is recognised by many types of software that manage
data that is imported from files. This function is useful when the receiving computer uses one of these software applications.
INFORMATION
pCOWeb generates the file using a template based on a special file that must reside on the pCOWeb; as an example see “template.xml” included by default
and that can be edited by accessing the user memory via FTP (see
4.2 on page 17).
NOTE 1 A copy of the default file “template.xml” is available in read-only memory. To call the copy simply access pCOWeb using the FTP protocol (see
4.2 on page 17) and get the file /usr/local/root/deftemplate.xml.
NOTE 2 WordPad should be used to edit the template in the Windows operating system: in fact, the pCOWeb files conform to the Linux standard, which
differs from Windows in terms of the different management of the line break control characters; WordPad can import the Linux format and save
in Windows format, which can also be read by pCOWeb.
When sending, pCOWeb will read the template selected in the notification settings, and will process it based on some simple rules described further on,
generating the new XML file to be sent.
HOW pCOWeb GENERATES THE XML FILE
pCOWeb reads the template file and copies it character-by-character to the destination file; whenever it recognises a sequence of XML tags, such as in the example
shown below, it adds the corresponding information.
Table 4.a - The default “template.xml” file
LINE IN TEMPLATE.XML MEANING LINE GENERATED IN XML FILE TO BE SENT
<?xml version = '1.0' encoding = 'UTF-8'?>
Specifies the type of XML standard used
<?xml version = '1.0' encoding = 'UTF-8'?>
<PCOWEB>
The sequences of tags will only be recognised inside
sections that start with this tag
<PCOWEB>
<SYSTEM>
Start of the section with the sequences of tags with
pCOWeb properties (that is, not pCO)
<SYSTEM>
<HOSTNAME></HOSTNAME>
Returns the name of the pCOWeb – always
localhost
<HOSTNAME>localhost</HOSTNAME>
<DATE></DATE>
Returns date and time the file was generated, in the
format YYYYMMDDHHMMSS
<DATE>19700101064832</DATE>
<IP_ADDRESS></IP_ADDRESS>
No action. Reserved for future developments
<IP_ADDRESS></IP_ADDRESS>
<MAC_ADDRESS></MAC_ADDRESS>
Returns the MAC address of the pCOWeb
<MAC_ADDRESS>00:0a:5c:10:07:15</MAC_ADDRESS>
<UPTIME></UPTIME>
Returns the time elapsed since the last reboot of the
pCOWeb
<UPTIME>0d2h42m</UPTIME>
<SYS_VERSION></SYS_VERSION>
Returns the firmware version of the pCOWeb (block B
- Bios)
<SYS_VERSION>B1.2.1</SYS_VERSION>
<APP_VERSION></APP_VERSION>
Returns the firmware version of the pCOWeb (block A
- Applications)
<APP_VERSION>A1.3.1</APP_VERSION>
<SEPARATOR_CHAR>.</SEPARATOR_CHAR>
No action. Suggests the character that the XML
interpreter can use as the separator for the values of
the analogue variables
<SEPARATOR_CHAR>.</SEPARATOR_CHAR>
</SYSTEM>
End of the section with the sequences of tags with
pCOWeb properties (that is, not pCO)
</SYSTEM>
<PCO>
Start of the section with the sequences of tags with
pCO properties
<PCO>
<PCONAME>Template Sample</PCONAME>
No action.
Line used to assign a name to the specific pCO; in the
example, the name is “Template Sample
<PCONAME>Template Sample</PCONAME>
<PCOID>1</PCOID>
No action.
Line used to assign an identifier number to the specific
pCO; in the example, the number is “1
<PCOID>1</PCOID>
<DIGITAL>
Start of a section for digital variables
<DIGITAL>
<VARIABLE>
Start of the section for one digital variable
<VARIABLE>
<INDEX>1</INDEX>
Specifies the index 1 for the variable to pCOWeb
<INDEX>1</INDEX>
<VALUE></VALUE>
pCOWeb returns the current value (0) of the digital
variable with index 1
<VALUE>0</VALUE>
</VARIABLE>
End of the section for the digital variable with index 1
</VARIABLE>
<VARIABLE>
Start of the section for another digital variable
<VARIABLE>
<INDEX>2</INDEX>
Specifies the index 2 for the variable to pCOWeb
<INDEX>2</INDEX>
<VALUE></VALUE>
pCOWeb returns the current value (1) of the digital
variable with index 2
<VALUE>1</VALUE>
</VARIABLE>
End of the section for the digital variable with index 2
</VARIABLE>
</DIGITAL>
End of a section for digital variables
</DIGITAL>
<INTEGER>
Start of a section for integer variables
<INTEGER>
<VARIABLE>
Start of the section for an integer variable
<VARIABLE>
<INDEX>1</INDEX>
Specifies the index 1 for the variable to pCOWeb
<INDEX>1</INDEX>
<VALUE></VALUE>
pCOWeb returns the current value (25) of the integer
variable with index 1
<VALUE>25</VALUE>
</VARIABLE>
End of the section of the integer variable with index 1
</VARIABLE>
<VARIABLE>
Start of section for another integer variable
<VARIABLE>
<INDEX>2</INDEX>
Specifies the index 2 for the variable to pCOWeb
<INDEX>2</INDEX>
<VALUE></VALUE>
pCOWeb returns the current value (200) of the
digital variable with index 2
<VALUE>200</VALUE>
</VARIABLE>
End of the section for the integer variable with index
2
</VARIABLE>
</INTEGER>
End of a section for integer variables
</INTEGER>
<ANALOG>
Start of a section for analogue variables
<ANALOG>
<VARIABLE>
Start of the section for an analogue variable
<VARIABLE>
<INDEX>1</INDEX>
Specifies the index 1 for the variable to pCOWeb
<INDEX>1</INDEX>
Vue de la page 21
1 2 ... 17 18 19 20 21 22 23 24 25 26 27 ... 79 80

Commentaires sur ces manuels

Pas de commentaire