C++ Based OPC UA Client/Server SDK  1.5.5.355
NodeAccessInfo Class Reference

Class for the user access flags of a node in the address space. More...

#include <nodeaccessinfo.h>

Inherits ReferenceCounter.

Public Types

enum  PermissionType {
  UA_ATTRREADABLE = 0x0001, UA_READABLE = 0x0002, UA_WRITABLE = 0x0004, UA_BROWSEABLE = 0x0008,
  UA_HISTORYREADABLE = 0x0010, UA_HISTORYINSERT = 0x0020, UA_HISTORYMODIFY = 0x0040, UA_HISTORYDELETE = 0x0080,
  UA_EVENTREADABLE = 0x0100, UA_EXECUTABLE = UA_WRITABLE, UA_ATTRWRITABLE = 0x0200, UA_PERMISSION_ALL = 0x03FF
}
 Definition of the PermissionType Enumeration defining the permissions of the NodeAccessInfo. More...
 
enum  AccessMask {
  UA_OTHER_ATTRREADABLE = UA_ATTRREADABLE, UA_OTHER_READABLE = UA_READABLE, UA_OTHER_WRITABLE = UA_WRITABLE, UA_OTHER_BROWSEABLE = UA_BROWSEABLE,
  UA_OTHER_HISTORYREADABLE = UA_HISTORYREADABLE, UA_OTHER_HISTORYINSERT = UA_HISTORYINSERT, UA_OTHER_HISTORYMODIFY = UA_HISTORYMODIFY, UA_OTHER_HISTORYDELETE = UA_HISTORYDELETE,
  UA_OTHER_EVENTREADABLE = UA_EVENTREADABLE, UA_OTHER_EXECUTABLE = UA_EXECUTABLE, UA_OTHER_ATTRWRITABLE = UA_ATTRWRITABLE , UA_OTHER_ALL = UA_PERMISSION_ALL,
  UA_GROUP_ATTRREADABLE = UA_ATTRREADABLE << UA_NUM_PERMISSION_BITS, UA_GROUP_READABLE = UA_READABLE << UA_NUM_PERMISSION_BITS, UA_GROUP_WRITABLE = UA_WRITABLE << UA_NUM_PERMISSION_BITS, UA_GROUP_BROWSEABLE = UA_BROWSEABLE << UA_NUM_PERMISSION_BITS,
  UA_GROUP_HISTORYREADABLE = UA_HISTORYREADABLE << UA_NUM_PERMISSION_BITS, UA_GROUP_HISTORYINSERT = UA_HISTORYINSERT << UA_NUM_PERMISSION_BITS, UA_GROUP_HISTORYMODIFY = UA_HISTORYMODIFY << UA_NUM_PERMISSION_BITS, UA_GROUP_HISTORYDELETE = UA_HISTORYDELETE << UA_NUM_PERMISSION_BITS,
  UA_GROUP_EVENTREADABLE = UA_EVENTREADABLE << UA_NUM_PERMISSION_BITS, UA_GROUP_EXECUTABLE = UA_EXECUTABLE << UA_NUM_PERMISSION_BITS, UA_GROUP_ATTRWRITABLE = UA_ATTRWRITABLE << UA_NUM_PERMISSION_BITS , UA_GROUP_ALL = UA_PERMISSION_ALL << UA_NUM_PERMISSION_BITS,
  UA_OWNER_ATTRREADABLE = UA_GROUP_ATTRREADABLE << UA_NUM_PERMISSION_BITS, UA_OWNER_READABLE = UA_GROUP_READABLE << UA_NUM_PERMISSION_BITS, UA_OWNER_WRITABLE = UA_GROUP_WRITABLE << UA_NUM_PERMISSION_BITS, UA_OWNER_BROWSEABLE = UA_GROUP_BROWSEABLE << UA_NUM_PERMISSION_BITS,
  UA_OWNER_HISTORYREADABLE = UA_GROUP_HISTORYREADABLE << UA_NUM_PERMISSION_BITS, UA_OWNER_HISTORYINSERT = UA_GROUP_HISTORYINSERT << UA_NUM_PERMISSION_BITS, UA_OWNER_HISTORYMODIFY = UA_GROUP_HISTORYMODIFY << UA_NUM_PERMISSION_BITS, UA_OWNER_HISTORYDELETE = UA_GROUP_HISTORYDELETE << UA_NUM_PERMISSION_BITS,
  UA_OWNER_EVENTREADABLE = UA_GROUP_EVENTREADABLE << UA_NUM_PERMISSION_BITS, UA_OWNER_EXECUTABLE = UA_GROUP_EXECUTABLE << UA_NUM_PERMISSION_BITS, UA_OWNER_ATTRWRITABLE = UA_GROUP_ATTRWRITABLE << UA_NUM_PERMISSION_BITS , UA_OWNER_ALL = UA_GROUP_ALL << UA_NUM_PERMISSION_BITS,
  UA_ALL_SIGNING_REQUIRED = (0x1 << (3*UA_NUM_PERMISSION_BITS)), UA_ALL_ENCRYPTION_REQUIRED = (0x2 << (3*UA_NUM_PERMISSION_BITS))
}
 Definition of the AccessMask Enumeration defining the user masks of the NodeAccessInfo. More...
 

Public Member Functions

 NodeAccessInfo (OpcUa_UInt32 mode, OpcUa_UInt16 ownerId, OpcUa_UInt16 groupId)
 Creates a NodeAccessInfo object with the access mask, the owner and the group information. More...
 
 NodeAccessInfo (const NodeAccessInfo *pOther)
 Creates a NodeAccessInfo object with the settings from another NodeAccessInfo. More...
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter ()
 construction
 
