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
{
public ushort InstanceNamespaceIndex { get; set; }
public ushort TypeNamespaceIndex { get; set; }
...
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.");
InstanceNamespaceIndex = AddNamespaceUri("http://yourorganisation.com/lesson02/");
TypeNamespaceIndex = AddNamespaceUri(yourorganisation.BA.Namespaces.BA);
Console.WriteLine("Loading the Controller Model.");
ImportUaNodeset(Assembly.GetEntryAssembly(), "buildingautomation.xml");
}
...
}
Last step: Creating Instances