Aliases
Aliases are virtual nodes that serve as shortcuts for redirecting read, write, and subscribe requests to other nodes.
Aliases were introduced and became supported starting from version 1.6.0
OPC UA, a widely adopted and promising protocol, has gained popularity across various industries such as SCADA builders, MES, and others. However, it has been observed that even popular vendors and clients supporting OPC UA offer limited support for certain aspects of the OPC UA specification. For example, complex data types, indexes, and ranges are either poorly supported or not supported at all by most solutions.
In such cases, aliases can provide valuable assistance.
An alias refers to a virtual node that redirects requests to another node while applying additional parameterization, such as indexes, ranges, and data type transformations, among others.
Aliases are configured with “alias.json” file which should be located in the corresponding instance directory.
To configure a simple alias “temperature” that refers to two consecutive Holding Registers starting from address 10:
It is possible to define Node Id for the alias node. Please, use namepsace index 4 which corresponds to https://dpaxt.io/UA/alias/
. Any other namespace indexes are replaced by 4 automatically. If Node Id is not defined, it will be generated for the node. Description and data type may also be defined optionally. Example:
Alias node data type may be specified as data type Node Id, like “i=10” for Float, or using one of the predefined type names: boolean
, byte
, sbyte
, uint16
, uint32
, uint64
, int16
, int32
, int64
, float
, double
, datetime
, string
. No other limitations are applied.
Target node may be defined as a path or directly as target node id. For the example above:
In addition, data value converters can be applied.
byteOrder value converter changes the byte order. It can be applied to primitive value types like boolean
, byte
, sbyte
, uint16
, uint32
, uint64
, int16
, int32
, int64
, float
, double
and datetime
. Or it can be applied to array of primitive values, like “array of uint16”.
cast value converter changes value type. It can be applied to primitive value types or array of primitive values. The source and the destination value sizes must match exactly.
Here is a complete example for the temperature of type Float that is read from Holding Registers 10 and 11: