The following complex DataTypes have special mappings that are non-intuitive.

QualifiedName – The integer NamespaceIndex used in OPC UA is replaced by a NamespaceURI (xs:anyURI) in AutomationML. In AutomationML, the full URI is always used, never an index.

LocalizedText – An xs:string AttributeType with contained attributes that derive from AutomationMLBaseAttributeTypeLib/LocalizedAttribute and follows the standard AutomationML rules.

NodeId NodeIds in running OPC UA Servers are represented as an ID and a NamespaceIndex. In order to make reference to Nodes in the offline AutomationML file, a more flexible way to reference a Node is needed, both directly and indirectly, possibly long before the real Node is present in a running Server. The NodeId AML AttributeType is defined with four top-level attributes, as shown in Figure A.6

image030.png

Figure A.6 – NodeId AttributeType definition

ServerInstanceUri – an optional attribute used to indicate the ServerInstanceUri of the Server containing the NodeId. If empty or missing, the context should be assumed to be the “local” Server. The type is xs:anyURI.

Alias – An indirect reference to a NodeId to be resolved by an alias Server at runtime. The Alias attribute type is defined in A.2.3.

RootNodeId – An ExplicitNodeId from which to traverse the BrowsePath. The ExplicitNodeId attribute type is defined in A.2.3.

BrowsePath – An optional RelativePath to follow from either the RootNodeId or the NodeId resolved from the Alias. See the definition of the RelativePath structure in OPC 10000-4.

Only the Alias attribute or the RootNodeId attribute should be present. If both are present, the Alias attribute shall be ignored.

ExpandedNodeId ExpandedNodeId has the same definition as NodeId since NodeId can already express an ExpandedNodeId as well.

RelativePathElement – This attribute type is created using the standard mapping rules, except the ReferenceTypeId attribute is of type ExpicitNodeId defined in A.2.3, rather than NodeId. Table A.3 indicates the default value to use if the indicated attribute is missing.

Table A.3 – Default Values for RelativePathElement

attribute

Default value used if attribute is missing

ReferenceTypeId

nsu=http://opcfoundation.org/UA/;i=22 (i.e. HierarchicalReferences)

IsInverse

FALSE

IncludeSubtypes

TRUE

Guid – An xs:string AttributeType where the string shall be formatted in the standard notation for UUIDs per ISO/IEC 9834-8.

Byte – Where the UA DataType Byte is used in builtInType fields, the AML AttributeType is changed to derive from ATL_OpcAmlMetaModel/BuiltInType with constraints to match the enumeration as shown in Figure A.7.

image031.png

Figure A.7 – BuiltInType enumeration

IntegerId – Where the UA DataType IntegerId is used in fields named “AttributeId”, the AML AttributeType is changed to derive from ATL_OpcAmlMetaModel/AttributeId with constraints to match the enumeration as shown in Figure A.8.

image032.png

Figure A.8 – AttributeId enumeration