beautypg.com

Echelon i.LON SmartServer 2.0 User Manual

Page 297

background image

i.LON SmartServer 2.0 Programmer’s Reference

18-2

//*[@xsi:type="FileSystem"][UCPTname="/eventlog.txt"][UCPTfileFormat="text"]


Request (return the data in a Data Logger)


//*[@xsi:type="FileSystem"][UCPTname="/root/data/Net/LON/iLON App/Data
Logger[1].csv"][UCPTfileFormat="text"]


Response



xsi:type="FileSystem_Data">

/root/data/Net/LON/iLON

App/Data

Logger[1].csv

2008-02-27T21:41:56Z

/>

LonFormat="UCPTfileFormat">text

98052


"UCPTlogTime","UCPTpointName","UCPTaliasName","Reserved","UCPTpointStatus","UCPTvalueDef","UC
PTvalue","UCPTunit","UCPTpriority"

2008-02-27T13:41:57.440-08:00,"Net/LON/iLON App/Digital Input
2/nvoClsValue_2","NVL_nvoClsValue_2","","AL_NO_CONDITION","OFF","0.0 0","","255"

2008-02-27T13:45:00.000-08:00,"Net/LON/iLON App/Digital Input
2/nvoClsValue_2","NVL_nvoClsValue_2","","AL_NO_CONDITION","OFF","0.0 0","","255"

2008-02-27T14:00:00.040-08:00,"Net/LON/iLON App/Digital Input
2/nvoClsValue_2","NVL_nvoClsValue_2","","AL_NO_CONDITION","OFF","0.0 0","","255"


The following C# sample code demonstrates how to read a file in hex mode:

ilonWebRef.Item_Coll itemColl = new ilonWebRef.Item_Coll();

itemColl.xSelect =
"//*[@xsi:type=\"FileSystem\"][UCPTname=\"/root/data/myfile.txt\"][UCPTfileFormat=\"hex\"]";

ilonWebRef.Item_DataColl readResp = ilon.Read(itemColl);

if (readResp.UCPTfaultCount > 0)
MessageBox.Show(readResp.fault.faultstring);
else
String str = (readResp.Item[0] as ilonWebRef.FileSystem_Data).Value;

Note: You can read and write file system data that includes new line characters. For example, using
the Read function on the following file system data:

/data/writetest.txt

text

Hello

World
!