Methods, Advise – Echelon OpenLNS User Manual

Page 682

Advertising
background image

OpenLNS Programmer's Reference

645

Name

Parent

Tag

Events

UpdateErrorEvent

UpdateEvent

Methods

The NvMonitorPoint

contains the following methods

.

Advise

Disable

Enable

Unadvise

Advise

Summary

Enables update and error events for an object that

implements the

ILcaMsgMonitorPointListener

or

ILcaNvMonitorPointListener

interface.

This method should only be used if the development

environment supports multi-threading (such as Visual C++).
When you call this method, OpenLNS will provide event

notification of updates and update errors using callbacks,

instead of Windows messaging. The callback is made to the

UpdateEvent or UpdateErrorEvent method of the object

specified as the object parameter when the Advise method is

called.
When you call the Advise method, the

client thread will stop

generating OnNvMonitorPointErrorEvent and

OnNvMonitorPointUpdateEvent events for the

NvMonitorPoint object specified as the mpObject element.
The object specified as the object element will then start

receiving UpdateErrorEvent events and message

UpdateEvent events for that monitor point.
Note: The Advise method must be called from the event

handler that is managing the NvMonitorPoint events listed

above.
You should determine how these updates are handled by

defining the UpdateErrorEvent and the UpdateEvent for the

ILcaNvMonitorPointListener interface.
The returned tag should be supplied to the Unadvise method

to return update notification to the client thread.

Availability

Local, full, lightweight, and independent clients. Note that

temporary

MonitorSet

objects and temporary monitor points

are not available on Independent clients.

Syntax

tag = mpObject.Advise object

Element

Description

Advertising