User manual

Table Of Contents
Host Interface
49
Private Property Let IFM2DeviceEvents_ZeroDeviceTimeoutCounter( _
ByVal RHS As Integer)
m_ZeroDeviceTimeoutCounter = RHS
End Property
Status Change
Notifications
Status change notifications are dispatched to the applica-
tion code through the IFM2DeviceEvents_Notify-
DeviceStatus callback method. The CallbackData and
DevicesList objects are passed to the application. Status
change event types are steered by testing the Callback-
Data.CallbackEvent string. The CallbackEvent string
will be one of the following:
“MeterAdded”
“MeterRemoved”
The DevicesList is updated with each call to this callback
method. A reference to the cFM2Device object from
which this callback comes is obtained by indexing into
the DevicesList collection through the DevicesList.Item
search method using the string version of Callback-
Data.DeviceIndex as the search key.
The data check timer must be started for the new devices
list when a meter is added.
The following Visual Basic 6.0 code shows how to
obtain reference to the cFM2Device object and start the
data check timer when a meter is added:
‘Declaration:
Dim ThisDevice As IFM2Device
‘Executable code:
‘Get the current device from the collection
Set ThisDevice = m_DevicesList.Item(CallbackData.DeviceIndex)