Echelon i.LON SmartServer 2.0 User Manual
Page 164

i.LON SmartServer 2.0 Programmer’s Reference
10-14
position()
Position of the events in previously selected list. You can use this
filter to limit the number of events in a result. You can compare the
number of events to be returned using equal, less (or equal), or great
(or equal). You can request a maximum of 500 events, however,
more than 500 events may be returned.
Note: The last instance of an exception before the specified start date
is always returned (if it exists), and it is not counted by the position()
constraint.
The following code demonstrates how to use the Read function to return a list of up to the first 100
events on a Calendar on the SmartServer:
Request
<Read xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<xSelect>//Item[@xsi:type="UFPTcalendar_Data"]
[UCPTlastUpdate>="2008-03-07T00:00:00.000"
and
UCPTlastUpdate<="2037-12-31T00:00:00.000"]
[position()<100]
</xSelect>
<Item>
<UCPTname>Net/LON/iLON
App/Calendar</UCPTname>
</Item>
</iLonItem>
</Read>
Response
<ReadResponse xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem >
<UCPTfaultCount>0</UCPTfaultCount>
<Item xsi:type="UFPTcalendar_Data" >
<UCPTname>Net/LON/iLON
App/Calendar</UCPTname>
<UCPTstart>2008-03-07T00:00:00.000-08:00</UCPTstart>
<UCPTstop>2008-09-01T00:00:00.000-07:00</UCPTstop>
<UCPTexceptionName>HolidayScheduler</UCPTexceptionName>
<DateEvent LonFormat="UNVT_date_event">80 80 HolidayScheduler</DateEvent>
<DateEvent LonFormat="UNVT_date_event">178 178 HolidayScheduler</DateEvent>
</Item>
<Item xsi:type="UFPTcalendar_Data" >
<UCPTname>Net/LON/iLON
App/Calendar</UCPTname>
<UCPTstart>2008-03-07T00:00:00.000-08:00</UCPTstart>
<UCPTstop>2008-04-27T00:00:00.000-07:00</UCPTstop>
<UCPTexceptionName>Inventory</UCPTexceptionName>
<DateEvent LonFormat="UNVT_date_event">23 23 Inventory</DateEvent>
<DateEvent LonFormat="UNVT_date_event">51 51 Inventory</DateEvent>
</Item>
</iLonItem>
</ReadResponse>
The Read function returns the following properties for each event from the specified Calendar:
<UCPTname>
The name of the calendar from which events were read in
the following format: <network/channel/device/functional
block>.
<UCPTstart>
<UCPTstop>
Timestamps indicating the times of the first and last dates of
the events returned by the Read function.
<UCPTexceptionName>
The name of the exception from which events were read.
<DateEvent>
A set of structures containing signed longs indicating the
number of days from <UCPTstart> to the first and last