5 writing priority levels, 6 data server write function examples – Echelon i.LON SmartServer 2.0 User Manual

Page 57

Advertising
background image

i.LON SmartServer 2.0 Programmer’s Reference

4-16

<UCPTvalue LonFormat= "SNVT_scene.function">SC_RECALL</UCPTvalue>
<UCPTvalue LonFormat= "SNVT_scene.sceneNumber">2</UCPTvalue>

When you are writing to the fields of structured data points, you may also want to fill in the
<UCPTpropagate> property. If you assign the default value 1 to this property, the change you make to
the data point will be propagated to the network. If you assign value 0 to this property, the change will
be made in the Data Server, but it will not be propagated over the L

ON

W

ORKS

network. This may be

useful if you are writing to the different fields of a structure within a call to the Write function, and do
not want to update the structure over the network until all fields have been written by the function.

4.3.5.5 Writing Priority Levels

The priority level specified for each data point is set by the <UCPTpriority> property. You can enter a
value between 0-255 as the priority, where 0 represents the highest priority level and 255 represents
the lowest priority level. The priority level you specify must be higher than (or equal to) the priority
level used by the last application to write to the data point. If it is not, the data point will not be
successfully updated. For more information on priority levels, see Using the Invoke Function to Reset
Data Point Priorities
.

4.3.5.6 Data Server Write Function Examples

The following code samples demonstrate how to use the Write function on the Data Server.

Request (write a value to a scalar data point normally measured in Celsius using Fahrenheit)

<Write xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<Item>
<UCPTname>Net/LON/iLON

App/VirtFb/temp_f</UCPTname>

<UCPTvalue

LonFormat="#0000000000000000[0].SNVT_temp_f#US">68.0</UCPTvalue>

</Item>
</iLonItem
</Write>

Request (write a value to a structured data point)

<Write xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<Item>
<UCPTname>Net/LON/iLON

App/VirtFb/nvoSwitch</UCPTname>

<UCPTvalue>100.0

1</UCPTvalue>

</Item>
</iLonItem>
</Write>

Request (write a value to a structured data point with a preset)

<Write xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<Item>
<UCPTname>Net/LON/iLON

App/VirtFb/nvoSwitch</UCPTname>

<UCPTvalue

LonFormat="UCPTvalueDef">ON</UCPTvalue>

</Item>
</iLonItem>
</Write>

Request (write to the field of a structured data point, but don’t propagate the value over the
L

ON

W

ORKS

channel)

<Write xmlns="http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
<iLonItem>
<Item>
<UCPTname>Net/LON/iLON

App/VirtFb/nvoSwitch</UCPTname>

<UCPTvalue

LonFormat="SNVT_switch.value">85</UCPTvalue>

<UCPTpropagate>0</UCPTpropagate>
</Item>
</iLonItem>
</Write>

Advertising