UA Bundle SDK .NET  2.5.0.378
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Modules Pages
Preparing Instance Creation

At first, the generated file BAIdentifiers.cs has to be added to the project. If you didn’t use UaModeler to create the model and generate code, you have to write such a file yourself (see example code).

The next step is to create properties for namespace indexes (type and instance namespace) as shown below.

internal class Lesson2NodeManager : BaseNodeManager
{
public ushort InstanceNamespaceIndex { get; set; }
public ushort TypeNamespaceIndex { get; set; }

In Startup(), we assign instance and type namespaces to the NodeManager and store namespace indices in properties.

public override void Startup()
{
try
{
base.Startup();
Console.WriteLine("Starting Lesson2NodeManager.");
// Assign namespaces for type and instance nodes to this NodeManager
// Get namespace index for the namespaces
InstanceNamespaceIndex = AddNamespaceUri("http://yourorganisation.com/lesson02/");
TypeNamespaceIndex = AddNamespaceUri(yourorganisation.BA.Namespaces.BA);

Last step: Creating Instances