18 file system data, 1 using the list function on file system data, 2 using the read function on file system data – Echelon i.LON SmartServer 2.0 User Manual

Page 296: File system data -1, Using the list function on file system data -1, Using the read function on file system data -1, Using the list function on file system data, Using the read function on file system data

Advertising
background image

i.LON SmartServer 2.0 Programmer’s Reference

18-1

18

File System Data

You can use the List, Read, Write, and Delete functions to download, upload, and delete the data logs,
alarm logs, the eventlog.txt file on the root directory of the SmartServer flash disk, and other
user-defined .txt and .csv files under the web/user directory on the SmartServer flash disk.

18.1

Using the List Function on File System Data

You can use the List function to return a list of directories containing .txt or .csv files on the
SmartServer. The List function takes an <iLonItem> element that has an xSelect statement with a
FileSystem_Data type as its input, as shown in the example below.

Request

<List xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<xSelect>//Item[@xsi:type="FileSystem_Data"]</xSelect>
</iLonItem>
</List>

Response

<List xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<UCPTfaultCount>0</UCPTfaultCount>
<Item

xsi:type="Item_Service">

<UCPTname>/alarmLog/</UCPTname>
<UCPTlastUpdate>2007-12-20T01:03:38Z</UCPTlastUpdate>
<UCPTdescription

/>

<UCPTfileSize>2048</UCPTfileSize>
</Item>
<Item

xsi:type="Item_Service">

<UCPTname>/data/</UCPTname>
<UCPTlastUpdate>2007-12-20T01:03:40Z</UCPTlastUpdate>
<UCPTdescription

/>

<UCPTfileSize>2048</UCPTfileSize>
</Item>
<Item

xsi:type="Item_Service">

<UCPTname>/web/</UCPTname>
<UCPTlastUpdate>2007-12-20T01:03:40Z</UCPTlastUpdate>
<UCPTdescription

/>

<UCPTfileSize>2048</UCPTfileSize>
</Item>
<Item

xsi:type="Item_Service">

<UCPTname>/eventlog.txt</UCPTname>
<UCPTlastUpdate>2008-02-05T17:32:46Z</UCPTlastUpdate>
<UCPTdescription

/>

<UCPTfileSize>25000</UCPTfileSize>
</Item>
</iLonItem>
</List>

18.2

Using the Read Function on File System Data

You can use the Read function to download the contents of a specific alarm log, data log, the event log
file on the root directory on the SmartServer flash disk, or other .txt or .csv file in the web/user
directory on the SmartServer flash disk.

The Read function takes an <iLonItem> element that has an xSelect statement with a FileSystem type
as its input, as shown in the example below. You can have the data returned in text format by
specifying the <UCPTfileFormat> attribute and setting it to “text”. Otherwise, the data will be
returned as a hex dump.

Request (return the data in the event log file on the SmartServer)

<Read xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>

Advertising