virtual ~ReferenceCounter ()
 destruction
 

Detailed Description

Class for the user access flags of a node in the address space.

OPC UA defines different information model elements like Objects, Variables, Method and Events and different services to access the information. This access can be restricted based on the user that tries to access the information. The user authentication is done during the Session creation and the user information is stored in the Session using the class SessionUserContext.

The access masks and the authorized user and group are stored in the UaNode with the class NodeAccessInfo. The information from SessionUserContext and NodeAccessInfo is used to determine if the requested operation like Read, Write or Browse can be executed.

The different permissions are defined by the PermissionType.

The different masks are defined by AccessMask.

The class is reference counted. After creation, the reference counter is 1. If the NodeAccessInfo is set on a node with UaNode::attachAccessInfo(), the reference counter is not incremented and the node takes ownership of the one reference. If you want to set NodeAccessInfo on additional nodes, the method UaNode::setAccessInfo() is used. It increments the reference counter of NodeAccessInfo.

Member Enumeration Documentation

Definition of the AccessMask Enumeration defining the user masks of the NodeAccessInfo.

Enumerator
UA_OTHER_ATTRREADABLE 

OTHER: Read access to all non-value attributes

UA_OTHER_READABLE 

OTHER: Read access to value attribute

UA_OTHER_WRITABLE 

OTHER: Write access to value attribute

UA_OTHER_BROWSEABLE 

OTHER: Browse access to node

UA_OTHER_HISTORYREADABLE 

OTHER: Read history access for node

UA_OTHER_HISTORYINSERT 

OTHER: Insert history access for node

UA_OTHER_HISTORYMODIFY 

OTHER: Modify history access for node

UA_OTHER_HISTORYDELETE 

OTHER: Delete history access for node

UA_OTHER_EVENTREADABLE 

OTHER: Receive events rights

UA_OTHER_EXECUTABLE 

OTHER: Execute method call rights

UA_OTHER_ATTRWRITABLE 

OTHER: Write access to non-value attributes dependent on write mask

UA_OTHER_ALL 

OTHER: Full access

UA_GROUP_ATTRREADABLE 

GROUP: Read access to all non-value attributes

UA_GROUP_READABLE 

GROUP: Read access to value attribute

UA_GROUP_WRITABLE 

GROUP: Write access to value attribute

UA_GROUP_BROWSEABLE 

GROUP: Browse access to node

UA_GROUP_HISTORYREADABLE 

GROUP: Read history access for node

UA_GROUP_HISTORYINSERT 

GROUP: Insert history access for node

UA_GROUP_HISTORYMODIFY 

GROUP: Modify history access for node

UA_GROUP_HISTORYDELETE 

GROUP: Delete history access for node

UA_GROUP_EVENTREADABLE 

GROUP: Receive events rights

UA_GROUP_EXECUTABLE 

GROUP: Execute method call rights

UA_GROUP_ATTRWRITABLE 

GROUP: Write access to non-value attributes dependent on write mask

UA_GROUP_ALL 

GROUP: Full access

UA_OWNER_ATTRREADABLE 

OWNER: Read access to all non-value attributes

UA_OWNER_READABLE 

OWNER: Read access to value attribute

UA_OWNER_WRITABLE 

OWNER: Write access to value attribute

UA_OWNER_BROWSEABLE 

OWNER: Browse access to node

UA_OWNER_HISTORYREADABLE 

OWNER: Read history access for node

UA_OWNER_HISTORYINSERT 

OWNER: Insert history access for node

UA_OWNER_HISTORYMODIFY 

OWNER: Modify history access for node

UA_OWNER_HISTORYDELETE 

OWNER: Delete history access for node

UA_OWNER_EVENTREADABLE 

OWNER: Receive events rights

UA_OWNER_EXECUTABLE 

OWNER: Execute method call rights

UA_OWNER_ATTRWRITABLE 

OWNER: Write access to non-value attributes dependent on write mask

UA_OWNER_ALL 

OWNER: Full access

UA_ALL_SIGNING_REQUIRED 

Access requires message signing

UA_ALL_ENCRYPTION_REQUIRED 

Access requires message encryption

Definition of the PermissionType Enumeration defining the permissions of the NodeAccessInfo.

Enumerator
UA_ATTRREADABLE 

Read access to all non-value attributes

UA_READABLE 

Read access to value attribute

UA_WRITABLE 

Write access to value attribute

UA_BROWSEABLE 

Browse access to node

UA_HISTORYREADABLE 

Read history access for node

UA_HISTORYINSERT 

Insert history access for node

UA_HISTORYMODIFY 

Modify history access for node

UA_HISTORYDELETE 

Delete history access for node

UA_EVENTREADABLE 

Receive events rights

UA_EXECUTABLE 

Execute method call rights

UA_ATTRWRITABLE 

Write access to non-value attributes dependent on write mask

UA_PERMISSION_ALL 

Full access

Constructor & Destructor Documentation

NodeAccessInfo::NodeAccessInfo ( OpcUa_UInt32  mode,
OpcUa_UInt16  ownerId,
OpcUa_UInt16  groupId 
)
inline

Creates a NodeAccessInfo object with the access mask, the owner and the group information.

Parameters
modeMask setting based on the flags defined in the AccessMask.
ownerIdThe ID of the owner of the node. Depending on the settings in the SessionUserContext, this ID may be used as second group/role ID.
groupIdThe ID of the owner of the group.
NodeAccessInfo::NodeAccessInfo ( const NodeAccessInfo pOther)
inline

Creates a NodeAccessInfo object with the settings from another NodeAccessInfo.

Parameters
pOtherOther NodeAccessInfo to copy from.

The documentation for this class was generated from the following file: