pyuaf.util.attributeids

This module defines the attribute ids.

Each node in an OPC UA address space contains several common attributes (a NodeId, a Display Name, a Browse Name, ... ) and some additional attributes depending on the class of the node (e.g. the Value attribute if the node is of class Variable). The AttributeId specifies which attribute we’re talking about.

Usage example:

import pyuaf
from pyuaf.client import Client
from pyuaf.util   import Address, ExpandedNodeId, attributeids

myClient = Client()

# define the address of the node of which we want to read the DisplayName and Value:
address = Address(ExpandedNodeId("myNode", "myNameSpaceUri", "myServerUri"))

# create a read request with two targets:
request = pyuaf.client.requests.ReadRequest(2)
request.targets[0].address     = address
request.targets[0].attributeId = attributeids.DisplayName
request.targets[1].address     = address
request.targets[1].attributeId = attributeids.Value
  • Attributes:

    attributeids.NodeId = 1

    The NodeId is the “absolute address” of a node unique within a server’s address space.

    attributeids.NodeClass = 2

    The NodeClass can be ObjectType, Object, VariableType, Variable, Method, View, ...

    attributeids.BrowseName = 3

    A BrowseName is a human readable name to browse the node within an address space.

    attributeids.DisplayName = 4

    A DisplayName is a localized, human readable name of the node.

    attributeids.Description = 5

    A Description is a localized string which describes the node.

    attributeids.WriteMask = 6

    A WriteMask specifies which node attributes can be written.

    attributeids.UserWriteMask = 7

    A UserWriteMask specifies which node attributes can be written by the current user.

    attributeids.IsAbstract = 8

    The IsAbstract flag specifies whether or not the ObjectType, VariableType or DataType can be instantiated.

    attributeids.Symmetric = 9

    The Symmetric flag specifies whether or not the forward and inverse references of the ReferenceType have the same meaning.

    attributeids.InverseName = 10

    The InverseName holds the browse name for an inverse reference.

    attributeids.ContainsNoLoops = 11

    The ContainsNoLoops flag specifies whether or not forward references of a View may result in a loop.

    attributeids.EventNotifier = 12

    Indicates that the node can be used to subscribe to events.

    attributeids.Value = 13

    The Value holds the value of a variable.

    attributeids.DataType = 14

    The DataType holds the node id of the data type of a Variable.

    attributeids.ValueRank = 15

    The ValueRank holds the number of dimensions in the value of a VariableType.

    attributeids.ArrayDimensions = 16

    The optional ArrayDimensions is an array of dimension lengths, in case the Variable is an array.

    attributeids.AccessLevel = 17

    The AccessLevel byte specifies how a Variable may be accessed.

    attributeids.UserAccessLevel = 18

    The UserAccessLevel byte specifies how a Variable may be accessed by the current user.

    attributeids.MinimumSamplingInterval = 19

    The MinimumSamplingInterval specifies the minimum sampling time (in milliseconds!) for the Variable.

    attributeids.Historizing = 20

    The Historizing flag specifies whether or not the historical data is recorded for the Variable.

    attributeids.Executable = 21

    The Executable flag specifies whether or not the Method can be called.

    attributeids.UserExecutable = 22

    The UserExecutable flag specifies whether or not the Method can be called by the current user.

  • Functions:

    pyuaf.util.attributeids.toString(attributeId)

    Get a string representation of the application type.

    Parameters:attributeId (int) – The attribute id, e.g. pyuaf.util.attributeids.Value.
    Returns:The name of the attribute id, e.g. ‘Value’.
    Return type:str