beautypg.com

Methods – Echelon OpenLNS User Manual

Page 130

background image

OpenLNS Programmer's Reference

93

Methods

The AppDevices object contains the following methods

.

Add

AddReference

ItemByHandle

ItemByNeuronID

Remove

Add

Summary

Defines a new

AppDevice

object. This method adds a device to

the system, but does not install the physical device. The

Commission

method is used to install the physical device after

that device is defined using this method.

Adding an application device to the system is a two or three

step operation: definition, loading (optional), and

commissioning.
1. The Add method is used to define the device.
2. The Load method is optionally used to write the

application image on the device.

3. The Commission method is used to write the network

image on the physical device, including its network

address.

The Add method can be used whether OpenLNS is physically

attached to the network or not, and while the network

management mode (MgmtMode property) is set to

lcaMgmtModePropagateConfigUpdates (0) or

lcaMgmtModeDeferConfigUpdates (1).
You can specify the device’s definition when you call the Add

method by supplying a DeviceTemplate object as the

deviceTemplateObject parameter. If a DeviceTemplate is

provided, then the device definition is taken from there. You

can initialize a DeviceTemplate by importing an external

interface file (.XIF and .XFB extensions) with the Import

method. For more information on device interfaces, see

Chapter 6 of the OpenLNS Programmer’s Guide.
If you do not specify the DeviceTemplate object, the device

template will be assigned (and recovered from the device if

necessary) when the device is commissioned. In this case, the

device's interface will be unavailable until the device has been

commissioned. You should specify the device template

whenever possible.
The Add method (in combination with the Commission method

when either the deviceTemplateObject or channelObject

element is omitted) causes the following to occur:

The device is assigned a subnet/node address in the

system’s domain.