beautypg.com

Onnetworkvariableupdate, Onnetworkvariableupdate e, E onnetworkvariableupdate – Echelon OpenLNS User Manual

Page 746

background image

OpenLNS Programmer's Reference

709

your application's main thread. Instead, a separate thread

will be used for this event.
When using the separate thread for these events, you should

perform as little processing as possible within your event

handler. However, you can use the PostMessage() or

PostMessageThread() functions of the Win API to defer these

events to the application's main thread. Consult the Windows

documentation for more information on these functions.
For more information on multi-threading and OpenLNS, see

the Multi-Threading and OpenLNS Applications section in

the OpenLNS Programmer's Guide.

Syntax

OnNetworkVariableStringUpdate(monitorTag As Long,

value as String, dataUpdateInfo As Object)

Element

Description

monitortag

The monitor tag value assigned to

the network variable.

value

Current data value of the network

variable.

dataUpdateInfo

The DataValue object for this

update.

Added to API

Prior to LNS Release 3.0.

OnNetworkVariableUpdate

Summary

Indicates that a network variable value has been updated

.

You can register for this event by setting the DsMonitorTag

property to a non-zero value.
If you are using a programming environment that cannot

handle Object types being passed as an event parameter, you

should use the OnNetworkVariableStringUpdate event

instead of this one. To use that event, set the ObjectServer

object's Flags property to 1.
Note that if you are using Visual C++, the

OnNetworkVariableUpdate event will not be fired in your

application's main thread. A separate thread will be used for

this event. When using the separate thread for these events,

Echelon recommends that you perform as little processing as

possible within your event handler. However, you can use the

PostMessage() or PostMessageThread() functions of the Win

API to defer these events to the application's main thread.

Consult the Windows documentation for more information on

these functions.
For more information on multi-threading and OpenLNS, see

the Multi-Threading and OpenLNS Applications section in

the OpenLNS Programmer's Guide.