ANSI C UA Server SDK  1.5.1.313
 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...
 

Macros

#define UA_OTHER_HISTORY_READABLE   UA_OTHER_HISTORYREADABLE
 
#define UA_OTHER_HISTORY_WRITABLE   (UA_OTHER_HISTORYINSERT | UA_OTHER_HISTORYMODIFY | UA_OTHER_HISTORYDELETE)
 
#define UA_GROUP_HISTORY_READABLE   UA_GROUP_HISTORYREADABLE
 
#define UA_GROUP_HISTORY_WRITABLE   (UA_GROUP_HISTORYINSERT | UA_GROUP_HISTORYMODIFY | UA_GROUP_HISTORYDELETE)
 
#define UA_USER_HISTORY_READABLE   UA_USER_HISTORYREADABLE
 
#define UA_USER_HISTORY_WRITABLE   (UA_USER_HISTORYINSERT | UA_USER_HISTORYMODIFY | UA_USER_HISTORYDELETE)
 

Functions

OpcUa_Boolean UaServer_UserMgt_InGroup (OpcUa_Byte 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_IsHistoryInsertable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if the given user can insert into the history of a given variable. More...
 
OpcUa_Boolean UaServer_UserMgt_IsHistoryModifiable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if the given user can modify the history of a given variable. More...
 
OpcUa_Boolean UaServer_UserMgt_IsHistoryDeletable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if the given user can delete from the history of a given variable. More...
 
OpcUa_Boolean UaServer_UserMgt_IsHistoryWritable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 
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)
 
OpcUa_Boolean UaServer_UserMgt_IsEventReadable (UaServer_iNode *pInode, UaServer_UserCtx *pUserCtx)
 Checks if the user can receive the event with the given INode. More...
 
OpcUa_Void UaServer_UserMgt_SetPermissions (OpcUa_BaseNode *pNode, OpcUa_Byte uid, OpcUa_Byte 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...
 
UaServer_iNode UaServer_UserMgt_GetDefaultPermissions (OpcUa_NodeType nodeType)
 Returns the default permissions for the given nodeType. 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

Macro Definition Documentation

#define UA_GROUP_HISTORY_READABLE   UA_GROUP_HISTORYREADABLE
Deprecated:
Use UA_GROUP_HISTORYREADABLE instead.
#define UA_GROUP_HISTORY_WRITABLE   (UA_GROUP_HISTORYINSERT | UA_GROUP_HISTORYMODIFY | UA_GROUP_HISTORYDELETE)
Deprecated:
Use UA_GROUP_HISTORYINSERT, UA_GROUP_HISTORYMODIFY and/or UA_GROUP_HISTORYDELETE instead.
#define UA_OTHER_HISTORY_READABLE   UA_OTHER_HISTORYREADABLE
Deprecated:
Use UA_OTHER_HISTORYREADABLE instead.
#define UA_OTHER_HISTORY_WRITABLE   (UA_OTHER_HISTORYINSERT | UA_OTHER_HISTORYMODIFY | UA_OTHER_HISTORYDELETE)
Deprecated:
Use UA_OTHER_HISTORYINSERT, UA_OTHER_HISTORYMODIFY and/or UA_OTHER_HISTORYDELETE instead.
#define UA_USER_HISTORY_READABLE   UA_USER_HISTORYREADABLE
Deprecated:
Use UA_USER_HISTORYREADABLE instead.
#define UA_USER_HISTORY_WRITABLE   (UA_USER_HISTORYINSERT | UA_USER_HISTORYMODIFY | UA_USER_HISTORYDELETE)
Deprecated:
Use UA_USER_HISTORYINSERT, UA_USER_HISTORYMODIFY and/or UA_USER_HISTORYDELETE instead.

Function Documentation

UaServer_iNode UaServer_UserMgt_GetDefaultPermissions ( OpcUa_NodeType  nodeType)

Returns the default permissions for the given nodeType.

Parameters
[in]nodeTypeThe node type to get the permissions for.
Returns
The default permissions for the given type or an NULL iNode if the type was invalid.
OpcUa_Boolean UaServer_UserMgt_InGroup ( OpcUa_Byte  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_IsEventReadable ( UaServer_iNode *  pInode,
UaServer_UserCtx *  pUserCtx 
)

Checks if the user can receive the event with the given INode.

Parameters
[in]pInodeThe The INode information of the event that is going to be accessed
[in]pUserCtxThe user context which identifies the user of the current session.
Returns
OpcUa_True if the event can be received, 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_IsHistoryDeletable ( UaServer_iNode *  pInode,
UaServer_UserCtx *  pUserCtx 
)

Checks if the given user can delete from the history of a given variable.

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 deletable, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsHistoryInsertable ( UaServer_iNode *  pInode,
UaServer_UserCtx *  pUserCtx 
)

Checks if the given user can insert into the history of a given variable.

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 insertable, OpcUa_False otherwise.
OpcUa_Boolean UaServer_UserMgt_IsHistoryModifiable ( UaServer_iNode *  pInode,
UaServer_UserCtx *  pUserCtx 
)

Checks if the given user can modify the history of a given variable.

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 modifiable, 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 
)
Deprecated:
Use the more specific UaServer_UserMgt_IsHistoryInsertable/Modifiable/Deletable instead.

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 
)
Deprecated:
This function is not necessary as all events can be received via the server object; restrict receiving of events by setting their iNode accordingly instead.

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_Byte  uid,
OpcUa_Byte  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 Attribute writable by owner
  • UA_USER_WRITABLE Value writable by owner
  • UA_USER_EXECUTABLE Method executable by owner
  • UA_USER_HISTORYINSERT History can be inserted by owner
  • UA_USER_HISTORYMODIFY History can be modified by owner
  • UA_USER_HISTORYDELETE History can be deleted by owner
  • UA_USER_READABLE Value readable by owner
  • UA_USER_HISTORYREADABLE History can be read by owner
  • UA_USER_BROWSEABLE Node is browseable by owner
  • UA_USER_ATTRREADABLE Attribute readable by owner
  • UA_USER_EVENTREADABLE Event can be received by owner
  • UA_USER_OBSERVATION Combination of all read access permissions
  • UA_USER_OPERATION Combination of OBSERVATION, WRITABLE and EXECUTABLE
  • UA_USER_ALL All permissions for owner The same defines exist for UA_GROUP and UA_OTHER. Additionally following define might be set:
  • UA_ALL_ENCRYPTION_REQUIRED Require the connection used to be encrypted (OpcUa_MessageSecurityMode_SignAndEncrypt)