Advise, Disable, Message monitor point – Echelon OpenLNS User Manual

Page 531

Advertising
background image

OpenLNS Programmer's Reference

494

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 OnMsgMonitorPointErrorEvent and

OnMsgMonitorPointUpdateEvent events for the

MsgMonitorPoint 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 MsgMonitorPoint events listed

above.
You should determine how these updates are handled by

defining the UpdateErrorEvent method and the UpdateEvent

method for the ILcaMsgMonitorPointListener

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

tag

An Integer type

mpObject

The

MsgMonitorPoint

object to be acted

on.

object

An object that implements the

ILcaMsgMonitorPointListener

interface.

Added to API

LNS Release 3.0.

Disable

Summary

Disables monitoring of a message monitor point.
When you disable monitoring of a message monitor point, you

should note that this overrides subsequent calls to the

MonitorSet object's Enable method.

Advertising