Server Development Tutorial

Step 3 - Providing Data to the Nodes in the Address Space

In this section you will see how to update the values of nodes within your address space.

This step is a continuation of Step 2 - Address Space.

  1. All nodes are maintained within the address space by the UA .NET API automatically. We will assume that since our "MyNode" (created in Step 2) is the 2nd node within the variables collection.

  2. Basically, anywhere within your code you can update the value of your node. Add the following line of code below your node definition (see Step 2):
    variables[1].Value = (int32)99;

Note: we cast the value of 99 to the type In32 because that was the data-type we previously configured.

As you can see, updating the value of a node within the address space is very simple. You could implement a timer function and update nodes automatically for example.

Next, we will look at how to respond to client write requests.