C++ UA Server SDK
1.5.1.326
|
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 | |
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.
Definition of the AccessMask Enumeration defining the user masks of the NodeAccessInfo.
Definition of the PermissionType Enumeration defining the permissions of the NodeAccessInfo.
|
inline |
Creates a NodeAccessInfo object with the access mask, the owner and the group information.
mode | Mask setting based on the flags defined in the AccessMask. |
ownerId | The ID of the owner of the node. Depending on the settings in the SessionUserContext, this ID may be used as second group/role ID. |
groupId | The ID of the owner of the group. |
|
inline |
Creates a NodeAccessInfo object with the settings from another NodeAccessInfo.
pOther | Other NodeAccessInfo to copy from. |