system.opchda.getAttributes
This function is used in Python Scripting.
Descriptionβ
Queries the given server for the item attributes that are available with system.opchda.readAttributes().
Client Permission Restrictionsβ
This scripting function has no Client Permission restrictions.
Syntaxβ
system.opchda.getAttributes(serverName)
Parametersβ
| Type | Parameter | Description |
|---|---|---|
| String | serverName | The name of the defined OPC-HDA server to query. |
Returnsβ
List[AttributeInfo] - A list of AttributeInfo objects. See the AttributeInfo Methods panel for a listing of available methods.
Scopeβ
Gateway, Vision Client, Perspective Session
AttributeInfo Methodsβ
| Method | Description | Return Type |
|---|---|---|
| getId() | Returns the ID of the attribute. | Integer |
| getName() | Returns the name of the attribute. | String |
| getDesc() | Returns the description of the attribute. | String |
| getType() | Returns the data type of the attribute. | Datatype |
Code Examplesβ
Code Snippet
# This example gets the description of a Matrikon OPC HDA explorer
# Declare a OPC HDA variable using the system function and prints out the results
opcHda = system.opchda.getAttributes('Matrikon HDA')
print opcHda
# Use the getDesc() method to get the description of the attribute and print out the result
getDesc = hda[1].getDesc()
print getDesc