Skip to main content

Nodes

ua.Nodes It is a Lazy Load node accessor that allows you to access remote nodes just as you would local objects; at the same time, the DarraOpcUa previous set of methods Browse directly uses strings NodeId.

Subpage Redirect

Three Ways to Access Nodes​

// Method 1: Direct string NodeId access (the simplest; one Read operation)
using var dv = ua.Read("ns=2;s=Temperature");

// Method 2: Lazy Load Indexer (like local objects, exploratory)
using var dv2 = ua.Nodes["ns=2;s=Temperature"].Value;
using var t = ua.Nodes.Server["ServerStatus"]["CurrentTime"].Value;

// Method 3: Path Resolution
var node = ua.Resolve("/Objects/Server/ServerStatus/CurrentTime");
using var dv3 = node.Value;

All three methods use the same Read / service Browse, butDifferent Expenses: Method 1 involves a single read; Method 2 involves one read per index level Browse, plus one read at the end; Method 3 Resolve involvesSegment by segment Browse (The number of reads equals the number of segments Browse), plus one additional Read at the end. When there are many segments, Method 3 is slower than Method 2.

Selection Guide​

ScenarioRecommendations
Known to be accurate NodeId (Production Code)Method 1: String
Standard ns=0 NodeMethod 2 + WellKnownNodes
Browse Tree / One-Time ScriptMethod 2: Indexer
A set of paths must be parsed all at onceTranslateBrowsePaths (Single RPC, compared to round-trip by Resolve province)
Long-term operation with high-frequency accessRegisterNodes Accelerate

Next Step​