Echelon LNS User Manual
Page 243

LNS Programmer's Guide
229
3. Call
the
Advise() method on the MsgMonitorPoint object you want to
monitor. Specify the COM object created in step 1 as the object element.
At this point, LNS will stop generating the
OnMsgMonitorPointErrorEvent and
OnMsgMonitorPointUpdateEvent events for the monitor point, and the
object specified as the object element will start receiving
UpdateErrorEvent and UpdateEvent events for the monitor point. The
Advise() method must be called from the thread that is managing the
OnMsgMonitorPointErrorEvent and
OnMsgMonitorPointUpdateEvent events.
NOTE: The OnMsgMonitorPointEvent event will be fired by the LNS
Object Server for each message monitor point contained in a monitor set
when the motor set is opened to signal that the message monitor point is
available for use. Similarly, the OnMsgMonitorPointEvent event will be
fired each time a message monitor point is created in a monitor set that is
currently open, acknowledging that the message monitor point has been
instantiated. You should wait until this event has been fired to retrieve a
MsgMonitorPoint object and call the Advise() method on it.
4. Each time the UpdateErrorEvent or UpdateEvent events are
received, the UpdateErrorEvent() or UpdateEvent() methods will be
called.
5. You can call the Unadvise() method on the MsgMonitorPoint object at
any time to return to the default behavior, where events are invoked in
the client thread.
To use the ILcaNvMonitorPointListener interface, follow these steps:
1. Create a COM object that implements the
ILcaNvMonitorPointListener interface.
2. Define the object's behavior when the UpdateErrorEvent() and
UpdateEvent() methods are called. These methods will be called each
time the monitor point you select in step 3 is updated.