Glossary · Address space

HasTypeDefinition

In OPC UA, HasTypeDefinition is the non-hierarchical ReferenceType linking an instance to its type: every Object points at an ObjectType and every Variable at a VariableType. It is identifier i=40 in namespace 0. Following it is how a client learns what a node actually is rather than what it is called.

One per instance, mandatory

Each Object and Variable node has exactly one HasTypeDefinition reference. Absent one, a client cannot know whether an Object is a machine, a folder or a state machine, so servers that omit it produce address spaces no generic client can interpret. Because it is non-hierarchical, the reference does not appear in a browse tree drawn from HierarchicalReferences - clients must ask for it explicitly.

Type-driven discovery

Browsing HasTypeDefinition inverse from a type node returns every instance of that type on the server. This is the pattern that makes companion specifications usable: browse inverse from MachineToolType and you have every machine tool, regardless of how the vendor organised its folders or named its nodes. The umati dashboard client does exactly this, reading instances by their ObjectType definition and skipping instances that lack mandatory nodes.

Subtypes and matching

An instance of a subtype references the subtype, not the base type. A client looking for MachineryItemType instances must therefore also accept anything whose type has a HasSubtype path up to it, which means walking the type hierarchy rather than comparing one NodeId. Companion-spec clients typically cache the type hierarchy once per session and then match by ancestry.

Example

Finding every machine tool on a server by walking HasTypeDefinition backwards

1. Resolve the type
   TranslateBrowsePathsToNodeIds from i=86 (TypesFolder):
     /ObjectTypes/BaseObjectType/.../4:MachineToolType   -> ns=4;i=1012

2. Browse inverse
   Browse( nodeId       = ns=4;i=1012,
           direction    = Inverse,
           referenceType = i=40 (HasTypeDefinition),
           includeSubtypes = false,
           nodeClassMask = 1 (Object) )

   -> ns=6;s=Line3.MC01
   -> ns=6;s=Line3.MC02
   -> ns=6;s=Line4.MC07

3. For each instance, TranslateBrowsePaths for the mandatory nodes
   you need, e.g. /4:Production/4:ProductionPlan
The mistake people make: Comparing the HasTypeDefinition target to a single expected NodeId. Instances reference the most derived type, so a vendor subtype of MachineToolType will not match, and your client silently reports zero machines on a perfectly conformant server. Match by walking HasSubtype up the type hierarchy instead, and cache the result per session.

Defined in: Part 3 - Address Space Model, standard ReferenceTypes and the type definition of instances.

Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.

Free download
OPC UA Server Acceptance Test Pack
A 40-check acceptance test you run against a vendor's server before commissioning sign-off. Weighted scoring, three hard gates, and a one-page verdict for the supplier meeting.
Get the free test pack →
Free, no course, no login