UA ANSI C Server Professional  1.4.2.297
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
UaServerUserManagement

Data Structures

struct  _UaServer_UserCtx
 Stores all user information. More...
 
struct  _UaServer_iNode
 Stores access information for UaNodes similar Unix inodes. More...
 

Functions

OpcUa_Boolean UaServer_UserMgt_InGroup (OpcUa_UInt16 gid, UaServer_UserCtx *pUserCtx)
 Checks if the given user is member of the group gid. More...
 
OpcUa_Boolean UaServer_UserMgt_IsBrowseable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if a node is browseable by the given user. More...
 
OpcUa_Boolean UaServer_UserMgt_IsExecutable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if a method is executable by the given user. More...
 
OpcUa_Boolean UaServer_UserMgt_IsReadable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if a variable is readable by the given user. More...
 
OpcUa_Boolean UaServer_UserMgt_IsWritable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if a variable is writable by the given user. More...
 
OpcUa_Boolean UaServer_UserMgt_IsHistoryReadable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if the history of a variable is readable by the given user. More...
 
OpcUa_Boolean UaServer_UserMgt_IsHistoryWritable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if the history of a variable is writable by the given user. More...
 
OpcUa_Boolean UaServer_UserMgt_IsAttributeReadable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if node attributes other than value are readable by the user. More...
 
OpcUa_Boolean UaServer_UserMgt_IsAttributeWritable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if node attributes other than value are writable by the user. More...
 
OpcUa_Boolean UaServer_UserMgt_IsSubscribable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if the user can subcribe for events on this object. More...
 
OpcUa_Void UaServer_UserMgt_SetPermissions (OpcUa_BaseNode *pNode, OpcUa_UInt16 uid, OpcUa_UInt16 gid, OpcUa_UInt16 mode)
 This function changes the permissions of a UaNode. More...
 
OpcUa_Void UaServer_UserMgt_SetDefaultPermissions (OpcUa_NodeType nodeType, UaServer_iNode defaultPermissions)
 Sets the default permissions for the given nodeType. More...
 
OpcUa_Void UaServer_UserMgt_SetDefaultPermissionsAllTypes (UaServer_iNode defaultPermissions)
 Sets the default permissions for all node types. More...
 
OpcUa_Void UaServer_UserMgt_SetAnonymousUserContext (UaServer_UserCtx anonymousUserCtx)
 Sets the user context to be used for anonymous logons. More...
 
OpcUa_Void UaServer_UserMgt_SetHistoryUserContext (UaServer_UserCtx historyUserCtx)
 Sets the user context to be used for historizing. More...
 

Detailed Description

Function Documentation

OpcUa_Boolean UaServer_UserMgt_InGroup ( OpcUa_UInt16  gid,
UaServer_UserCtx pUserCtx 
)

Checks if the given user is member of the group gid.

Parameters
[in]gidGroup id of the group.
[in]pUserCtxUser context.
Returns
Returns 1 if the user is member of the group, zero otherwise.
OpcUa_Boolean UaServer_UserMgt_IsAttributeReadable ( UaServer_iNode pInode,
UaServer_UserCtx pUserCtx 
)

Checks if node attributes other than value are readable by the user.

Parameters
[in]pInodeThe The INode information of the UaNode that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the node attributes are readable, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsAttributeWritable ( UaServer_iNode pInode,
UaServer_UserCtx pUserCtx 
)

Checks if node attributes other than value are writable by the user.

If this method returns 1 the UserWriteMask will be the same as the WriteMask, otherwise all attributes except value will be read only for the user.

Parameters
[in]pInodeThe The INode information of the UaNode that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the node attributes are writeable, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsBrowseable ( UaServer_iNode pInode,
UaServer_UserCtx pUserCtx 
)

Checks if a node is browseable by the given user.

Parameters
[in]pInodeThe The INode information of the UaNode that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the node is browseable, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsExecutable ( UaServer_iNode pInode,
UaServer_UserCtx pUserCtx 
)

Checks if a method is executable by the given user.

Parameters
[in]pInodeThe The INode information of the UaNode that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the method is executable, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsHistoryReadable ( UaServer_iNode pInode,
UaServer_UserCtx pUserCtx 
)

