opc.hda.ItemAttributes class

Package: opc.hda

OPC HDA item attributes

Description

OPC servers store and publish item attributes for each item in the server's name space. Such attributes assist in describing items, including their scaling, limits, and data types. A server is not obliged to store attributes, although common attributes are defined in the OPC HDA specification.

The ItemAttributes class is used to store item attributes available on a server. You do not create ItemAttributes objects directly; instead, when you connect an OPC HDA client to the server, the ItemAttributes property is automatically populated with available item attributes for that server.

You can access the required aggregate type using dot-notation on the ItemAttributes property of a connected OPC HDA client. For example, for client hdaObj, you can access the MAXIMUM attribute by typing hdaObj.ItemAttributes.MAXIMUM. Tab completion works for item attributes. Specific attributes are distinguished from class methods by all-capitals: getDescription is not an available aggregate type, but is a method of the ItemAttributes class.

Construction

You do not create ItemAttributes objects directly; instead, when you connect an OPC HDA client to the server, the ItemAttributes property is automatically populated with available item attributes for that server.

Methods

getDescription Get description of OPC HDA aggregate type or item attribute
getIDFromnameTranslate OPC HDA aggregate type or item attribute name to numeric identifier
getIDListGet all aggregate type or item attribute IDs
getNameListGet all aggregate type or item attribute names

Properties

ItemAttributes objects have no generic user-visible properties. Instead, each available item attribute is created as a property. For example, if the server supports the DESCRIPTION item attribute, the ItemAttributes object stored in the ServerItemAttributes property of a client connected to that server has a property named DESCRIPTION with the value set to the numeric ID of that attribute.

Copy Semantics

Value — To learn how this affects your use of the class, see Comparing Handle and Value Classes in the MATLAB® Object-Oriented Programming documentation.

Was this topic helpful?