UA Bundle SDK .NET
2.2.5.284
|
We are using the basic OPC UA server from Lesson 1 as a starting point. The prepared sample code can be found in the Lesson 2 project of the UA Server Getting Started solution.
At first, we have to add the file containing the model (buildingautomation.xml) to the Visual Studio project (Add → Existing Item). Choose “Properties” from the context menu and set “Build Action” to “Embedded Resource” as shown in the following screenshot.
Figure 2.11 Add buildingautomation.xml as Embedded Resource
Then, we have to load the model in Lesson2NodeManager.cs
Now we are ready to compile and start-up the server.
When connecting to the server with an OPC UA client, e.g. UaExpert, we will notice that the type nodes are already visible in the server’s address space (see Figure 2.12).
Figure 2.12 Type nodes in the server’s address space
Next step: Preparing Instance Creation