Temporary monitor sets – Echelon LNS User Manual
Page 207
LNS Programmer's Guide
193
Use permanent monitor sets when you need to create monitor points that will be used
often, or in multiple client sessions. If you need monitor points that will only be used
once, or in a single client session, you should use temporary monitor sets.
Temporary Monitor Sets
Temporary monitor sets are opened automatically by LNS as they are created, and can
only be accessed from the client that created them. They cannot be accessed from the
permanent
MonitorSets
collections described in the previous section. When a client
releases a temporary monitor set, or when the client session in which a temporary
monitor set was created ends, the temporary monitor set and all the monitor points it
contains are deleted automatically.
If you need to create a group of monitor points that you can use in multiple client
sessions or that you intend to use multiple times, you should use the permanent monitor
sets described earlier in this chapter. However, temporary monitor sets take less time
and network resources to create. This may be useful if you only need to monitor a device
while you are installing it on a network, or if your application will not need to monitor
the device on a regular basis.
The properties and methods that can be used on temporary monitor sets and temporary
monitor points are generally the same as those that can be used on permanent monitor
sets and permanent monitor points. However, there are a few exceptions to this rule.
Temporary
MonitorSet
objects cannot be created or used by Independent client
applications. The
Open()
and
Close()
methods have no effect on temporary
MonitorSet
objects, because temporary
MonitorSet
objects are opened as soon as they
are created, and closed as soon as the client application releases them, or the session in
which they were created ends. For more information on creating monitor sets, see the
Creating Monitor Sets section later in this chapter.
You should also note that temporary monitor sets are not enabled as they are opened.
You must explicitly enable temporary monitor sets and temporary monitor points with
your application using the applicable Enable() method. For this purpose, the
MsgMonitorPoint object now includes an Enable() method. For more information on
enabling monitor sets and monitor points, see Opening and Enabling Monitor Sets on
The
DefaultOptions
properties of
MsgMonitorPoint
and
NvMonitorPoint
objects in
temporary monitor sets are not accessible. The values applied to these properties are
taken from the temporary monitor set’s
MsgOptions
or
NvOptions
properties. For more
information on monitor and control options, see the Managing Monitor Sets section later
in this chapter.
Monitor points in temporary monitor sets do not support the use of connection
description templates to define certain monitoring options, as monitor points in
permanent monitor sets do. As a result, you must set the connDesc element to NULL
when you use the Add() method to add a message monitor point or network variable
monitor point to a temporary monitor set.
There is one other variance you should note when using temporary
MonitorSet
objects.
Network variable monitor points in temporary monitor sets cannot be automatically
bound to the monitoring node. This means that the
UseBoundUpdates
property of all
temporary monitor sets and monitor points must be set to
False
. For more information