Skip to main content

References

OPC UA nodes are not isolated; they are linked to one another by References. A reference has a type (ReferenceType), and when the client Browses it receives "target node + reference type + whether the reference is inverse".

Further Reading
  • Node — Category 8 NodeClass
  • Services — Browse / Detailed Explanation of Services Such as Read and Write

Citation Direction​

Every reference is directed:

Source ─[ReferenceType]→ Target

For example, Folder1 ─HasComponent→ Tag1 indicates that Folder1 has Tag1.

Every reference has an inverse reference (Inverse); for example, the inverse HasComponent of is ComponentOf. Typically, SDK Browse when is specified, bidirectional references are automatically listed.

Reference Type Inheritance Tree​

OPC Foundation Standard reference types are organized according to inheritance relationships:

References (i=31)
├── HierarchicalReferences (i=33) ← hierarchical (parent-child)
│ ├── HasChild
│ │ ├── Aggregates
│ │ │ ├── HasComponent ← has component (Object/Variable child node)
│ │ │ ├── HasProperty ← has property (Variable child node)
│ │ │ └── HasOrderedComponent
│ │ └── HasSubtype ← type inheritance
│ ├── HasEventSource ← event source
│ └── Organizes ← folder-style organization
└── NonHierarchicalReferences (i=32)
├── HasTypeDefinition ← instance → type
├── HasModellingRule
├── HasEncoding ← Variable → binary encoding NodeId
├── HasDescription
└── ... (user-definable)

A Few Key Quotes​

HasComponent​

The most common, indicating that "the parent node has this child node" (the child node can be an Object or a Variable):

Boiler1 (Object)
├──HasComponent──> Temperature (Variable)
├──HasComponent──> Pressure (Variable)
└──HasComponent──> Start (Method)

Browse By default, an Object lists all targets of HasComponent/HasProperty; these are commonly referred to as "child nodes."

HasProperty​

A Property is a specialization of a Variable that represents metadata (static/semantic properties), such as EngineeringUnits, EURange, InputArguments. The distinction HasComponent between and is purely semantic.

HasTypeDefinition​

Instance → Type: By following this reference, the client can obtain the node's type and, consequently, determine which child nodes and attributes the instance is expected to have.

Organizes​

Folder-based organization, such as Objects using Organizes to organize Server, Boiler1, Boiler2.

Browse Filtering Reference Types​

Sometimes we just want to see the target of a particular relationship:

// Default Browse: All hierarchical references (forward)
var all = ua.Browse("ns=2;s=Boiler1");

// View only HasProperty references
var props = ua.Browse("ns=2;s=Boiler1", referenceTypeId: "i=46" /* HasProperty */);

Currently, the default SDK behavior is to Browse traverse HierarchicalReferences forward, which is generally sufficient. If you need fine-grained control over ReferenceTypeId, use the underlying BrowseDescription.

Custom ReferenceType​

The server can define its own properties ReferenceType, such as "ConnectedTo," which indicates a physical connection between two devices. The client can simply NodeId follow these properties to find topology information. This is the power of an OPC UA"information model-driven" approach.