Checks if the history of a variable is readable by the given user.

This controls access to the variable's value attribute.

Parameters
[in]pInodeThe The INode information of the UaNode that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the variable is readable, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsHistoryWritable ( UaServer_iNode pInode,
UaServer_UserCtx pUserCtx 
)

Checks if the history of a variable is writable by the given user.

This controls access to the variable's value attribute.

Parameters
[in]pInodeThe The INode information of the UaNode that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the variable is writeable, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsReadable ( UaServer_iNode pInode,
UaServer_UserCtx pUserCtx 
)

Checks if a variable is readable by the given user.

This controls access to the variable's value attribute.

Parameters
[in]pInodeThe The INode information of the UaNode that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the variable is readable, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsSubscribable ( UaServer_iNode pInode,
UaServer_UserCtx pUserCtx 
)

Checks if the user can subcribe for events on this object.

Parameters
[in]pInodeThe The INode information of the UaNode that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the object allows subscribing, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsWritable ( UaServer_iNode pInode,
UaServer_UserCtx pUserCtx 
)

Checks if a variable is writable by the given user.

This controls access to the variable's value attribute.

Parameters
[in]pInodeThe The INode information of the UaNode that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the variable is writable, OpcUa_False otherwise.
OpcUa_Void UaServer_UserMgt_SetAnonymousUserContext ( UaServer_UserCtx  anonymousUserCtx)

Sets the user context to be used for anonymous logons.

Parameters
[in]anonymousUserCtxThe user context to be used.
OpcUa_Void UaServer_UserMgt_SetDefaultPermissions ( OpcUa_NodeType  nodeType,
UaServer_iNode  defaultPermissions 
)

Sets the default permissions for the given nodeType.

These default permissions are set when a new node of the given nodeType is created. This avoids setting the individual permissions for each node that is created.

Parameters
[in]nodeTypeThe node type to set the permissions as default.
[in]defaultPermissionsThe default permissions to set for the specified nodeType.
OpcUa_Void UaServer_UserMgt_SetDefaultPermissionsAllTypes ( UaServer_iNode  defaultPermissions)

Sets the default permissions for all node types.

These function is a convenience function and behaves like UaServer_UserMgt_SetDefaultPermissions.

Parameters
[in]defaultPermissionsThe default permissions to set for all node types.
OpcUa_Void UaServer_UserMgt_SetHistoryUserContext ( UaServer_UserCtx  historyUserCtx)

Sets the user context to be used for historizing.

Parameters
[in]historyUserCtxThe user context to be used.
OpcUa_Void UaServer_UserMgt_SetPermissions ( OpcUa_BaseNode *  pNode,
OpcUa_UInt16  uid,
OpcUa_UInt16  gid,
OpcUa_UInt16  mode 
)

This function changes the permissions of a UaNode.

Parameters
[in]pNodePointer to node which should be changed.
[in]uidThe userid of the owner.
[in]gidThe groupid of the owning group.
[in]modeThe new node permissions are specified in mode, which is a bit mask created by ORing together zero or more of the following:
  • UA_USER_ATTRWRITABLE (0x0100) Attribute writable by owner
  • UA_USER_WRITABLE (0x0200) Value writable by owner
  • UA_USER_READABLE (0x0400) Value readable by owner
  • UA_USER_BROWSEABLE (0x0800) Node is browseable by owner
  • UA_USER_ALL (0x0f00) All permissions for owner
  • UA_GROUP_ATTRWRITABLE (0x0010) Attribute writable by group
  • UA_GROUP_WRITABLE (0x0020) Value writable by group
  • UA_GROUP_READABLE (0x0040) Value readable by group
  • UA_GROUP_BROWSEABLE (0x0080) Node is browseable by group
  • UA_GROUP_ALL (0x00f0) All permissions for group
  • UA_OTHER_ATTRWRITABLE (0x0001) Attribute writable by others
  • UA_OTHER_WRITABLE (0x0002) Value writable by others
  • UA_OTHER_READABLE (0x0004) Value readable by others
  • UA_OTHER_BROWSEABLE (0x0008) Node is browseable by others
  • UA_OTHER_ALL (0x000f) All permissions for others