Cpbyhandle, Dynamiclonmarkobjectcapacity – Echelon OpenLNS User Manual
Page 427
OpenLNS Programmer's Reference
390
CpByHandle
Summary
Retrieves the ConfigProperty object contained in the Interface
property of an AppDevice object or in the Interface property of
a DeviceTemplate object selected by its Handle property.
Interface objects (belonging to AppDevice and DeviceTemplate
objects), LonMarkObjects, and NetworkVariable objects each
have a ConfigProperties collection that contains all of the
configuration properties that apply to the object.
Typically a ConfigProperty object is accessed through the
appropriate ConfigProperties collection. However, in some
cases, you might need to access a ConfigProperty without
knowing the object to which it applies. This method can be
used to retrieve a ConfigProperty defined within an Interface
giventhe Handle of a ConfigProperty object, even if the
ConfigProperty applies to one or more LonMarkObjects or
NetworkVariable objects. For example, this method can be
used to retrieve a ConfigProperty when processing a
ConfigProperty change event reported by
OnNodeIntfChangeEvent.
If the configuration property does not belong to the specified
Interface, this method returns an LCA, #6
ObjectNotFound error. To ensure that a device-based
configuration property is always found, use this method on
the main interface of an AppDevice object from the Interface
property, and not on a custom interface from the Interfaces
collection.
To determine all the objects to which the configuration
property applies, use the AppliesTo property of the
ConfigProperty object.
Availability
Local, full, and lightweight clients.
Syntax
cpObject = interfaceObject.CpByHandle(cpHandle)
Element
Description
cpObject
The returned
.
interfaceObject
containing the
configuration property.
cpHandle
The handle of the ConfigProperty
object to be retrieved.
Data Type
ConfigProperty object
.
Read/Write
Read only.
Added to API
OpenLNS.