Creating monitor sets – Echelon LNS User Manual
Page 208
LNS Programmer's Guide
194
on the UseBoundUpdates property, see The Implicit Bound Network Variable
Monitoring Scenario on page 220.
Creating Monitor Sets
The first step when creating a monitor and control application is to create a monitor set.
To create a permanent monitor set, follow these steps:
1. Open
the
ObjectServer
,
Network
, and
System
you plan to monitor and
control, as described in Chapter 4, Programming an LNS Application.
2. Get
the
AppDevice
object contained in the
Network
object's
MyVNI
property. This contains a collection of the
MonitorSet
objects that are
stored in the LNS database for your client’s Network Service Device. This
is the collection you should use when creating and configuring a
permanent monitor set.
Set VniAppDevice = MyNetwork.MyVNI
Set MyMonitorSets = VniAppDevice.MonitorSets
3. Invoke
the
MonitorSets
collection's
Add()
method. This method takes
the name of the new monitor set as an argument.
Set newMonitorSet = MyMonitorSets.Add("Monitor Set 1")
At this point, the new monitor set is closed. You will need to open and
enable it before using it for monitor and control purposes, as described
later in this chapter.
4. Set the properties of the new
MonitorSet
object, including the
NvOptions property, the MsgOptions property, and the Tag property.
You can use the NvOptions property, and the MsgOptions property to
set the default monitoring options that will be applied to the monitor set.
For more information on monitoring options, see Setting Monitoring
Options on page 200.
You can use the
Tag
property to store any information required to quickly
and efficiently identify the monitor set, such as the name of the device
you plan to monitor with the set. See the LNS Object Server Reference
help file for more information on the
Tag
property, and the other
properties of the
MonitorSet
object.
To create a temporary monitor set, follow these steps:
1. Open
the
ObjectServer
,
Network
, and
System
you plan to monitor and
control, as described in Chapter 4, Programming an LNS Application.
2. Call
the
CreateTemporaryMonitorSet()
method on the
Network
object. The method will return the new temporary monitor set.
Dim MyTempSet as LcaMonitorSet
Set MyTempSet = MyNetwork.CreateTemporaryMonitorSet()
At this point, the new monitor set is open, but it has not been enabled.
You will need to enable the monitor set before you use it for monitor and
control purposes. This is described later in the chapter.
3. Set the properties of the new
MonitorSet
object, including the