UaModeler
1.5.2.398
|
NodeAccessInfo is a structure defined by Unified Automation. Using this structure you can specify access rights on a per node basis. These access rights are:
You can specify the access rights for
In addition, you can specify that a secure channel that supports signing and/or encryption is required to access the node. These settings are used for all users/groups/roles.
The NodeAccessInfo is stored in the binary file and in the NodeSet2 XML file (as a user defined extension).
Please see HowTo: Using NodeAccessInfo for an example about using NodeAccessInfo with the .NET based OPC UA SDK.
NodeAccessInfo is disabled by default. It can be enabled in the Edit Settings dialog by checking the box “NodeAccessInfo enabled”.
UaModeler supports two modes of NodeAcccessInfo:
Be aware that not all modes are supported by each of Unified Automation’s SDKs:
Before you can assign rights for different users, groups, or roles, it is necessary to define the names for these users, groups or roles that are to be used in a project. Right click on “Models” in the Project Window and choose “Edit names for NodeAccessInfo” from the context menu. Depending on which mode is set, the dialog contains a single list of roles or two lists, one for “Users” and one for “Groups”. To add a new user, group, or role, insert text to the empty field at the bottom of the list. To remove a user, group, or role, delete the text from the field.
UaModeler comes with a set of default roles/groups. When checking the box “Add Default Roles” in the Edit Settings dialog, the following defaut roles/groups are added to the project:
To set the NodeAccessInfo for a node, select the node in the Information Model Window. Then switch to the Extensions View. For being able to specify any NodeAccessInfo, it is necessary to check the box “Specify NodeAccessInfo” first.
Now you can specify access rights as required, separately for each permission type, by checking the boxes that are arranged in three columns. Depending on what mode is set in the Edit Settings dialog, these columns are titled “User”, “Group”, and “Other” or “Role1”, “Role2”, and “Other”. Permission types that are put in parentheses don’t apply for the selected node. Nevertheless, it is possible to grant these permissions, because NodeAccessInfos may be automatically applied to children or hierarchically referenced nodes (see below).
To choose for what user/group/role these access rights apply for the selected node, UaModeler provides two drop-down menus directly below the columns. Depending on the mode, you can choose “User” and “Group” or “Role1” and “Role2” from the list.
The last drop-down menu controls whether the NodeAccessInfo only applies to the selected node or is automatically applied to other nodes as well. There are three alternatives to choose from. NodeAccessInfo can be applied to
It is possible to specify a default NodeAccessInfo for a model. This default NodeAccessInfo applies for all nodes belonging to the model as long as no other NodeAccessInfo is assigned for that particular node. Right click on the model in the Project Window. Then choose “Set model extensions…” from the context menu. A dialog for setting extensions for the whole model will open. You can set the default NodeAccessInfo for the model similarly as described above.
The schema for NodeSet2 XML files defined by the OPC Foundation (http://opcfoundation.org/UA/2011/03/UANodeSet.xsd) allows to specify user defined extensions to nodes and models.
UaModeler allows you to create such extensions. The GUI contains an XML editor for displaying and editing extensions.
User defined extensions are disabled by default. To enable this feature, select Settings → Edit Settings… from the menu to open the Edit Settings dialog. Then check the box “User defined extensions enabled”.
It is recommended to specify an own XML namespace for user defined extensions. This is useful if own XML parser code should be used. The namespace URI for extensions can be set in the field “Default Extension Namespace URI”. This namespace is automatically added by the XML editor if no other namespace is typed in. The default extension namespace URI is saved in the project file.
To enter extensions for a node, select it in the Information Model Window. Then switch to the Extensions View and expand “Custom Extensions” if necessary. When klicking on “Add Extension”, an empty extension field is added. Delete the text to remove the extension.
The editor offers tag completion and validates if the entered text is valid XML. It does not validate the text against a schema. If the entered text is not valid, the OK button is disabled. You can click on “Validate Extension” to display a hint about what is invalid and where the error can be found (line and column numbers).
UaModeler provides an editor to enter documentation for nodes. This documentation is saved in the model files (*.ua and *.xml) and can be included in the generated source files and used by tools that generate documentation from source files (like doxygen. This feature is disabled by default. It can be enabled in the Edit Settings dialog.
To enter documentation, select a node in the Information Model Window and switch to the Extensions View. Expand “Node Documentation” if necessary and enter your documentation to the input field. Confirm with OK. The documentation is also visible in the Attributes Window.
By default, “Table and List Support” is checked in the Edit Settings dialog. The editor supports markdown tables and lists (see example below). If you need to enter such text that should not be treated as markdown code, disable this setting in the Edit Settings dialog.
If you want to add documentation to the model but don’t include it in the generated code, check the box “Disable Code Generation” in the Edit Settings dialog. This setting does not disable generic documentation.