Nodes
OPC UA divides every node in the Address Space into one of 8 NodeClasses, each with its own required attributes.
- Information Model — Address Space Overview
- Quote — Relationships Between Nodes
- Service Set — How to Operate a Node
| NodeClass | Value | Uses |
|---|---|---|
| Object | 1 | Container / Device / Module / Context Object |
| Variable | 2 | Data Variables (with a Value Attribute) |
| Method | 4 | Server-side methods (optional Call) |
| ObjectType | 8 | Type Definition of an Object |
| VariableType | 16 | Type Definitions for Variables |
| ReferenceType | 32 | Definition of Reference Relationship Types |
| DataType | 64 | Data Type Definitions |
| View | 128 | Node Subset View |
Browse You can use the NodeClass filter method to precisely select a specific type of node.
Object — Container Node
The most common node type, which has no value and is used to organize variables and methods:
Calculator (Object)
├── Add (Method)
├── Subtract (Method)
└── LastResult (Variable)
Attribute: EventNotifier — Whether it can generate an event.
Variable — Data Variable
Nodes with a "Value" are the primary targets for Read/Write/Subscribe operations:
Attribute:
- Value (13) — Current value
- DataType (14) — Data Types NodeId
- ValueRank (15) — Scalar / One-dimensional array / Multidimensional array
- ArrayDimensions (16) — Dimensions of a multidimensional array
- AccessLevel (17) — Current / Historical Read/Write Permission Bitmask
- 1: CurrentRead, 2: CurrentWrite, 4: HistoryRead, 8: HistoryWrite
- MinimumSamplingInterval (19) — How often can the server update this value?
- Historizing (20) — Is this a record of history?
Method — Callable method
NodeClass: Method
InputArguments → Property (Variable, ns=0;s=InputArguments)
OutputArguments → Property (Variable, ns=0;s=OutputArguments)
Attribute: Executable (21) / UserExecutable (22). The "Property" child of this Browse method node can retrieve the input and output signatures.
ObjectType / VariableType — Type Definitions
OPC UA is object-oriented: the server can define a "MotorType" and then instantiate several Motor objects, each automatically carrying the same Variable / Method structure. When Browsing, the client follows the HasTypeDefinition reference to find the instance's type.
ReferenceType — Definition of Reference Types
A reference relationship is itself a "node." The standard includes ReferenceType:
- HasComponent — The parent node has child components
- HasProperty — The parent node has the property
- Organizes — Folder-Based Organization
- HasTypeDefinition — Instance → Type
- HasSubtype — Type Inheritance
- ...
DataType — Data Types
The server can define custom Structs (DataType similar to C structs); the client retrieves the field definitions via the Browse+Read DataType node and then parses them correctly ExtensionObject.
View — View
Package a subset of the address space into a "view" (similar to a database VIEW). This is primarily used in large-scale server environments (10 ten-thousand+ nodes) to provide clients with "domain subsets."
NodeClass filter (Practical Application)
// Read-Only Method
var methods = ua.Browse("ns=2;s=Calculator", filter: NodeClass.Method);
// Read-only variables
var vars = ua.Browse("ns=2;s=Folder", filter: NodeClass.Variable);
// View All (Default)
var all = ua.Browse("ns=2;s=Folder");
Related Links
- Quote — Relationships Between Nodes
- Services — How to Operate a Node
- C# SDK Browse API