Echelon LNS User Manual
Page 82
LNS Programmer's Guide
68
subscribe your application to most events by invoking the Begin
application must subscribe to an event to receive that event (i.e. one client application
subscribing to an event will not cause other client applications to receive that event). The
source of a stream of events is called the event generator. An application that subscribes
to a stream of events is called an event subscriber.
LNS implements a core set of events for installation and for monitoring and control tools.
These events are described below. The rest of this document describes when certain
events might be useful. You can also find out more about these events in the LNS Object
Server Reference help file.
• Service pin events. The OnSystemServicePin event is generated when a
service pin message is received. This event is used in several of the
installation scenarios described in Chapter 5.
• Change events. These events are generated whenever devices, routers,
channels, or subnets are added, deleted, moved or renamed, or when
device interfaces are modified.
Examples of change events include the OnChangeEvent, which is fired
any time an object in the LNS database is modified, and the
OnNodeIntfChangeEvent, which is fired every time a device’s external
interface is modified.
Note that some external interface change events are fired when the
change is made to the database and others are fired as the changes are
propagated to the devices. See the online help for the
OnNodeIntfChangeEvent event for more information on this.
• Update and update failure events. These events are generated when a
monitored network variable or message point is updated, or when an LNS
application fails to update a network variable or message point.
Examples of update events include the
OnNvMonitorPointUpdateEvent, which is fired every time a network
variable monitor point update is received, and the
OnMsgMonitorPointUpdateEvent, which is fired every time a message
monitor point update is received. Update failure events include the
OnNvUpdateErrorEvent and OnNvMonitorPointErrorEvent events.
• Commissioning status change events for devices and routers. The
OnCommission event is generated whenever the commission status of an
application device or router changes. Whenever a change that affects the
configuration of a device or router is made to the LNS database and that
device or router’s CommissionStatus property is set to
lcaCommissionUpdatesCurrent (indicating that the device has no
pending configuration changes), LNS will generate an OnCommission
event to indicate that the device or router now has pending updates (and
the CommissionStatus property will be set to
lcaCommissionUpdatesPending).
The OnCommission event will also be generated whenever the LNS
Object Server propagates, or fails to propagate changes to a device or
router.
This event is useful if you want to initiate operations as soon as a device’s
network image is up-to-date. For example, you might use it to determine
when to set a device online after its network image has been updated by