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

At first, the generated file BAIdentifiers.cs has to be added to the project.

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

internal class Lesson1NodeManager : BaseNodeManager
{
// New Code Begin
public ushort InstanceNamespaceIndex { get; set; }
public ushort TypeNamespaceIndex { get; set; }
// New Code End
...

Then, we assign instance and type namespaces to NodeManager and store namespace indices in properties.

#region Overridden Methods
public override void Startup()
{
try
{
Console.WriteLine("Starting Lesson2NodeManager.");
// New Code Begin
// 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);
// New Code End
Console.WriteLine("Loading the Controller Model.");
ImportUaNodeset(Assembly.GetEntryAssembly(), "buildingautomation.xml");
}
...
}

Last step: Creating Instances