The AddAliasesToCategory Method allows a Client to add an AliasName to the AliasNameCategory. The signature of this Method is specified below, the arguments are defined in Table 9.

Signature

AddAliasesToCategory(

[in] String[] AliasNames,

[in] ExpandedNodeId[]TargetNodes,

[in] String[] TargetServers,

[in] NodeId TargetReferenceType,

[out] StatusCode[]ErrorCodes

);

Table 9 – AddAliasesToCategory Method Arguments

Argument

Description

AliasNames

An array of the string part of the AliasName. It is Server specific as to what namespace the AliasName is added to.

TargetNodes

An array of NodeIds that represents the target Nodes of the AliasNames to be added. Each element in this array corresponds to an element at the same index in AliasNames. It shall be a valid NodeId and exist on the corresponding TargetServer (i.e. it might not exist on the Server that contains the AliasName node). The ServerIndex in the ExpandedNodeId shall be ignored and the TargetServers Uri shall be used.

TargetServers

An array of the ServerUri of the target Server. Each element in this array corresponds to an element at the same index in AliasNames. if the array element is null or empty then the target Server is the Server hosting the AliasName Node. If the parameter is null or empty then the target Server for all of the AliasNames is the Server hosting the AliasName Node.

TargetReferenceType

This is the ReferenceType that is to be used for the reference from the AliasName to the target node. If null, it defaults to AliasFor.

ErrorCodes

Reports any error associated with the addition of each AliasName. It is an array of StatusCodes. The size of the array shall be the same as the size of the AliasNames parameter.

The generated AliasName Nodes are assigned a Server specific NodeId.

If the same AliasName is to reference multiple TargetNodes then the AliasName shall be listed in the AliasNames array multiple times, one for each TargetNode.

It is not required for an AliasName Server to check the existence of external Nodes (i.e. Nodes that are not on the Server hosting the AliasName). If a Server does check for external Nodes, it shall not fail the addition if the Server or Node on the external Server is not available, it shall return Uncertain_ReferenceOutOfServer. If the Server does not check for the external Node’s existence, it shall return Uncertain_ReferenceOutOfServer.

If an entry in the parallel arrays duplicates an existing AliasName entry (exact same AliasName, TargetNode and TargetServer) or it appears more than once in the array it shall be ignored and no error shall be generated.

The list of StatusCodes that could be returned in ErrorCodes is defined in Table 10.

Table 10 – AddAliasesToCategory return ErrorCodes

Result Code

Description

Bad_NodeIdInvalid

The syntax of the NodeId is not valid.

Bad_NodeIdUnknown

The TargetNode does not exist in the AliasName Server and the TargetServer is the local server (Server hosting the AliasName).

Bad_NotSupported

The AliasName Server does not support adding AliasName that have a remote Server TargetNode.

Note: Support for remote Server TargetNodes is optional, but may be required for some Facets

Uncertain_ReferenceOutOfServer

For an AliasName that referenced a node in another Server, the target node could not be found or no check was performed.

Method result codes are defined in Table 11.

Table 11 – AddAliasesToCategory Method Error Codes

Result Code

Description

Bad_InvalidArgument

An argument is of the wrong type or the size of the arrays for all arguments except TargetServers is not the same or if all arrays are empty.

Bad_UserAccessDenied

The current user does not have the required rights to add an AliasName.

The Method is formally defined in Table 12.

Table 12 – AddAliasesToCategory Method AddressSpace definition

Attribute

Value

BrowseName

AddAliasesToCategory

References

Node Class

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

HasProperty

Variable

OutputArguments

Argument[]

PropertyType

Mandatory

ConformanceUnits

AliasName Configuration Support