Echelon OpenLNS User Manual

Page 67

Advertising
background image

OpenLNS Programmer's Reference

30

image.

Adding an application device to the system is a two-step

operation. First, you should define the device and load the

device’s application image with the Load or LoadEx methods.

Then, you should commission it. You can use the Add

methods of the AppDevices object to define the application

device.
You can then use the Commission method to assign that

definition to an actual physical device. If you invoke the

Commission method while the network management mode is

set to lcaMgmtModeDeferConfigUpdates (1), physical

devices will not updated with configuration changes caused

by the commission process until the network management

mode is set to lcaMgmtModePropagateConfigUpdates

(0). However, as of LNS 3.20, you can use the CommissionEx

method to update the physical devices while the network

management mode is set to

lcaMgmtModeDeferConfigUpdates (1).
The Neuron ID of the physical device must be set before

commissioning it. The Neuron ID of an AppDevice

is stored

in its NeuronId property.
The commission procedure will also validate that the physical

device has the same external interface and program ID as

defined for the AppDevice object in the OpenLNS database.

It will also validate that the physical device is on the channel

assigned to the AppDevice object in the OpenLNS database.

If the physical device is not using the same external interface

or program ID as defined in the database, the commission

will fail, and either the NS, #59

lcaErrNsProgramIntfMismatch or NS, #38

lcaErrNsProgramidMismatch exceptions

will be thrown.

If the physical device is not on the channel assigned to it in

the database, the commission will fail, and the NS, #72

lcaErrNsWrongChannel exception will be thrown.
You should note that this validation will only be performed if

the network management mode is set to

lcaMgmtModePropagateConfigUpdates (0). You can also

determine what level of validation will be performed on the

device with the DeviceValidation property of the

DeviceTemplate used by the device.
When commissioning is complete, an application device is

placed in the lcaStateCnfgOffline state.
Before commissioning an AppDevice object, you should make

sure that the configuration property information contained in

the OpenLNS database for the device is complete, and you

should download the configuration property values in the

OpenLNS database into the physical device before

commissioning the device. You can do so by calling the

DownloadConfigProperties method on the AppDevice

object

before commissioning. Use the

Advertising