Oncommission, Oncommissione – Echelon OpenLNS User Manual

Page 733

Advertising
background image

OpenLNS Programmer's Reference

696

OnCommission

Summary

Indicates that a device’s commission status has changed.

You can register your application for the OnCommission

event by invoking the

BeginCommissionEvents

method

.

You can subscribe or unsubscribe your application to this

event by calling the System

object’s BeginCommissionEvent

and EndCommissionEvent methods.
When you create a network, and then change the network

management mode of the OpenLNS Object Server from

lcaMgmtModeDeferConfigUpdates (1) to

lcaMgmtModePropagateConfigUpdates (0), the NSI is

commissioned automatically. However, if you registered for

OnCommissionEvent while the network management mode is

set to lcaMgmtModeDeferConfigUpdates (1), your

application will not receive an event indicating this. In this

case, you can check the commission status of the NSI after

the network management mode has been set to

lcaMgmtModePropagateConfigUpdates (0 by reading

the CommissionStatus

of the System

object’s

NetworkServiceDevice. You can change the Object Server’s

network management mode by writing to the MgmtMode

property.

Syntax

OnCommission(networkHandle As Long, systemHandle As

Long, objectType as Integer, commissionStatus As Integer,

channelHandle as Long, objectHandle As Long)

Element

Description

networkHandle

Handle of the network in which the

commissioned object resides.

systemHandle

Handle of the system in which the

commissioned object resides.

objectType

The type of object that was

commissioned.

The enumerated

values for this element, which are

contained in the

ConstDeviceEventTypes constant, are

as follows:

0 lcaAppDeviceEvent

1 lcaRouterEvent

commissionStatus The status of the commissioning

updates.
The commission status changes to

lcaCommissionUpdatesPending

(1) when database changes are made

that affect a device’s configuration.
, or they change to

lcaCommissionUpdatesFailed (2)

when there is a failure to propagate

Advertising