beautypg.com

3 java programming examples, 1 reading and writing data point values in java, Java programming examples -17 – Echelon i.LON SmartServer 2.0 User Manual

Page 422: Reading and writing data point values in java -17, Java programming examples

background image

i.LON SmartServer 2.0 Programmer’s Reference

22-17

12. Observe the output in the Console view at the bottom of the development environment.

22.3

Java Programming Examples

This section includes Java programming examples that demonstrate how to use the SmartServer’s
SOAP API to create custom applications. These programming examples create simple console
applications that do the following:

• Read and write data point values.

• Create and read a data logger.

• Create and install L

ON

W

ORKS

devices

• Discover and install uncommissioned external device

Notes:

All examples assume that you are using a SmartServer that has been set to its factory default settings.
This prevents compilation errors based on mismatching properties of the objects in the
L

ON

W

ORKS

network hierarchy (network/channel/device/functional block/data point).

You can download these programming examples from the i.LON SmartServer Community Web site at

ilonsmartserver.com

.

22.3.1

Reading and Writing Data Point Values in Java

This Java example toggles the SmartServer’s digital relay outputs when run. It demonstrates how to
use an xSelect statement to filter items returned by a List() method, and it demonstrates how to write to
data points using values and presets.

You can execute this code after you have setup the Java programming environment as described in
section 22.1, and created the Web service client as described in section 22.2.

For more information on the data point properties set and read in this example, see section 4.3.2, Using
the Get Function on the Data Server
, a
nd section 4.3.3, Using the Read Function on the Data Server,
respectively.