Sfoglia il codice sorgente

Starting point from UA tutorial

Andreas Fernbach 6 anni fa
commit
82e925b076
64 ha cambiato i file con 342383 aggiunte e 0 eliminazioni
  1. BIN
      .vs/UA.NetXMLServerMappe/v15/.suo
  2. 0 0
      .vs/UA.NetXMLServerMappe/v15/Server/sqlite3/db.lock
  3. BIN
      .vs/UA.NetXMLServerMappe/v15/Server/sqlite3/storage.ide
  4. BIN
      .vs/UA.NetXMLServerMappe/v15/Server/sqlite3/storage.ide-shm
  5. BIN
      .vs/UA.NetXMLServerMappe/v15/Server/sqlite3/storage.ide-wal
  6. 50 0
      AcdpServerManager.cs
  7. 129 0
      App.config
  8. 5 0
      License/License.lic
  9. 509 0
      Model/BAIdentifiers.cs
  10. 2097 0
      Model/Opc.Ua.Di.NodeSet2.xml
  11. 29 0
      Model/buildingautomation.tt2pro
  12. BIN
      Model/buildingautomation.ua
  13. 212 0
      Model/buildingautomation.xml
  14. 13 0
      Model/di_test.csv
  15. 37 0
      Model/di_test.tt2pro
  16. BIN
      Model/di_test.ua
  17. 138 0
      Model/di_test.xml
  18. 64 0
      Model/test.xml
  19. 79 0
      Program.cs
  20. 63 0
      Properties/AssemblyInfo.cs
  21. 116 0
      System/SystemConfiguration.xml
  22. 560 0
      System/UnderlyingSystem.cs
  23. 129 0
      UA.NetXMLServer.csproj
  24. 16 0
      UA.NetXMLServer.csproj.user
  25. 25 0
      UA.NetXMLServerMappe.sln
  26. 340 0
      XMLNodeManager.cs
  27. BIN
      app.ico
  28. BIN
      obj/Debug/DesignTimeResolveAssemblyReferences.cache
  29. BIN
      obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  30. 0 0
      obj/Debug/Lesson03_VS2015.csproj.CopyComplete
  31. 1 0
      obj/Debug/Lesson03_VS2015.csproj.CoreCompileInputs.cache
  32. 21 0
      obj/Debug/Lesson03_VS2015.csproj.FileListAbsolute.txt
  33. BIN
      obj/Debug/Lesson03_VS2015.csprojAssemblyReference.cache
  34. 2097 0
      obj/Debug/Opc.Ua.Di.NodeSet2.xml
  35. BIN
      obj/Debug/ServerLesson03.exe
  36. 129 0
      obj/Debug/ServerLesson03.exe.config
  37. BIN
      obj/Debug/ServerLesson03.pdb
  38. 0 0
      obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
  39. 0 0
      obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
  40. 0 0
      obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
  41. 0 0
      obj/Debug/UA.NetXMLServer.csproj.CopyComplete
  42. 1 0
      obj/Debug/UA.NetXMLServer.csproj.CoreCompileInputs.cache
  43. 10 0
      obj/Debug/UA.NetXMLServer.csproj.FileListAbsolute.txt
  44. BIN
      obj/Debug/UA.NetXMLServer.csprojAssemblyReference.cache
  45. BIN
      obj/Debug/UnifiedAutomation.UaBase.dll
  46. 139197 0
      obj/Debug/UnifiedAutomation.UaBase.xml
  47. BIN
      obj/Debug/UnifiedAutomation.UaServer.dll
  48. 28415 0
      obj/Debug/UnifiedAutomation.UaServer.xml
  49. 138 0
      obj/Debug/di_test.xml
  50. BIN
      obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
  51. 0 0
      obj/Release/Lesson03_VS2015.csproj.CopyComplete
  52. 1 0
      obj/Release/Lesson03_VS2015.csproj.CoreCompileInputs.cache
  53. 21 0
      obj/Release/Lesson03_VS2015.csproj.FileListAbsolute.txt
  54. BIN
      obj/Release/Lesson03_VS2015.csprojAssemblyReference.cache
  55. BIN
      obj/Release/ServerLesson03.exe
  56. 129 0
      obj/Release/ServerLesson03.exe.config
  57. BIN
      obj/Release/ServerLesson03.pdb
  58. 0 0
      obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
  59. 0 0
      obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
  60. 0 0
      obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
  61. BIN
      obj/Release/UnifiedAutomation.UaBase.dll
  62. 139197 0
      obj/Release/UnifiedAutomation.UaBase.xml
  63. BIN
      obj/Release/UnifiedAutomation.UaServer.dll
  64. 28415 0
      obj/Release/UnifiedAutomation.UaServer.xml

BIN
.vs/UA.NetXMLServerMappe/v15/.suo


+ 0 - 0
.vs/UA.NetXMLServerMappe/v15/Server/sqlite3/db.lock


BIN
.vs/UA.NetXMLServerMappe/v15/Server/sqlite3/storage.ide


BIN
.vs/UA.NetXMLServerMappe/v15/Server/sqlite3/storage.ide-shm


BIN
.vs/UA.NetXMLServerMappe/v15/Server/sqlite3/storage.ide-wal


+ 50 - 0
AcdpServerManager.cs

@@ -0,0 +1,50 @@
+/******************************************************************************
+** Copyright (c) 2006-2018 Unified Automation GmbH All rights reserved.
+**
+** Software License Agreement ("SLA") Version 2.7
+**
+** Unless explicitly acquired and licensed from Licensor under another
+** license, the contents of this file are subject to the Software License
+** Agreement ("SLA") Version 2.7, or subsequent versions
+** as allowed by the SLA, and You may not copy or use this file in either
+** source code or executable form, except in compliance with the terms and
+** conditions of the SLA.
+**
+** All software distributed under the SLA is provided strictly on an
+** "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+** AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+** LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+** PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the SLA for specific
+** language governing rights and limitations under the SLA.
+**
+** Project: .NET based OPC UA Client Server SDK
+**
+** Description: OPC Unified Architecture Software Development Kit.
+**
+** The complete license agreement can be found here:
+** http://unifiedautomation.com/License/SLA/2.7/
+******************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using UnifiedAutomation.UaBase;
+using UnifiedAutomation.UaServer;
+
+namespace acdp
+{
+    internal class AcdpServerManager : ServerManager
+    {
+        protected override void OnRootNodeManagerStarted(RootNodeManager nodeManager)
+        {
+            Console.WriteLine("Creating Node Managers.");
+
+            XMLNodeManager lession3a = new XMLNodeManager(this);
+            lession3a.Startup();
+
+            //Lesson3bNodeManager lession3b = new Lesson3bNodeManager(this);
+            //lession3b.Startup();
+        }
+    }
+}

+ 129 - 0
App.config

@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<configuration>
+  <configSections>
+    <section name="UaApplicationConfiguration" type="UnifiedAutomation.UaBase.ApplicationConfigurationSection,UnifiedAutomation.UaBase"/>
+  </configSections>
+  <UaApplicationConfiguration>
+
+    <SecuredApplication xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://opcfoundation.org/UA/2011/03/SecuredApplication.xsd" xmlns:ua="http://opcfoundation.org/UA/2008/02/Types.xsd">
+
+      <!-- Identify the Application -->
+      <ApplicationName>UaServerNET</ApplicationName>
+      <ApplicationUri>urn:localhost:UnifiedAutomation:UaGettingStartedServerNet</ApplicationUri>
+      <ApplicationType>Server_0</ApplicationType>
+
+      <!-- Specify location of Certificates and Trust Lists -->
+      <ApplicationCertificate>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\own</StorePath>
+        <SubjectName>CN=GettingStartedServer/O=UnifiedAutomation/DC=localhost</SubjectName>
+        <ValidationOptions>0</ValidationOptions>
+      </ApplicationCertificate>
+      <TrustedCertificateStore>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\trusted</StorePath>
+        <ValidationOptions>0</ValidationOptions>
+      </TrustedCertificateStore>
+      <IssuerCertificateStore>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\issuers</StorePath>
+        <ValidationOptions>0</ValidationOptions>
+      </IssuerCertificateStore>
+      <RejectedCertificatesStore>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\rejected</StorePath>
+        <ValidationOptions>0</ValidationOptions>
+      </RejectedCertificatesStore>
+
+      <!-- Specify Endpoints the Server will use -->
+      <BaseAddresses>
+        <BaseAddress>opc.tcp://localhost:48030</BaseAddress>
+
+        <!--
+        Uncomment this line to enable the HTTPS based profiles.
+
+        This profile works but is not officially supported in this version of the SDK.
+        This is the HTTP based protocol that will be supported by embedded devices.
+
+        Enabling this profile requires that you have a HTTPS certificate issued by a certificate authority
+        in your root certificate store. You can create your own authority and add it to the root store or
+        you can use authorities like VeriSign or Thawte.
+        -->
+        <!--
+        <BaseAddress>https://localhost:48031/</BaseAddress>
+         -->
+
+        <!--
+        Uncomment this line to enable the WS-Secure Conversation based profiles.
+
+        This profile works but is not officially supported since it is not practical to support on embedded devices.
+        You should not enable this protocol unless you have an application that must support XML Web Services.
+        -->
+        <!--
+        <BaseAddress>http://localhost:48032/wssecurity/</BaseAddress>
+        -->
+      </BaseAddresses>
+
+      <!-- Specify the SecurityProfiles the Server supports -->
+      <SecurityProfiles>
+        <SecurityProfile>
+          <ProfileUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256</ProfileUri>
+          <Enabled>true</Enabled>
+        </SecurityProfile>
+        <SecurityProfile>
+          <ProfileUri>http://opcfoundation.org/UA/SecurityPolicy#None</ProfileUri>
+          <Enabled>true</Enabled>
+        </SecurityProfile>
+      </SecurityProfiles>
+
+      <!-- Specify Configuration for Different Components (Can include 'YourCompany' Configuration) -->
+      <Extensions>
+
+        <!-- Specify the Trace settings for the Application -->
+        <Extension>
+          <TraceSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd" MasterTraceEnabled="false" DefaultTraceLevel="Info">
+            <TraceFile>%CommonApplicationData%\unifiedautomation\logs\UaSdkNetBundleEval\UaGettingStartedServerNet.log.txt</TraceFile>
+            <MaxEntriesPerLog>100000</MaxEntriesPerLog>
+            <MaxLogFileBackups>3</MaxLogFileBackups>
+            <ModuleSettings>
+              <ModuleTraceSettings ModuleName="UnifiedAutomation.Stack"/>
+              <ModuleTraceSettings ModuleName="UnifiedAutomation.Server"/>
+            </ModuleSettings>
+          </TraceSettings>
+        </Extension>
+
+        <!-- Specify Settings when EXE is run with the /install argument -->
+        <Extension>
+          <InstallationSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <GenerateCertificateIfNone>true</GenerateCertificateIfNone>
+            <DeleteCertificateOnUninstall>true</DeleteCertificateOnUninstall>
+          </InstallationSettings>
+        </Extension>
+
+        <!-- Specify Settings for the ServerManager -->
+        <Extension>
+          <ServerSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <ProductName>UnifiedAutomation GettingStartedServer</ProductName>
+            <DiscoveryRegistration>
+              <Enabled>false</Enabled>
+            </DiscoveryRegistration>
+          </ServerSettings>
+        </Extension>
+
+        <Extension>
+          <SessionSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <MaxSessionCount>100</MaxSessionCount>
+          </SessionSettings>
+        </Extension>
+
+        <!-- Specify Settings for the SubscriptionManager -->
+        <Extension>
+          <SubscriptionSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <MaxSubscriptionCount>500</MaxSubscriptionCount>
+          </SubscriptionSettings>
+        </Extension>
+
+      </Extensions>
+    </SecuredApplication>
+  </UaApplicationConfiguration>
+</configuration>

File diff suppressed because it is too large
+ 5 - 0
License/License.lic


+ 509 - 0
Model/BAIdentifiers.cs

@@ -0,0 +1,509 @@
+/******************************************************************************
+** <auto-generated>
+**     This code was generated by a tool.
+**
+**     Changes to this file may cause incorrect behavior and will be lost if
+**     the code is regenerated.
+** </auto-generated>
+**
+** Copyright (c) 2006-2018 Unified Automation GmbH All rights reserved.
+**
+** Software License Agreement ("SLA") Version 2.7
+**
+** Unless explicitly acquired and licensed from Licensor under another
+** license, the contents of this file are subject to the Software License
+** Agreement ("SLA") Version 2.7, or subsequent versions
+** as allowed by the SLA, and You may not copy or use this file in either
+** source code or executable form, except in compliance with the terms and
+** conditions of the SLA.
+**
+** All software distributed under the SLA is provided strictly on an
+** "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+** AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+** LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+** PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the SLA for specific
+** language governing rights and limitations under the SLA.
+**
+** Project: .NET based OPC UA Client Server SDK
+**
+** Description: OPC Unified Architecture Software Development Kit.
+**
+** The complete license agreement can be found here:
+** http://unifiedautomation.com/License/SLA/2.7/
+******************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Reflection;
+using System.Xml;
+using System.Runtime.Serialization;
+using UnifiedAutomation.UaBase;
+
+namespace yourorganisation.BA
+{
+    #region DataType Identifiers
+    /// <summary>
+    /// A class that declares constants for all DataTypes in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class DataTypes
+    {
+    }
+    #endregion
+
+    #region Method Identifiers
+    /// <summary>
+    /// A class that declares constants for all Methods in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class Methods
+    {
+        /// <summary>
+        /// The identifier for the Start Method.
+        /// </summary>
+        public const uint ControllerType_Start = 7001;
+
+        /// <summary>
+        /// The identifier for the Stop Method.
+        /// </summary>
+        public const uint ControllerType_Stop = 7002;
+
+        /// <summary>
+        /// The identifier for the StartWithSetPoint Method.
+        /// </summary>
+        public const uint AirConditionerControllerType_StartWithSetPoint = 7003;
+
+    }
+    #endregion
+
+    #region Object Identifiers
+    /// <summary>
+    /// A class that declares constants for all Objects in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class Objects
+    {
+    }
+    #endregion
+
+    #region ObjectType Identifiers
+    /// <summary>
+    /// A class that declares constants for all ObjectTypes in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class ObjectTypes
+    {
+        /// <summary>
+        /// The identifier for the ControllerType ObjectType.
+        /// </summary>
+        public const uint ControllerType = 1001;
+
+        /// <summary>
+        /// The identifier for the FurnaceControllerType ObjectType.
+        /// </summary>
+        public const uint FurnaceControllerType = 1002;
+
+        /// <summary>
+        /// The identifier for the AirConditionerControllerType ObjectType.
+        /// </summary>
+        public const uint AirConditionerControllerType = 1003;
+
+        /// <summary>
+        /// The identifier for the ControllerEventType ObjectType.
+        /// </summary>
+        public const uint ControllerEventType = 1004;
+
+    }
+    #endregion
+
+    #region ReferenceType Identifiers
+    /// <summary>
+    /// A class that declares constants for all ReferenceTyped in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class ReferenceTypes
+    {
+    }
+    #endregion
+
+    #region Variable Identifiers
+    /// <summary>
+    /// A class that declares constants for all Variables in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class Variables
+    {
+        /// <summary>
+        /// The identifier for the State Variable.
+        /// </summary>
+        public const uint ControllerType_State = 6001;
+
+        /// <summary>
+        /// The identifier for the Temperature Variable.
+        /// </summary>
+        public const uint ControllerType_Temperature = 6002;
+
+        /// <summary>
+        /// The identifier for the TemperatureSetPoint Variable.
+        /// </summary>
+        public const uint ControllerType_TemperatureSetPoint = 6003;
+
+        /// <summary>
+        /// The identifier for the PowerConsumption Variable.
+        /// </summary>
+        public const uint ControllerType_PowerConsumption = 6004;
+
+        /// <summary>
+        /// The identifier for the EURange Variable.
+        /// </summary>
+        public const uint ControllerType_Temperature_EURange = 6005;
+
+        /// <summary>
+        /// The identifier for the EURange Variable.
+        /// </summary>
+        public const uint ControllerType_TemperatureSetPoint_EURange = 6006;
+
+        /// <summary>
+        /// The identifier for the GasFlow Variable.
+        /// </summary>
+        public const uint FurnaceControllerType_GasFlow = 6007;
+
+        /// <summary>
+        /// The identifier for the Humidity Variable.
+        /// </summary>
+        public const uint AirConditionerControllerType_Humidity = 6008;
+
+        /// <summary>
+        /// The identifier for the InputArguments Variable.
+        /// </summary>
+        public const uint AirConditionerControllerType_StartWithSetPoint_InputArguments = 6009;
+
+        /// <summary>
+        /// The identifier for the HumiditySetPoint Variable.
+        /// </summary>
+        public const uint AirConditionerControllerType_HumiditySetPoint = 6010;
+
+        /// <summary>
+        /// The identifier for the Temperature Variable.
+        /// </summary>
+        public const uint ControllerEventType_Temperature = 6011;
+
+        /// <summary>
+        /// The identifier for the State Variable.
+        /// </summary>
+        public const uint ControllerEventType_State = 6012;
+
+    }
+    #endregion
+
+    #region VariableTypes Identifiers
+    /// <summary>
+    /// A class that declares constants for all VariableTypes in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class VariableTypes
+    {
+    }
+    #endregion
+
+    #region DataType Node Identifiers
+    /// <summary>
+    /// A class that declares constants for all DataTypes in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class DataTypeIds
+    {
+    }
+    #endregion
+
+    #region Method Node Identifiers
+    /// <summary>
+    /// A class that declares constants for all Methods in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class MethodIds
+    {
+        /// <summary>
+        /// The identifier for the ControllerType_Start Method.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerType_Start = new ExpandedNodeId(Methods.ControllerType_Start, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the ControllerType_Stop Method.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerType_Stop = new ExpandedNodeId(Methods.ControllerType_Stop, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the AirConditionerControllerType_StartWithSetPoint Method.
+        /// </summary>
+
+        public static readonly ExpandedNodeId AirConditionerControllerType_StartWithSetPoint = new ExpandedNodeId(Methods.AirConditionerControllerType_StartWithSetPoint, Namespaces.BA);
+
+    }
+    #endregion
+
+    #region Object Node Identifiers
+    /// <summary>
+    /// A class that declares constants for all Objects in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class ObjectIds
+    {
+    }
+    #endregion
+
+    #region ObjectType Node Identifiers
+    /// <summary>
+    /// A class that declares constants for all Objects in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class ObjectTypeIds
+    {
+        /// <summary>
+        /// The identifier for the ControllerType ObjectType.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerType = new ExpandedNodeId(ObjectTypes.ControllerType, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the FurnaceControllerType ObjectType.
+        /// </summary>
+
+        public static readonly ExpandedNodeId FurnaceControllerType = new ExpandedNodeId(ObjectTypes.FurnaceControllerType, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the AirConditionerControllerType ObjectType.
+        /// </summary>
+
+        public static readonly ExpandedNodeId AirConditionerControllerType = new ExpandedNodeId(ObjectTypes.AirConditionerControllerType, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the ControllerEventType ObjectType.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerEventType = new ExpandedNodeId(ObjectTypes.ControllerEventType, Namespaces.BA);
+
+    }
+    #endregion
+
+    #region ReferenceType Node Identifiers
+    /// <summary>
+    /// A class that declares constants for all ReferenceTypes in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class ReferenceTypeIds
+    {
+    }
+    #endregion
+
+    #region Variable Node Identifiers
+    /// <summary>
+    /// A class that declares constants for all Variables in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class VariableIds
+    {
+        /// <summary>
+        /// The identifier for the ControllerType_State Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerType_State = new ExpandedNodeId(Variables.ControllerType_State, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the ControllerType_Temperature Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerType_Temperature = new ExpandedNodeId(Variables.ControllerType_Temperature, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the ControllerType_TemperatureSetPoint Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerType_TemperatureSetPoint = new ExpandedNodeId(Variables.ControllerType_TemperatureSetPoint, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the ControllerType_PowerConsumption Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerType_PowerConsumption = new ExpandedNodeId(Variables.ControllerType_PowerConsumption, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the ControllerType_Temperature_EURange Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerType_Temperature_EURange = new ExpandedNodeId(Variables.ControllerType_Temperature_EURange, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the ControllerType_TemperatureSetPoint_EURange Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerType_TemperatureSetPoint_EURange = new ExpandedNodeId(Variables.ControllerType_TemperatureSetPoint_EURange, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the FurnaceControllerType_GasFlow Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId FurnaceControllerType_GasFlow = new ExpandedNodeId(Variables.FurnaceControllerType_GasFlow, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the AirConditionerControllerType_Humidity Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId AirConditionerControllerType_Humidity = new ExpandedNodeId(Variables.AirConditionerControllerType_Humidity, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the AirConditionerControllerType_StartWithSetPoint_InputArguments Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId AirConditionerControllerType_StartWithSetPoint_InputArguments = new ExpandedNodeId(Variables.AirConditionerControllerType_StartWithSetPoint_InputArguments, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the AirConditionerControllerType_HumiditySetPoint Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId AirConditionerControllerType_HumiditySetPoint = new ExpandedNodeId(Variables.AirConditionerControllerType_HumiditySetPoint, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the ControllerEventType_Temperature Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerEventType_Temperature = new ExpandedNodeId(Variables.ControllerEventType_Temperature, Namespaces.BA);
+
+        /// <summary>
+        /// The identifier for the ControllerEventType_State Variable.
+        /// </summary>
+
+        public static readonly ExpandedNodeId ControllerEventType_State = new ExpandedNodeId(Variables.ControllerEventType_State, Namespaces.BA);
+
+    }
+    #endregion
+
+    #region VariableType Node Identifiers
+    /// <summary>
+    /// A class that declares constants for all VariableType in the Model Design.
+    /// </summary>
+    /// <exclude />
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("UaModeler", "1.2.1")]
+    public static partial class VariableTypeIds
+    {
+    }
+    #endregion
+
+    #region BrowseName Declarations
+    /// <summary>
+    /// Declares all of the BrowseNames used in the Model Design.
+    /// </summary>
+    public static partial class BrowseNames
+    {
+        /// <summary>
+        /// The BrowseName for the AirConditionerControllerType component.
+        /// </summary>
+        public const string AirConditionerControllerType = "AirConditionerControllerType";
+
+        /// <summary>
+        /// The BrowseName for the ControllerEventType component.
+        /// </summary>
+        public const string ControllerEventType = "ControllerEventType";
+
+        /// <summary>
+        /// The BrowseName for the ControllerType component.
+        /// </summary>
+        public const string ControllerType = "ControllerType";
+
+        /// <summary>
+        /// The BrowseName for the FurnaceControllerType component.
+        /// </summary>
+        public const string FurnaceControllerType = "FurnaceControllerType";
+
+        /// <summary>
+        /// The BrowseName for the GasFlow component.
+        /// </summary>
+        public const string GasFlow = "GasFlow";
+
+        /// <summary>
+        /// The BrowseName for the Humidity component.
+        /// </summary>
+        public const string Humidity = "Humidity";
+
+        /// <summary>
+        /// The BrowseName for the HumiditySetPoint component.
+        /// </summary>
+        public const string HumiditySetPoint = "HumiditySetPoint";
+
+        /// <summary>
+        /// The BrowseName for the PowerConsumption component.
+        /// </summary>
+        public const string PowerConsumption = "PowerConsumption";
+
+        /// <summary>
+        /// The BrowseName for the Start component.
+        /// </summary>
+        public const string Start = "Start";
+
+        /// <summary>
+        /// The BrowseName for the StartWithSetPoint component.
+        /// </summary>
+        public const string StartWithSetPoint = "StartWithSetPoint";
+
+        /// <summary>
+        /// The BrowseName for the State component.
+        /// </summary>
+        public const string State = "State";
+
+        /// <summary>
+        /// The BrowseName for the Stop component.
+        /// </summary>
+        public const string Stop = "Stop";
+
+        /// <summary>
+        /// The BrowseName for the Temperature component.
+        /// </summary>
+        public const string Temperature = "Temperature";
+
+        /// <summary>
+        /// The BrowseName for the TemperatureSetPoint component.
+        /// </summary>
+        public const string TemperatureSetPoint = "TemperatureSetPoint";
+
+    }
+    #endregion
+
+    #region Namespace Declarations
+    /// <summary>
+    /// Defines constants for all namespaces referenced by the model design.
+    /// </summary>
+    public static partial class Namespaces
+    {
+        /// <summary>
+        /// The URI for the OpcUa namespace (.NET code namespace is 'Opc.Ua').
+        /// </summary>
+        public const string OpcUa = "http://opcfoundation.org/UA/";
+
+        /// <summary>
+        /// The URI for the OpcUaXsd namespace (.NET code namespace is 'Opc.Ua').
+        /// </summary>
+        public const string OpcUaXsd = "http://opcfoundation.org/UA/2008/02/Types.xsd";
+
+        /// <summary>
+        /// The URI for the BA namespace.
+        /// </summary>
+        public const string BA = "http://yourorganisation.org/BuildingAutomation/";
+    }
+    #endregion
+}

File diff suppressed because it is too large
+ 2097 - 0
Model/Opc.Ua.Di.NodeSet2.xml


+ 29 - 0
Model/buildingautomation.tt2pro

@@ -0,0 +1,29 @@
+###########################
+# UaModeler Project File  #
+# Generated at 05.11.2018 #
+###########################
+
+PROJECTNAME = BuildingAutomation
+
+TEMPLATESET = ($TEMPLATES)/net/v2_5/t4/net_identifiers.tt2set
+
+MODELS += ($MODELS)/Opc.Ua.NodeSet2.ua \
+    buildingautomation.ua
+
+VARIABLES+= buildingautomation.ua: Namespace=BA; Organization=yourorganisation; 
+
+COLORS = ($MODELS)/Opc.Ua.NodeSet2.ua: #0000ff\
+    buildingautomation.ua: #008000
+
+OUTPUTPATH = 
+
+GENERATE += buildingautomation.ua
+
+LOCKEDMODELS += ($MODELS)/Opc.Ua.NodeSet2.ua
+
+NODEACCESSINFOROLES += Administrator \
+    SecurityAdmin \
+    ConfigurationAdmin \
+    Operator \
+    Observer
+

BIN
Model/buildingautomation.ua


+ 212 - 0
Model/buildingautomation.xml

@@ -0,0 +1,212 @@
+<UANodeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd" xmlns:s1="http://yourorganisation.org/BuildingAutomation/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <NamespaceUris>
+        <Uri>http://yourorganisation.org/BuildingAutomation/</Uri>
+    </NamespaceUris>
+    <Aliases>
+        <Alias Alias="Int32">i=6</Alias>
+        <Alias Alias="Double">i=11</Alias>
+        <Alias Alias="HasModellingRule">i=37</Alias>
+        <Alias Alias="HasTypeDefinition">i=40</Alias>
+        <Alias Alias="HasSubtype">i=45</Alias>
+        <Alias Alias="HasProperty">i=46</Alias>
+        <Alias Alias="HasComponent">i=47</Alias>
+        <Alias Alias="Argument">i=296</Alias>
+        <Alias Alias="Range">i=884</Alias>
+    </Aliases>
+    <UAObjectType NodeId="ns=1;i=1004" BrowseName="1:ControllerEventType">
+        <DisplayName>ControllerEventType</DisplayName>
+        <References>
+            <Reference ReferenceType="HasSubtype" IsForward="false">i=2041</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6012</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6011</Reference>
+        </References>
+    </UAObjectType>
+    <UAVariable DataType="Int32" ParentNodeId="ns=1;i=1004" NodeId="ns=1;i=6012" BrowseName="1:State" UserAccessLevel="3" AccessLevel="3">
+        <DisplayName>State</DisplayName>
+        <References>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=1004</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="Double" ParentNodeId="ns=1;i=1004" NodeId="ns=1;i=6011" BrowseName="1:Temperature" UserAccessLevel="3" AccessLevel="3">
+        <DisplayName>Temperature</DisplayName>
+        <References>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=1004</Reference>
+        </References>
+    </UAVariable>
+    <UAObjectType NodeId="ns=1;i=1001" BrowseName="1:ControllerType">
+        <DisplayName>ControllerType</DisplayName>
+        <References>
+            <Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6004</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=7001</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6001</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=7002</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6002</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6003</Reference>
+        </References>
+    </UAObjectType>
+    <UAVariable DataType="Double" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6004" BrowseName="1:PowerConsumption" UserAccessLevel="3" AccessLevel="3">
+        <DisplayName>PowerConsumption</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=2365</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1001</Reference>
+        </References>
+    </UAVariable>
+    <UAMethod ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=7001" BrowseName="1:Start">
+        <DisplayName>Start</DisplayName>
+        <References>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1001</Reference>
+        </References>
+    </UAMethod>
+    <UAVariable DataType="Int32" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6001" BrowseName="1:State" UserAccessLevel="3" AccessLevel="3">
+        <DisplayName>State</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1001</Reference>
+        </References>
+    </UAVariable>
+    <UAMethod ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=7002" BrowseName="1:Stop">
+        <DisplayName>Stop</DisplayName>
+        <References>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1001</Reference>
+        </References>
+    </UAMethod>
+    <UAVariable DataType="Double" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6002" BrowseName="1:Temperature" UserAccessLevel="3" AccessLevel="3">
+        <DisplayName>Temperature</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=2368</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6005</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1001</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="Range" ParentNodeId="ns=1;i=6002" NodeId="ns=1;i=6005" BrowseName="EURange">
+        <DisplayName>EURange</DisplayName>
+        <References>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=6002</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="Double" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6003" BrowseName="1:TemperatureSetPoint" UserAccessLevel="3" AccessLevel="3">
+        <DisplayName>TemperatureSetPoint</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=2368</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6006</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1001</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="Range" ParentNodeId="ns=1;i=6003" NodeId="ns=1;i=6006" BrowseName="EURange">
+        <DisplayName>EURange</DisplayName>
+        <References>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=6003</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+        </References>
+    </UAVariable>
+    <UAObjectType NodeId="ns=1;i=1003" BrowseName="1:AirConditionerControllerType">
+        <DisplayName>AirConditionerControllerType</DisplayName>
+        <References>
+            <Reference ReferenceType="HasSubtype" IsForward="false">ns=1;i=1001</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6008</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6010</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=7003</Reference>
+        </References>
+    </UAObjectType>
+    <UAVariable DataType="Double" ParentNodeId="ns=1;i=1003" NodeId="ns=1;i=6008" BrowseName="1:Humidity" UserAccessLevel="3" AccessLevel="3">
+        <DisplayName>Humidity</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1003</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="Double" ParentNodeId="ns=1;i=1003" NodeId="ns=1;i=6010" BrowseName="1:HumiditySetPoint" UserAccessLevel="3" AccessLevel="3">
+        <DisplayName>HumiditySetPoint</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1003</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+        </References>
+    </UAVariable>
+    <UAMethod ParentNodeId="ns=1;i=1003" NodeId="ns=1;i=7003" BrowseName="1:StartWithSetPoint">
+        <DisplayName>StartWithSetPoint</DisplayName>
+        <References>
+            <Reference ReferenceType="HasProperty">ns=1;i=6009</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1003</Reference>
+        </References>
+    </UAMethod>
+    <UAVariable DataType="Argument" ParentNodeId="ns=1;i=7003" ValueRank="1" NodeId="ns=1;i=6009" ArrayDimensions="2" BrowseName="InputArguments">
+        <DisplayName>InputArguments</DisplayName>
+        <References>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=7003</Reference>
+        </References>
+        <Value>
+            <uax:ListOfExtensionObject>
+                <uax:ExtensionObject>
+                    <uax:TypeId>
+                        <uax:Identifier>i=297</uax:Identifier>
+                    </uax:TypeId>
+                    <uax:Body>
+                        <uax:Argument>
+                            <uax:Name>Temperature</uax:Name>
+                            <uax:DataType>
+                                <uax:Identifier>i=11</uax:Identifier>
+                            </uax:DataType>
+                            <uax:ValueRank>-1</uax:ValueRank>
+                            <uax:ArrayDimensions></uax:ArrayDimensions>
+                            <uax:Description>
+                                <uax:Text>Temperature Set Point</uax:Text>
+                            </uax:Description>
+                        </uax:Argument>
+                    </uax:Body>
+                </uax:ExtensionObject>
+                <uax:ExtensionObject>
+                    <uax:TypeId>
+                        <uax:Identifier>i=297</uax:Identifier>
+                    </uax:TypeId>
+                    <uax:Body>
+                        <uax:Argument>
+                            <uax:Name>Humidity</uax:Name>
+                            <uax:DataType>
+                                <uax:Identifier>i=11</uax:Identifier>
+                            </uax:DataType>
+                            <uax:ValueRank>-1</uax:ValueRank>
+                            <uax:ArrayDimensions></uax:ArrayDimensions>
+                            <uax:Description>
+                                <uax:Text>Humidity Set Point</uax:Text>
+                            </uax:Description>
+                        </uax:Argument>
+                    </uax:Body>
+                </uax:ExtensionObject>
+            </uax:ListOfExtensionObject>
+        </Value>
+    </UAVariable>
+    <UAObjectType NodeId="ns=1;i=1002" BrowseName="1:FurnaceControllerType">
+        <DisplayName>FurnaceControllerType</DisplayName>
+        <References>
+            <Reference ReferenceType="HasSubtype" IsForward="false">ns=1;i=1001</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6007</Reference>
+        </References>
+    </UAObjectType>
+    <UAVariable DataType="Double" ParentNodeId="ns=1;i=1002" NodeId="ns=1;i=6007" BrowseName="1:GasFlow" UserAccessLevel="3" AccessLevel="3">
+        <DisplayName>GasFlow</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=2365</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1002</Reference>
+            <Reference ReferenceType="HasModellingRule">i=78</Reference>
+        </References>
+    </UAVariable>
+</UANodeSet>

+ 13 - 0
Model/di_test.csv

@@ -0,0 +1,13 @@
+MyDeviceType,1002,ObjectType
+DeviceSet_MyDevice,5002,Object
+DeviceSet_MyDevice_ParameterSet,5003,Object
+DeviceSet_MyDevice_DeviceManual,6001,Variable
+DeviceSet_MyDevice_DeviceRevision,6002,Variable
+DeviceSet_MyDevice_HardwareRevision,6003,Variable
+DeviceSet_MyDevice_Manufacturer,6004,Variable
+DeviceSet_MyDevice_Model,6005,Variable
+DeviceSet_MyDevice_RevisionCounter,6006,Variable
+DeviceSet_MyDevice_SerialNumber,6007,Variable
+DeviceSet_MyDevice_SoftwareRevision,6008,Variable
+DeviceSet_MyDevice_ParameterSet_DataPoint1,6010,Variable
+DeviceSet_MyDevice_ParameterSet_DataPoint2,6011,Variable

+ 37 - 0
Model/di_test.tt2pro

@@ -0,0 +1,37 @@
+###########################
+# UaModeler Project File  #
+# Generated at 07.11.2018 #
+###########################
+
+PROJECTNAME = DI_test
+
+TEMPLATESET = ($TEMPLATES)/net/v2_5/t4/net_server.tt2set
+
+MODELS += ($MODELS)/Opc.Ua.NodeSet2.ua \
+    ($MODELS)/Opc.Ua.Di.NodeSet2.ua \
+    di_test.ua
+
+VARIABLES+= ($MODELS)/Opc.Ua.Di.NodeSet2.ua: Namespace=acdp; Organization=acdp; \
+    di_test.ua: Namespace=acdp; Organization=acdp; 
+
+COLORS = ($MODELS)/Opc.Ua.NodeSet2.ua: #0000ff\
+    ($MODELS)/Opc.Ua.Di.NodeSet2.ua: #0000ff\
+    di_test.ua: #008000
+
+PROJECTVARIABLES += GenerateDefaultApplication = false \
+    NetFramework = 4.6.1 \
+    ProjectNamespace = DI_test \
+    ProjectOrganization = acdp
+
+OUTPUTPATH = Documents/GIT/UA.NET_Server_XML
+
+GENERATE += di_test.ua
+
+LOCKEDMODELS += ($MODELS)/Opc.Ua.Di.NodeSet2.ua
+
+NODEACCESSINFOROLES += Administrator \
+    SecurityAdmin \
+    ConfigurationAdmin \
+    Operator \
+    Observer
+

BIN
Model/di_test.ua


+ 138 - 0
Model/di_test.xml

@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UANodeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd" xmlns:s1="http://www.acdp.at/DI_test/Types.xsd" xmlns:s2="http://opcfoundation.org/UA/DI/Types.xsd" xmlns:ua="http://unifiedautomation.com/Configuration/NodeSet.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <NamespaceUris>
+        <Uri>http://www.acdp.at/DI_test/</Uri>
+        <Uri>http://opcfoundation.org/UA/DI/</Uri>
+    </NamespaceUris>
+    <Aliases>
+        <Alias Alias="Int32">i=6</Alias>
+        <Alias Alias="Double">i=11</Alias>
+        <Alias Alias="String">i=12</Alias>
+        <Alias Alias="LocalizedText">i=21</Alias>
+        <Alias Alias="Organizes">i=35</Alias>
+        <Alias Alias="HasTypeDefinition">i=40</Alias>
+        <Alias Alias="HasSubtype">i=45</Alias>
+        <Alias Alias="HasProperty">i=46</Alias>
+        <Alias Alias="HasComponent">i=47</Alias>
+    </Aliases>
+    <Extensions>
+        <Extension>
+            <ua:ModelInfo Tool="UaModeler" Hash="kDF0Jh9k52UfKi/xbxq8Xg==" Version="1.6.0"/>
+        </Extension>
+    </Extensions>
+    <UAObjectType NodeId="ns=1;i=1002" BrowseName="1:MyDeviceType">
+        <DisplayName>MyDeviceType</DisplayName>
+        <References>
+            <Reference ReferenceType="HasSubtype" IsForward="false">ns=2;i=1002</Reference>
+        </References>
+    </UAObjectType>
+    <UAObject NodeId="ns=1;i=5002" BrowseName="1:MyDevice">
+        <DisplayName>MyDevice</DisplayName>
+        <References>
+            <Reference ReferenceType="HasProperty">ns=1;i=6001</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6002</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6003</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6004</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6005</Reference>
+            <Reference ReferenceType="Organizes" IsForward="false">ns=2;i=5001</Reference>
+            <Reference ReferenceType="HasTypeDefinition">ns=1;i=1002</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=5003</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6006</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6007</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6008</Reference>
+        </References>
+    </UAObject>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6001" BrowseName="2:DeviceManual">
+        <DisplayName>DeviceManual</DisplayName>
+        <Description>Address (pathname in the file system or a URL | Web address) of user manual for the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6002" BrowseName="2:DeviceRevision">
+        <DisplayName>DeviceRevision</DisplayName>
+        <Description>Overall revision level of the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6003" BrowseName="2:HardwareRevision">
+        <DisplayName>HardwareRevision</DisplayName>
+        <Description>Revision level of the hardware of the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="LocalizedText" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6004" BrowseName="2:Manufacturer">
+        <DisplayName>Manufacturer</DisplayName>
+        <Description>Name of the company that manufactured the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="LocalizedText" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6005" BrowseName="2:Model">
+        <DisplayName>Model</DisplayName>
+        <Description>Model name of the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAObject NodeId="ns=1;i=5003" BrowseName="1:ParameterSet">
+        <DisplayName>ParameterSet</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=58</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6010</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6011</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAObject>
+    <UAVariable DataType="Double" NodeId="ns=1;i=6010" BrowseName="1:DataPoint1" AccessLevel="3">
+        <DisplayName>DataPoint1</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5003</Reference>
+        </References>
+        <Value>
+            <uax:Double>0</uax:Double>
+        </Value>
+    </UAVariable>
+    <UAVariable DataType="Double" NodeId="ns=1;i=6011" BrowseName="1:DataPoint2" AccessLevel="3">
+        <DisplayName>DataPoint2</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5003</Reference>
+        </References>
+        <Value>
+            <uax:Double>0</uax:Double>
+        </Value>
+    </UAVariable>
+    <UAVariable DataType="Int32" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6006" BrowseName="2:RevisionCounter">
+        <DisplayName>RevisionCounter</DisplayName>
+        <Description>An incremental counter indicating the number of times the static data within the Device has been modified</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6007" BrowseName="2:SerialNumber">
+        <DisplayName>SerialNumber</DisplayName>
+        <Description>Identifier that uniquely identifies, within a manufacturer, a device instance</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6008" BrowseName="2:SoftwareRevision">
+        <DisplayName>SoftwareRevision</DisplayName>
+        <Description>Revision level of the software/firmware of the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+</UANodeSet>

+ 64 - 0
Model/test.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UANodeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd" xmlns:s1="http://acdp.at/test/Types.xsd" xmlns:ua="http://unifiedautomation.com/Configuration/NodeSet.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <NamespaceUris>
+        <Uri>http://acdp.at/test/</Uri>
+    </NamespaceUris>
+    <Aliases>
+        <Alias Alias="Double">i=11</Alias>
+        <Alias Alias="Organizes">i=35</Alias>
+        <Alias Alias="HasTypeDefinition">i=40</Alias>
+        <Alias Alias="HasComponent">i=47</Alias>
+    </Aliases>
+    <Extensions>
+        <Extension>
+            <ua:ModelInfo Tool="UaModeler" Hash="COmyQRbgdLUgz3M0IDS1Pg==" Version="1.6.0"/>
+        </Extension>
+    </Extensions>
+    <UAObject NodeId="ns=1;i=5002" BrowseName="1:TestObject1">
+        <DisplayName>TestObject1</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=58</Reference>
+            <Reference ReferenceType="Organizes" IsForward="false">i=85</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6002</Reference>
+            <Reference ReferenceType="Organizes">ns=1;i=6003</Reference>
+        </References>
+    </UAObject>
+    <UAVariable DataType="Double" NodeId="ns=1;i=6002" BrowseName="1:TestVariable1_1" AccessLevel="3">
+        <DisplayName>TestVariable1_1</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+        <Value>
+            <uax:Double>0</uax:Double>
+        </Value>
+    </UAVariable>
+    <UAVariable DataType="Double" NodeId="ns=1;i=6003" BrowseName="1:TestVariable1_2" AccessLevel="3">
+        <DisplayName>TestVariable1_2</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="Organizes" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+        <Value>
+            <uax:Double>0</uax:Double>
+        </Value>
+    </UAVariable>
+    <UAObject NodeId="ns=1;i=5003" BrowseName="1:TestObject2">
+        <DisplayName>TestObject2</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=58</Reference>
+            <Reference ReferenceType="Organizes" IsForward="false">i=85</Reference>
+            <Reference ReferenceType="Organizes">ns=1;i=6004</Reference>
+        </References>
+    </UAObject>
+    <UAVariable DataType="Double" NodeId="ns=1;i=6004" BrowseName="1:TestVariable2_1" AccessLevel="3">
+        <DisplayName>TestVariable2_1</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="Organizes" IsForward="false">ns=1;i=5003</Reference>
+        </References>
+        <Value>
+            <uax:Double>0</uax:Double>
+        </Value>
+    </UAVariable>
+</UANodeSet>

+ 79 - 0
Program.cs

@@ -0,0 +1,79 @@
+/******************************************************************************
+** Copyright (c) 2006-2018 Unified Automation GmbH All rights reserved.
+**
+** Software License Agreement ("SLA") Version 2.7
+**
+** Unless explicitly acquired and licensed from Licensor under another
+** license, the contents of this file are subject to the Software License
+** Agreement ("SLA") Version 2.7, or subsequent versions
+** as allowed by the SLA, and You may not copy or use this file in either
+** source code or executable form, except in compliance with the terms and
+** conditions of the SLA.
+**
+** All software distributed under the SLA is provided strictly on an
+** "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+** AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+** LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+** PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the SLA for specific
+** language governing rights and limitations under the SLA.
+**
+** Project: .NET based OPC UA Client Server SDK
+**
+** Description: OPC Unified Architecture Software Development Kit.
+**
+** The complete license agreement can be found here:
+** http://unifiedautomation.com/License/SLA/2.7/
+******************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using UnifiedAutomation.UaBase;
+using UnifiedAutomation.UaServer;
+
+namespace acdp
+{
+    class Program
+    {
+        static void Main(string[] args)
+        {
+            try
+            {
+                // The license file must be loaded from an embedded resource.
+                ApplicationLicenseManager.AddProcessLicenses(System.Reflection.Assembly.GetExecutingAssembly(), "License.lic");
+
+                // Start the server.
+                Console.WriteLine("Starting Server.");
+                AcdpServerManager server = new AcdpServerManager();
+                ApplicationInstance.Default.Start(server, null, server);
+
+                // print the endpoints.
+                Console.WriteLine(string.Empty);
+                Console.WriteLine("Listening at the following endpoints:");
+
+                foreach (EndpointDescription endpoint in ApplicationInstance.Default.Endpoints)
+                {
+                    StatusCode error = server.Application.GetEndpointStatus(endpoint);
+                    Console.WriteLine("   {0}: Status={1}", endpoint, error.ToString(true));
+                }
+
+                Console.WriteLine(string.Empty);
+
+                // Block until the server exits.
+                Console.WriteLine("Press <enter> to exit the program.");
+                Console.ReadLine();
+
+                // Stop the server.
+                Console.WriteLine("Stopping Server.");
+                server.Stop();
+            }
+            catch (Exception e)
+            {
+                Console.WriteLine("ERROR: {0}", e.Message);
+                Console.WriteLine("Press <enter> to exit the program.");
+                Console.ReadLine();
+            }
+        }
+    }
+}

+ 63 - 0
Properties/AssemblyInfo.cs

@@ -0,0 +1,63 @@
+/******************************************************************************
+** Copyright (c) 2006-2018 Unified Automation GmbH All rights reserved.
+**
+** Software License Agreement ("SLA") Version 2.7
+**
+** Unless explicitly acquired and licensed from Licensor under another
+** license, the contents of this file are subject to the Software License
+** Agreement ("SLA") Version 2.7, or subsequent versions
+** as allowed by the SLA, and You may not copy or use this file in either
+** source code or executable form, except in compliance with the terms and
+** conditions of the SLA.
+**
+** All software distributed under the SLA is provided strictly on an
+** "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+** AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+** LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+** PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the SLA for specific
+** language governing rights and limitations under the SLA.
+**
+** Project: .NET based OPC UA Client Server SDK
+**
+** Description: OPC Unified Architecture Software Development Kit.
+**
+** The complete license agreement can be found here:
+** http://unifiedautomation.com/License/SLA/2.7/
+******************************************************************************/
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("UnifiedAutomation.ServerGettingStarted")]
+[assembly: AssemblyDescription(".NET Server Lesson 03")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Unified Automation GmbH")]
+[assembly: AssemblyProduct(".NET based OPC UA Server SDK")]
+[assembly: AssemblyCopyright("Copyright © 2011-2018 Unified Automation, GmbH")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("8daba94b-367d-4bad-bba6-0210364a9cd8")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("2.6.1.0")]
+[assembly: AssemblyFileVersion("2.6.1.422_EVAL")]

+ 116 - 0
System/SystemConfiguration.xml

@@ -0,0 +1,116 @@
+<UnderlyingSystem.Configuration
+  xmlns="http://yourcompany.com/underlyingsystem"
+  xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
+  <Controllers>
+    <Name>AirConditioner1</Name>
+    <Type>1</Type>
+    <Properties>
+      <Name>State</Name>
+      <DataType>i=6</DataType>
+      <Value>1</Value>
+      <Writeable>false</Writeable>
+    </Properties>
+    <Properties>
+      <Name>Temperature</Name>
+      <DataType>i=11</DataType>
+      <Value>0</Value>
+      <Range>10:40</Range>
+    </Properties>
+    <Properties>
+      <Name>TemperatureSetPoint</Name>
+      <DataType>i=11</DataType>
+      <Value>18</Value>
+      <Writeable>true</Writeable>
+    </Properties>
+    <Properties>
+      <Name>Humidity</Name>
+      <DataType>i=11</DataType>
+      <Value>0</Value>
+      <Range>0:100</Range>
+    </Properties>
+    <Properties>
+      <Name>HumiditySetPoint</Name>
+      <DataType>i=11</DataType>
+      <Value>18</Value>
+      <Writeable>true</Writeable>
+    </Properties>
+  </Controllers>
+  <Controllers>
+    <Name>AirConditioner2</Name>
+    <Type>1</Type>
+    <Properties>
+      <Name>State</Name>
+      <DataType>i=6</DataType>
+      <Value>1</Value>
+      <Writeable>false</Writeable>
+    </Properties>
+    <Properties>
+      <Name>Temperature</Name>
+      <DataType>i=11</DataType>
+      <Value>0</Value>
+      <Range>10:40</Range>
+    </Properties>
+    <Properties>
+      <Name>TemperatureSetPoint</Name>
+      <DataType>i=11</DataType>
+      <Value>18</Value>
+      <Writeable>true</Writeable>
+    </Properties>
+    <Properties>
+      <Name>Humidity</Name>
+      <DataType>i=11</DataType>
+      <Value>0</Value>
+      <Range>0:100</Range>
+    </Properties>
+    <Properties>
+      <Name>HumiditySetPoint</Name>
+      <DataType>i=11</DataType>
+      <Value>18</Value>
+      <Writeable>true</Writeable>
+    </Properties>
+  </Controllers>
+  <Controllers>
+    <Name>Furnace1</Name>
+    <Type>2</Type>
+    <Properties>
+      <Name>State</Name>
+      <DataType>i=6</DataType>
+      <Value>1</Value>
+      <Writeable>false</Writeable>
+    </Properties>
+    <Properties>
+      <Name>Temperature</Name>
+      <DataType>i=11</DataType>
+      <Value>0</Value>
+      <Range>10:40</Range>
+    </Properties>
+    <Properties>
+      <Name>TemperatureSetPoint</Name>
+      <DataType>i=11</DataType>
+      <Value>22</Value>
+      <Writeable>true</Writeable>
+    </Properties>
+  </Controllers>
+  <Controllers>
+    <Name>Furnace2</Name>
+    <Type>2</Type>
+    <Properties>
+      <Name>State</Name>
+      <DataType>i=6</DataType>
+      <Value>1</Value>
+      <Writeable>false</Writeable>
+    </Properties>
+    <Properties>
+      <Name>Temperature</Name>
+      <DataType>i=11</DataType>
+      <Value>0</Value>
+      <Range>10:40</Range>
+    </Properties>
+    <Properties>
+      <Name>TemperatureSetPoint</Name>
+      <DataType>i=11</DataType>
+      <Value>22</Value>
+      <Writeable>true</Writeable>
+    </Properties>
+  </Controllers>
+</UnderlyingSystem.Configuration>

+ 560 - 0
System/UnderlyingSystem.cs

@@ -0,0 +1,560 @@
+/******************************************************************************
+** Copyright (c) 2006-2018 Unified Automation GmbH All rights reserved.
+**
+** Software License Agreement ("SLA") Version 2.7
+**
+** Unless explicitly acquired and licensed from Licensor under another
+** license, the contents of this file are subject to the Software License
+** Agreement ("SLA") Version 2.7, or subsequent versions
+** as allowed by the SLA, and You may not copy or use this file in either
+** source code or executable form, except in compliance with the terms and
+** conditions of the SLA.
+**
+** All software distributed under the SLA is provided strictly on an
+** "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+** AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+** LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+** PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the SLA for specific
+** language governing rights and limitations under the SLA.
+**
+** Project: .NET based OPC UA Client Server SDK
+**
+** Description: OPC Unified Architecture Software Development Kit.
+**
+** The complete license agreement can be found here:
+** http://unifiedautomation.com/License/SLA/2.7/
+******************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.IO;
+using System.Reflection;
+using System.Xml;
+using System.Xml.Serialization;
+using UnifiedAutomation.UaBase;
+using UnifiedAutomation.UaServer;
+
+namespace YourCompany.GettingStarted
+{
+    /// <summary>
+    /// A class that provides access to the underlying system.
+    /// </summary>
+    public class UnderlyingSystem : IDisposable
+    {
+        #region Constructors
+        /// <summary>
+        /// Initializes a new instance of the <see cref="UnderlyingSystem"/> class.
+        /// </summary>
+        public UnderlyingSystem()
+        {
+            m_registers = new byte[4096];
+            m_blocks = new Dictionary<int, BlockConfiguration>();
+        }
+        #endregion
+
+        #region IDisposable Members
+        /// <summary>
+        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+        /// </summary>
+        public void Dispose()
+        {
+            Dispose(true);
+        }
+
+        /// <summary>
+        /// Releases unmanaged and - optionally - managed resources
+        /// </summary>
+        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
+        protected void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                if (m_simulationTimer != null)
+                {
+                    m_simulationTimer.Dispose();
+                    m_simulationTimer = null;
+                }
+            }
+        }
+        #endregion
+
+        #region Public Methods
+        /// <summary>
+        /// Initializes this instance.
+        /// </summary>
+        public void Initialize()
+        {
+            // load the configuration file.
+            Load();
+
+            // start the simulation timer.
+            m_simulationTimer = new Timer(DoSimulation, null, 1000, 1000);
+        }
+
+        /// <summary>
+        /// Gets the blockAddress configurations.
+        /// </summary>
+        /// <returns></returns>
+        public IEnumerable<BlockConfiguration> GetBlocks()
+        {
+            return m_blocks.Values;
+        }
+
+        /// <summary>
+        /// Reads the tag value.
+        /// </summary>
+        /// <param name="blockAddress">The blockAddress.</param>
+        /// <param name="tag">The tag.</param>
+        /// <returns>The value. null if no value exists.</returns>
+        public object Read(int blockAddress, int tag)
+        {
+            lock (m_lock)
+            {
+                if (blockAddress < 0 || tag < 0)
+                {
+                    return null;
+                }
+
+                if (blockAddress + tag > m_position - sizeof(int))
+                {
+                    return null;
+                }
+
+                BlockConfiguration controller = null;
+
+                if (!m_blocks.TryGetValue(blockAddress, out controller))
+                {
+                    return null;
+                }
+
+                foreach (BlockProperty property in controller.Properties)
+                {
+                    if (property.Offset == tag)
+                    {
+                        if (property.DataType == DataTypeIds.Double)
+                        {
+                            return (double)BitConverter.ToSingle(m_registers, blockAddress + tag);
+                        }
+
+                        if (property.DataType == DataTypeIds.Int32)
+                        {
+                            return BitConverter.ToInt32(m_registers, blockAddress + tag);
+                        }
+                    }
+                }
+
+                return null;
+            }
+        }
+
+        /// <summary>
+        /// Writes the tag value.
+        /// </summary>
+        /// <param name="blockAddress">The blockAddress.</param>
+        /// <param name="tag">The tag.</param>
+        /// <param name="value">The value.</param>
+        /// <returns>
+        /// True if the write was successful.
+        /// </returns>
+        public bool Write(int blockAddress, int tag, object value)
+        {
+            lock (m_lock)
+            {
+                if (blockAddress < 0 || tag < 0)
+                {
+                    return false;
+                }
+
+                if (blockAddress + tag > m_position - sizeof(int))
+                {
+                    return false;
+                }
+
+                BlockConfiguration controller = null;
+
+                if (!m_blocks.TryGetValue(blockAddress, out controller))
+                {
+                    return false;
+                }
+
+                foreach (BlockProperty property in controller.Properties)
+                {
+                    if (property.Offset == tag)
+                    {
+                        if (!property.Writeable)
+                        {
+                            return false;
+                        }
+
+                        if (property.DataType == DataTypeIds.Double)
+                        {
+                            Write(blockAddress, tag, (double)value);
+                            return true;
+                        }
+
+                        if (property.DataType == DataTypeIds.Int32)
+                        {
+                            Write(blockAddress, tag, (int)value);
+                            return true;
+                        }
+                    }
+                }
+
+                return false;
+            }
+        }
+
+        /// <summary>
+        /// Starts the specified object id.
+        /// </summary>
+        /// <param name="blockAddress">The blockAddress.</param>
+        /// <returns></returns>
+        public StatusCode Start(int blockAddress)
+        {
+            lock (m_lock)
+            {
+                BlockConfiguration controller = null;
+
+                if (!m_blocks.TryGetValue(blockAddress, out controller))
+                {
+                    return StatusCodes.BadNodeIdUnknown;
+                }
+
+                foreach (BlockProperty property in controller.Properties)
+                {
+                    if (property.Name == "State")
+                    {
+                        Write(blockAddress, property.Offset, (int)1);
+                        break;
+                    }
+                }
+
+                return StatusCodes.Good;
+            }
+        }
+
+        /// <summary>
+        /// Stops the specified object id.
+        /// </summary>
+        /// <param name="blockAddress">The blockAddress.</param>
+        /// <returns></returns>
+        public StatusCode Stop(int blockAddress)
+        {
+            lock (m_lock)
+            {
+                BlockConfiguration controller = null;
+
+                if (!m_blocks.TryGetValue(blockAddress, out controller))
+                {
+                    return StatusCodes.BadNodeIdUnknown;
+                }
+
+                foreach (BlockProperty property in controller.Properties)
+                {
+                    if (property.Name == "State")
+                    {
+                        Write(blockAddress, property.Offset, (int)0);
+                        break;
+                    }
+                }
+
+                return StatusCodes.Good;
+            }
+        }
+
+        /// <summary>
+        /// Called when to start the simulation with a set point.
+        /// </summary>
+        /// <param name="blockAddress">The blockAddress.</param>
+        /// <param name="temperatureSetPoint">The temperature set point.</param>
+        /// <param name="humditySetPoint">The humdity set point.</param>
+        /// <returns></returns>
+        public StatusCode StartWithSetPoint(int blockAddress, double temperatureSetPoint, double humditySetPoint)
+        {
+            lock (m_lock)
+            {
+                BlockConfiguration controller = null;
+
+                if (!m_blocks.TryGetValue(blockAddress, out controller))
+                {
+                    return StatusCodes.BadNodeIdUnknown;
+                }
+
+                foreach (BlockProperty property in controller.Properties)
+                {
+                    if (property.Name == "TemperatureSetPoint")
+                    {
+                        Write(blockAddress, property.Offset, temperatureSetPoint);
+                    }
+
+                    else if (property.Name == "HumiditySetPoint")
+                    {
+                        Write(blockAddress, property.Offset, humditySetPoint);
+                    }
+
+                    else if (property.Name == "State")
+                    {
+                        Write(blockAddress, property.Offset, (int)1);
+                    }
+                }
+
+                return StatusCodes.Good;
+            }
+        }
+        #endregion
+
+        #region Private Method
+        /// <summary>
+        /// Loads the configuration for the system.
+        /// </summary>
+        private void Load()
+        {
+            foreach (string resourceName in Assembly.GetExecutingAssembly().GetManifestResourceNames())
+            {
+                if (resourceName.EndsWith(".SystemConfiguration.xml"))
+                {
+                    using (Stream istrm = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
+                    {
+                        XmlSerializer serializer = new XmlSerializer(typeof(Configuration));
+                        m_configuration = (Configuration)serializer.Deserialize(istrm);
+                    }
+                }
+            }
+
+            if (m_configuration.Controllers != null)
+            {
+                for (int ii = 0; ii < m_configuration.Controllers.Length; ii++)
+                {
+                    ControllerConfiguration controller = m_configuration.Controllers[ii];
+
+                    int blockAddress = m_position;
+                    int offset = m_position - blockAddress;
+
+                    BlockConfiguration data = new BlockConfiguration()
+                    {
+                        Address = blockAddress,
+                        Name = controller.Name,
+                        Type = controller.Type,
+                        Properties = new List<BlockProperty>()
+                    };
+
+                    if (controller.Properties != null)
+                    {
+                        for (int jj = 0; jj < controller.Properties.Length; jj++)
+                        {
+                            ControllerProperty property = controller.Properties[jj];
+                            NodeId dataTypeId = NodeId.Parse(property.DataType);
+                            string value = property.Value;
+                            Range range = null;
+
+                            if (!String.IsNullOrEmpty(property.Range))
+                            {
+                                try
+                                {
+                                    NumericRange nr = NumericRange.Parse(property.Range);
+                                    range = new Range() { High = nr.End, Low = nr.Begin };
+                                }
+                                catch (Exception)
+                                {
+                                    range = null;
+                                }
+                            }
+
+                            data.Properties.Add(new BlockProperty()
+                            {
+                                Offset = offset,
+                                Name = controller.Properties[jj].Name,
+                                DataType = dataTypeId,
+                                Writeable = controller.Properties[jj].Writeable,
+                                Range = range
+                            });
+
+                            switch ((uint)dataTypeId.Identifier)
+                            {
+                                case DataTypes.Int32:
+                                {
+                                    Write(blockAddress, offset, (int)TypeUtils.Cast(value, BuiltInType.Int32));
+                                    offset += 4;
+                                    break;
+                                }
+
+                                case DataTypes.Double:
+                                {
+                                    Write(blockAddress, offset, (double)TypeUtils.Cast(value, BuiltInType.Double));
+                                    offset += 4;
+                                    break;
+                                }
+                            }
+                        }
+                    }
+
+                    m_position += offset;
+                    m_blocks[blockAddress] = data;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Writes the specified offset.
+        /// </summary>
+        /// <param name="offset">The offset.</param>
+        /// <param name="value">The value.</param>
+        private void Write(int blockAddress, int offset, int value)
+        {
+            byte[] bytes = BitConverter.GetBytes(value);
+            Array.Copy(bytes, 0, m_registers, blockAddress + offset, bytes.Length);
+        }
+
+        /// <summary>
+        /// Writes the specified offset.
+        /// </summary>
+        /// <param name="offset">The offset.</param>
+        /// <param name="value">The value.</param>
+        private void Write(int blockAddress, int offset, double value)
+        {
+            byte[] bytes = BitConverter.GetBytes((float)value);
+            Array.Copy(bytes, 0, m_registers, blockAddress + offset, bytes.Length);
+        }
+
+        /// <summary>
+        /// Does the simulation.
+        /// </summary>
+        /// <param name="state">The state.</param>
+        private void DoSimulation(object state)
+        {
+            try
+            {
+                lock (m_lock)
+                {
+                    foreach (var blockAddress in m_blocks)
+                    {
+                        for (int ii = 0; ii < blockAddress.Value.Properties.Count - 1; ii++)
+                        {
+                            string firstName = blockAddress.Value.Properties[ii].Name;
+                            string secondName = blockAddress.Value.Properties[ii + 1].Name;
+
+                            if (!secondName.StartsWith(firstName) || !secondName.EndsWith("SetPoint"))
+                            {
+                                continue;
+                            }
+
+                            int valueOffset = blockAddress.Value.Properties[ii].Offset;
+                            int setpointOffset = blockAddress.Value.Properties[ii + 1].Offset;
+
+                            double value = (double)Read(blockAddress.Key, valueOffset);
+                            double setpoint = (double)Read(blockAddress.Key, setpointOffset);
+
+                            Write(blockAddress.Key, valueOffset, Adjust(value, setpoint));
+                        }
+                    }
+                }
+            }
+            catch (Exception e)
+            {
+                TraceServer.Error(e, "Failed run simulation.");
+            }
+        }
+
+        /// <summary>
+        /// Adjusts the specified value.
+        /// </summary>
+        /// <param name="value">The value.</param>
+        /// <param name="setPoint">The set point.</param>
+        /// <returns></returns>
+        private double Adjust(double value, double setPoint)
+        {
+            Random random = new Random();
+            double delta = (Math.Abs(setPoint - value) + 1) * random.NextDouble();
+            return value + ((random.Next() % 2 == 0) ? delta : -delta);
+        }
+        #endregion
+
+        #region Configuration File Classes
+        [XmlType(TypeName = "UnderlyingSystem.ControllerProperty", Namespace = "http://yourcompany.com/underlyingsystem")]
+        public class ControllerProperty
+        {
+            [XmlElement(Order = 1)]
+            public string Name { get; set; }
+
+            [XmlElement(Order = 2)]
+            public string DataType { get; set; }
+
+            [XmlElement(Order = 3)]
+            public string Value { get; set; }
+
+            [XmlElement(Order = 4)]
+            public bool Writeable { get; set; }
+
+            [XmlElement(Order = 5)]
+            public string Range { get; set; }
+        }
+
+        [XmlType(TypeName = "UnderlyingSystem.ControllerConfiguration", Namespace = "http://yourcompany.com/underlyingsystem")]
+        public class ControllerConfiguration
+        {
+            [XmlElement(Order = 1)]
+            public string Name { get; set; }
+
+            [XmlElement(Order = 2)]
+            public int Type { get; set; }
+
+            [XmlElement(Order = 3)]
+            public ControllerProperty[] Properties;
+        }
+
+        [XmlRoot(ElementName = "UnderlyingSystem.Configuration", Namespace = "http://yourcompany.com/underlyingsystem")]
+        public class Configuration
+        {
+            [XmlElement(Order = 1)]
+            public ControllerConfiguration[] Controllers;
+        }
+        #endregion
+
+        #region Private Fields
+        private object m_lock = new object();
+        private byte[] m_registers;
+        private int m_position;
+        private Dictionary<int, BlockConfiguration> m_blocks;
+        private Configuration m_configuration;
+        private Timer m_simulationTimer;
+        #endregion
+    }
+
+    #region BlockProperty Class
+    /// <summary>
+    /// The configuration for a property of a blockAddress.
+    /// </summary>
+    public class BlockProperty
+    {
+        public int Offset;
+        public string Name;
+        public NodeId DataType;
+        public bool Writeable;
+        public Range Range;
+    }
+    #endregion
+
+    #region BlockConfiguration Class
+    /// <summary>
+    /// The configuration for a blockAddress.
+    /// </summary>
+    public class BlockConfiguration
+    {
+        public int Address;
+        public string Name;
+        public int Type;
+        public List<BlockProperty> Properties;
+    }
+    #endregion
+
+    #region BlockType Class
+    public static class BlockType
+    {
+        public const int AirConditioner = 1;
+        public const int Furnace = 2;
+    }
+    #endregion
+}

+ 129 - 0
UA.NetXMLServer.csproj

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{357F49EF-0095-40FC-BA69-448F940E16AE}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>acdp</RootNamespace>
+    <AssemblyName>ServerLesson03</AssemblyName>
+    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <TargetFrameworkProfile />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>obj\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>0</WarningLevel>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+    <DocumentationFile>
+    </DocumentationFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>obj\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>app.ico</ApplicationIcon>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <Reference Include="UnifiedAutomation.UaBase, Version=2.6.1.0, Culture=neutral, PublicKeyToken=90c158e6f23d82c1, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\bin\UnifiedAutomation.UaBase.dll</HintPath>
+    </Reference>
+    <Reference Include="UnifiedAutomation.UaServer, Version=2.6.1.0, Culture=neutral, PublicKeyToken=90c158e6f23d82c1, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\..\bin\UnifiedAutomation.UaServer.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="XMLNodeManager.cs" />
+    <Compile Include="Model\BAIdentifiers.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="AcdpServerManager.cs" />
+    <Compile Include="System\UnderlyingSystem.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="app.ico" />
+    <Content Include="Model\test.xml" />
+    <EmbeddedResource Include="Model\buildingautomation.xml" />
+    <EmbeddedResource Include="System\SystemConfiguration.xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+    <EmbeddedResource Include="License\License.lic" />
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 16 - 0
UA.NetXMLServer.csproj.user

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
+    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
+  </PropertyGroup>
+  <PropertyGroup>
+    <PublishUrlHistory>publish\</PublishUrlHistory>
+    <InstallUrlHistory />
+    <SupportUrlHistory />
+    <UpdateUrlHistory />
+    <BootstrapperUrlHistory />
+    <ErrorReportUrlHistory />
+    <FallbackCulture>de-DE</FallbackCulture>
+    <VerifyUploadedFiles>false</VerifyUploadedFiles>
+  </PropertyGroup>
+</Project>

+ 25 - 0
UA.NetXMLServerMappe.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.28010.2048
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UA.NetXMLServer", "UA.NetXMLServer.csproj", "{357F49EF-0095-40FC-BA69-448F940E16AE}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{357F49EF-0095-40FC-BA69-448F940E16AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{357F49EF-0095-40FC-BA69-448F940E16AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{357F49EF-0095-40FC-BA69-448F940E16AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{357F49EF-0095-40FC-BA69-448F940E16AE}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {B927E736-1CDB-4017-8055-0C02DA0BF61D}
+	EndGlobalSection
+EndGlobal

+ 340 - 0
XMLNodeManager.cs

@@ -0,0 +1,340 @@
+/******************************************************************************
+** Copyright (c) 2006-2018 Unified Automation GmbH All rights reserved.
+**
+** Software License Agreement ("SLA") Version 2.7
+**
+** Unless explicitly acquired and licensed from Licensor under another
+** license, the contents of this file are subject to the Software License
+** Agreement ("SLA") Version 2.7, or subsequent versions
+** as allowed by the SLA, and You may not copy or use this file in either
+** source code or executable form, except in compliance with the terms and
+** conditions of the SLA.
+**
+** All software distributed under the SLA is provided strictly on an
+** "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
+** AND LICENSOR HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
+** LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+** PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the SLA for specific
+** language governing rights and limitations under the SLA.
+**
+** Project: .NET based OPC UA Client Server SDK
+**
+** Description: OPC Unified Architecture Software Development Kit.
+**
+** The complete license agreement can be found here:
+** http://unifiedautomation.com/License/SLA/2.7/
+******************************************************************************/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.IO;
+using System.Reflection;
+using UnifiedAutomation.UaBase;
+using UnifiedAutomation.UaServer;
+
+namespace acdp
+{
+    internal class XMLNodeManager : BaseNodeManager
+    {
+        /// <summary>
+        /// Gets or sets the index of the instance namespace.
+        /// </summary>
+        /// <value>
+        /// The index of the instance namespace.
+        /// </value>
+        public ushort InstanceNamespaceIndex { get; set; }
+
+        /// <summary>
+        /// Gets or sets the index of the type namespace.
+        /// </summary>
+        /// <value>
+        /// The index of the type namespace.
+        /// </value>
+        public ushort TypeNamespaceIndex { get; set; }
+        /// <summary>
+        /// Called when the node manager is started.
+        /// </summary>
+
+        public override void Startup()
+        {
+            try
+            {
+                Console.WriteLine("Starting XMLNodeManager.");
+
+                base.Startup();
+
+                // save the namespaces used by this node manager.
+                
+                InstanceNamespaceIndex = AddNamespaceUri("http://www.acdp.at/DI_test/");
+                
+                TypeNamespaceIndex = AddNamespaceUri("http://www.acdp.at/DI_test/");
+
+
+                // load the model.
+                Console.WriteLine("Loading XML Models.");       
+                
+
+                ImportUaNodeset(new FileInfo("../../Model/Opc.Ua.Di.NodeSet2.xml"));
+                ImportUaNodeset(new FileInfo("../../Model/di_test.xml"));
+
+                // initialize the underlying system.
+                //m_system.Initialize();
+
+                SetVariableConfiguration(new NodeId(6010, 2), NodeHandleType.ExternalPush, null);
+
+                /*
+                 
+                // Create a Folder for Controllers
+                CreateObjectSettings settings = new CreateObjectSettings()
+                {
+                    ParentNodeId = ObjectIds.ObjectsFolder,
+                    ReferenceTypeId = ReferenceTypeIds.Organizes,
+                    RequestedNodeId = new NodeId("Controllers", InstanceNamespaceIndex),
+                    BrowseName = new QualifiedName("Controllers", InstanceNamespaceIndex),
+                    TypeDefinitionId = ObjectTypeIds.FolderType
+                };
+                CreateObject(Server.DefaultRequestContext, settings);
+
+                // Create controllers from configuration
+                foreach (BlockConfiguration block in m_system.GetBlocks())
+                {
+                    // set type definition NodeId
+                    NodeId typeDefinitionId = ObjectTypeIds.BaseObjectType;
+                    if (block.Type == BlockType.AirConditioner)
+                    {
+                        typeDefinitionId = new NodeId(yourorganisation.BA.ObjectTypes.AirConditionerControllerType, TypeNamespaceIndex);
+                    }
+                    else if (block.Type == BlockType.Furnace)
+                    {
+                        typeDefinitionId = new NodeId(yourorganisation.BA.ObjectTypes.FurnaceControllerType, TypeNamespaceIndex);
+                    }
+
+                    // create object.
+                    settings = new CreateObjectSettings()
+                    {
+                        ParentNodeId = new NodeId("Controllers", InstanceNamespaceIndex),
+                        ReferenceTypeId = ReferenceTypeIds.Organizes,
+                        RequestedNodeId = new NodeId(block.Name, InstanceNamespaceIndex),
+                        BrowseName = new QualifiedName(block.Name, TypeNamespaceIndex),
+                        TypeDefinitionId = typeDefinitionId
+                    };
+
+                    CreateObject(Server.DefaultRequestContext, settings);
+
+                    /// [Snippet EURange]
+                    // Set NodeHandleType to ExternalPolled
+                    foreach (BlockProperty property in block.Properties)
+                    {
+                        // the node was already created when the controller object was instantiated.
+                        // this call links the node to the underlying system data.
+                        VariableNode variable = SetVariableConfiguration(
+                            new NodeId(block.Name, InstanceNamespaceIndex),
+                            new QualifiedName(property.Name, TypeNamespaceIndex),
+                            NodeHandleType.ExternalPolled,
+                            new SystemAddress() { Address = block.Address, Offset = property.Offset });
+
+                        // Add information about expected range
+                        if (variable != null)
+                        {
+                            // in-memory nodes must be locked before updates.
+                            // reads do not require locks for simple types and references.
+                            // value reads require a lock.
+                            lock (InMemoryNodeLock)
+                            {
+                                variable.AccessLevel = (property.Writeable) ? AccessLevels.CurrentReadOrWrite : AccessLevels.CurrentRead;
+                            }
+
+                            if (property.Range != null)
+                            {
+                                SetVariableDefaultValue(
+                                    variable.NodeId,
+                                    new QualifiedName(BrowseNames.EURange),
+                                    new Variant(property.Range));
+                            }
+                        }
+                    }
+                    /// [Snippet EURange]
+                }
+
+            */
+
+            }
+            catch (Exception e)
+            {
+                Console.WriteLine("Failed to start Lesson3aNodeManager. " + e.Message);
+            }
+        }
+
+        /// <summary>
+        /// Called when the node manager is stopped.
+        /// </summary>
+        public override void Shutdown()
+        {
+            try
+            {
+                Console.WriteLine("Stopping Lesson3aNodeManager.");
+
+                // TBD 
+
+                base.Shutdown();
+            }
+            catch (Exception e)
+            {
+                Console.WriteLine("Failed to stop Lesson3aNodeManager. " + e.Message); ;
+            }
+        }
+
+        /// <summary>
+        /// Reads the attributes.
+        /// </summary>
+        /// [Read]
+        protected override void Read(
+            RequestContext context,
+            TransactionHandle transaction,
+            IList<NodeAttributeOperationHandle> operationHandles,
+            IList<ReadValueId> settings)
+        {
+            for (int ii = 0; ii < operationHandles.Count; ii++)
+            {
+                DataValue dv = null;
+
+                //// the data passed to CreateVariable is returned as the UserData in the handle.
+                //SystemAddress address = operationHandles[ii].NodeHandle.UserData as SystemAddress;
+
+                //if (address != null)
+                //{
+                //    // read the data from the underlying system.
+                //    object value = m_system.Read(address.Address, address.Offset);
+
+                //    if (value != null)
+                //    {
+                //        dv = new DataValue(new Variant(value, null), DateTime.UtcNow);
+
+                //        // apply any index range or encoding.
+                //        if (!String.IsNullOrEmpty(settings[ii].IndexRange) || !QualifiedName.IsNull(settings[ii].DataEncoding))
+                //        {
+                //            dv = ApplyIndexRangeAndEncoding(
+                //                operationHandles[ii].NodeHandle,
+                //                dv,
+                //                settings[ii].IndexRange,
+                //                settings[ii].DataEncoding);
+                //        }
+                //    }
+                //}
+
+                Console.WriteLine($"Read NodeId: {operationHandles[ii].NodeId}");
+
+                dv = new DataValue(new Variant(1234.56), DateTime.UtcNow);
+
+                // set an error if not found.
+                if (dv == null)
+                {
+                    dv = new DataValue(new StatusCode(StatusCodes.BadNodeIdUnknown));
+                }
+
+                // return the data to the caller.
+                ((ReadCompleteEventHandler)transaction.Callback)(
+                    operationHandles[ii],
+                    transaction.CallbackData,
+                    dv,
+                    false);
+            }
+        }
+        /// [Read]
+
+        /// <summary>
+        /// Write the attributes
+        /// </summary>
+        /// [Write]
+        protected override void Write(
+            RequestContext context,
+            TransactionHandle transaction,
+            IList<NodeAttributeOperationHandle> operationHandles,
+            IList<WriteValue> settings)
+        {
+            for (int ii = 0; ii < operationHandles.Count; ii++)
+            {
+                StatusCode error = StatusCodes.Good;
+
+                // the data passed to CreateVariable is returned as the UserData in the handle.
+                //SystemAddress address = operationHandles[ii].NodeHandle.UserData as SystemAddress;
+
+                //if (address != null)
+                //{
+                //    if (!String.IsNullOrEmpty(settings[ii].IndexRange))
+                //    {
+                //        error = StatusCodes.BadIndexRangeInvalid;
+                //    }
+                //    else if (!m_system.Write(address.Address, address.Offset, settings[ii].Value.Value))
+                //    {
+
+                //        Console.WriteLine($"Write Value: {settings[ii].Value.Value}, NodeId: {operationHandles[ii].NodeId}");
+                     
+
+                //        //error = StatusCodes.BadUserAccessDenied;
+                //    }
+                //}
+                //else
+                //{
+                //    error = StatusCodes.BadNodeIdUnknown;
+                //}
+
+                Console.WriteLine($"Write Value: {settings[ii].Value.Value}, NodeId: {operationHandles[ii].NodeId}");
+
+                // return the data to the caller.
+                ((WriteCompleteEventHandler)transaction.Callback)(
+                    operationHandles[ii],
+                    transaction.CallbackData,
+                    error,
+                    false);
+            }
+        }
+        /// [Write]
+
+        #region Constructor
+        /// <summary>
+        /// Initializes a new instance of the class.
+        /// </summary>
+        /// [Create system in constructor]
+        public XMLNodeManager(ServerManager server) : base(server)
+        {
+           // m_system = new UnderlyingSystem();
+        }
+        /// [Create system in constructor]
+        #endregion
+
+        #region IDisposable
+        /// <summary>
+        /// An overrideable version of the Dispose.
+        /// </summary>
+        /// <param name="disposing"></param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing)
+            {
+                // TBD
+            }
+        }
+        #endregion
+
+        #region SystemAddress Class
+        private class SystemAddress
+        {
+            public int Address;
+            public int Offset;
+        }
+        #endregion
+
+        #region Private Methods
+        #endregion
+
+        /// [Add system]
+        #region Private Fields
+        //private UnderlyingSystem m_system;
+        #endregion
+        /// [Add system]
+    }
+}

BIN
app.ico


BIN
obj/Debug/DesignTimeResolveAssemblyReferences.cache


BIN
obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache


+ 0 - 0
obj/Debug/Lesson03_VS2015.csproj.CopyComplete


+ 1 - 0
obj/Debug/Lesson03_VS2015.csproj.CoreCompileInputs.cache

@@ -0,0 +1 @@
+319563e6f91047a6e0586a6ebfbdf697b61a3bfe

+ 21 - 0
obj/Debug/Lesson03_VS2015.csproj.FileListAbsolute.txt

@@ -0,0 +1,21 @@
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\bin\Debug\ServerLesson03.exe.config
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\bin\Debug\ServerLesson03.exe
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\bin\Debug\ServerLesson03.pdb
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Debug\Lesson03_VS2015.csproj.CoreCompileInputs.cache
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Debug\Lesson03_VS2015.csproj.CopyComplete
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Debug\ServerLesson03.exe
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Debug\ServerLesson03.pdb
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Debug\Lesson03_VS2015.csprojAssemblyReference.cache
+C:\Users\Andreas Fernbach\bin\Debug\ServerLesson03.exe.config
+C:\Users\Andreas Fernbach\bin\Debug\ServerLesson03.exe
+C:\Users\Andreas Fernbach\bin\Debug\ServerLesson03.pdb
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\Lesson03_VS2015.csprojAssemblyReference.cache
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\Lesson03_VS2015.csproj.CoreCompileInputs.cache
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\Lesson03_VS2015.csproj.CopyComplete
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\ServerLesson03.exe
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\ServerLesson03.pdb
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\ServerLesson03.exe.config
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\UnifiedAutomation.UaBase.dll
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\UnifiedAutomation.UaServer.dll
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\UnifiedAutomation.UaBase.xml
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Debug\UnifiedAutomation.UaServer.xml

BIN
obj/Debug/Lesson03_VS2015.csprojAssemblyReference.cache


File diff suppressed because it is too large
+ 2097 - 0
obj/Debug/Opc.Ua.Di.NodeSet2.xml


BIN
obj/Debug/ServerLesson03.exe


+ 129 - 0
obj/Debug/ServerLesson03.exe.config

@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<configuration>
+  <configSections>
+    <section name="UaApplicationConfiguration" type="UnifiedAutomation.UaBase.ApplicationConfigurationSection,UnifiedAutomation.UaBase"/>
+  </configSections>
+  <UaApplicationConfiguration>
+
+    <SecuredApplication xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://opcfoundation.org/UA/2011/03/SecuredApplication.xsd" xmlns:ua="http://opcfoundation.org/UA/2008/02/Types.xsd">
+
+      <!-- Identify the Application -->
+      <ApplicationName>UaServerNET</ApplicationName>
+      <ApplicationUri>urn:localhost:UnifiedAutomation:UaGettingStartedServerNet</ApplicationUri>
+      <ApplicationType>Server_0</ApplicationType>
+
+      <!-- Specify location of Certificates and Trust Lists -->
+      <ApplicationCertificate>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\own</StorePath>
+        <SubjectName>CN=GettingStartedServer/O=UnifiedAutomation/DC=localhost</SubjectName>
+        <ValidationOptions>0</ValidationOptions>
+      </ApplicationCertificate>
+      <TrustedCertificateStore>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\trusted</StorePath>
+        <ValidationOptions>0</ValidationOptions>
+      </TrustedCertificateStore>
+      <IssuerCertificateStore>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\issuers</StorePath>
+        <ValidationOptions>0</ValidationOptions>
+      </IssuerCertificateStore>
+      <RejectedCertificatesStore>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\rejected</StorePath>
+        <ValidationOptions>0</ValidationOptions>
+      </RejectedCertificatesStore>
+
+      <!-- Specify Endpoints the Server will use -->
+      <BaseAddresses>
+        <BaseAddress>opc.tcp://localhost:48030</BaseAddress>
+
+        <!--
+        Uncomment this line to enable the HTTPS based profiles.
+
+        This profile works but is not officially supported in this version of the SDK.
+        This is the HTTP based protocol that will be supported by embedded devices.
+
+        Enabling this profile requires that you have a HTTPS certificate issued by a certificate authority
+        in your root certificate store. You can create your own authority and add it to the root store or
+        you can use authorities like VeriSign or Thawte.
+        -->
+        <!--
+        <BaseAddress>https://localhost:48031/</BaseAddress>
+         -->
+
+        <!--
+        Uncomment this line to enable the WS-Secure Conversation based profiles.
+
+        This profile works but is not officially supported since it is not practical to support on embedded devices.
+        You should not enable this protocol unless you have an application that must support XML Web Services.
+        -->
+        <!--
+        <BaseAddress>http://localhost:48032/wssecurity/</BaseAddress>
+        -->
+      </BaseAddresses>
+
+      <!-- Specify the SecurityProfiles the Server supports -->
+      <SecurityProfiles>
+        <SecurityProfile>
+          <ProfileUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256</ProfileUri>
+          <Enabled>true</Enabled>
+        </SecurityProfile>
+        <SecurityProfile>
+          <ProfileUri>http://opcfoundation.org/UA/SecurityPolicy#None</ProfileUri>
+          <Enabled>true</Enabled>
+        </SecurityProfile>
+      </SecurityProfiles>
+
+      <!-- Specify Configuration for Different Components (Can include 'YourCompany' Configuration) -->
+      <Extensions>
+
+        <!-- Specify the Trace settings for the Application -->
+        <Extension>
+          <TraceSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd" MasterTraceEnabled="false" DefaultTraceLevel="Info">
+            <TraceFile>%CommonApplicationData%\unifiedautomation\logs\UaSdkNetBundleEval\UaGettingStartedServerNet.log.txt</TraceFile>
+            <MaxEntriesPerLog>100000</MaxEntriesPerLog>
+            <MaxLogFileBackups>3</MaxLogFileBackups>
+            <ModuleSettings>
+              <ModuleTraceSettings ModuleName="UnifiedAutomation.Stack"/>
+              <ModuleTraceSettings ModuleName="UnifiedAutomation.Server"/>
+            </ModuleSettings>
+          </TraceSettings>
+        </Extension>
+
+        <!-- Specify Settings when EXE is run with the /install argument -->
+        <Extension>
+          <InstallationSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <GenerateCertificateIfNone>true</GenerateCertificateIfNone>
+            <DeleteCertificateOnUninstall>true</DeleteCertificateOnUninstall>
+          </InstallationSettings>
+        </Extension>
+
+        <!-- Specify Settings for the ServerManager -->
+        <Extension>
+          <ServerSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <ProductName>UnifiedAutomation GettingStartedServer</ProductName>
+            <DiscoveryRegistration>
+              <Enabled>false</Enabled>
+            </DiscoveryRegistration>
+          </ServerSettings>
+        </Extension>
+
+        <Extension>
+          <SessionSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <MaxSessionCount>100</MaxSessionCount>
+          </SessionSettings>
+        </Extension>
+
+        <!-- Specify Settings for the SubscriptionManager -->
+        <Extension>
+          <SubscriptionSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <MaxSubscriptionCount>500</MaxSubscriptionCount>
+          </SubscriptionSettings>
+        </Extension>
+
+      </Extensions>
+    </SecuredApplication>
+  </UaApplicationConfiguration>
+</configuration>

BIN
obj/Debug/ServerLesson03.pdb


+ 0 - 0
obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs


+ 0 - 0
obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs


+ 0 - 0
obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs


+ 0 - 0
obj/Debug/UA.NetXMLServer.csproj.CopyComplete


+ 1 - 0
obj/Debug/UA.NetXMLServer.csproj.CoreCompileInputs.cache

@@ -0,0 +1 @@
+319563e6f91047a6e0586a6ebfbdf697b61a3bfe

+ 10 - 0
obj/Debug/UA.NetXMLServer.csproj.FileListAbsolute.txt

@@ -0,0 +1,10 @@
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\UA.NetXMLServer.csprojAssemblyReference.cache
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\UA.NetXMLServer.csproj.CoreCompileInputs.cache
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\ServerLesson03.exe
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\ServerLesson03.pdb
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\UA.NetXMLServer.csproj.CopyComplete
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\ServerLesson03.exe.config
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\UnifiedAutomation.UaBase.dll
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\UnifiedAutomation.UaServer.dll
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\UnifiedAutomation.UaBase.xml
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NETServerXML\obj\Debug\UnifiedAutomation.UaServer.xml

BIN
obj/Debug/UA.NetXMLServer.csprojAssemblyReference.cache


BIN
obj/Debug/UnifiedAutomation.UaBase.dll


File diff suppressed because it is too large
+ 139197 - 0
obj/Debug/UnifiedAutomation.UaBase.xml


BIN
obj/Debug/UnifiedAutomation.UaServer.dll


File diff suppressed because it is too large
+ 28415 - 0
obj/Debug/UnifiedAutomation.UaServer.xml


+ 138 - 0
obj/Debug/di_test.xml

@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+<UANodeSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:uax="http://opcfoundation.org/UA/2008/02/Types.xsd" xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd" xmlns:s1="http://www.acdp.at/DI_test/Types.xsd" xmlns:s2="http://opcfoundation.org/UA/DI/Types.xsd" xmlns:ua="http://unifiedautomation.com/Configuration/NodeSet.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <NamespaceUris>
+        <Uri>http://www.acdp.at/DI_test/</Uri>
+        <Uri>http://opcfoundation.org/UA/DI/</Uri>
+    </NamespaceUris>
+    <Aliases>
+        <Alias Alias="Int32">i=6</Alias>
+        <Alias Alias="Double">i=11</Alias>
+        <Alias Alias="String">i=12</Alias>
+        <Alias Alias="LocalizedText">i=21</Alias>
+        <Alias Alias="Organizes">i=35</Alias>
+        <Alias Alias="HasTypeDefinition">i=40</Alias>
+        <Alias Alias="HasSubtype">i=45</Alias>
+        <Alias Alias="HasProperty">i=46</Alias>
+        <Alias Alias="HasComponent">i=47</Alias>
+    </Aliases>
+    <Extensions>
+        <Extension>
+            <ua:ModelInfo Tool="UaModeler" Hash="kDF0Jh9k52UfKi/xbxq8Xg==" Version="1.6.0"/>
+        </Extension>
+    </Extensions>
+    <UAObjectType NodeId="ns=1;i=1002" BrowseName="1:MyDeviceType">
+        <DisplayName>MyDeviceType</DisplayName>
+        <References>
+            <Reference ReferenceType="HasSubtype" IsForward="false">ns=2;i=1002</Reference>
+        </References>
+    </UAObjectType>
+    <UAObject NodeId="ns=1;i=5002" BrowseName="1:MyDevice">
+        <DisplayName>MyDevice</DisplayName>
+        <References>
+            <Reference ReferenceType="HasProperty">ns=1;i=6001</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6002</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6003</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6004</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6005</Reference>
+            <Reference ReferenceType="Organizes" IsForward="false">ns=2;i=5001</Reference>
+            <Reference ReferenceType="HasTypeDefinition">ns=1;i=1002</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=5003</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6006</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6007</Reference>
+            <Reference ReferenceType="HasProperty">ns=1;i=6008</Reference>
+        </References>
+    </UAObject>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6001" BrowseName="2:DeviceManual">
+        <DisplayName>DeviceManual</DisplayName>
+        <Description>Address (pathname in the file system or a URL | Web address) of user manual for the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6002" BrowseName="2:DeviceRevision">
+        <DisplayName>DeviceRevision</DisplayName>
+        <Description>Overall revision level of the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6003" BrowseName="2:HardwareRevision">
+        <DisplayName>HardwareRevision</DisplayName>
+        <Description>Revision level of the hardware of the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="LocalizedText" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6004" BrowseName="2:Manufacturer">
+        <DisplayName>Manufacturer</DisplayName>
+        <Description>Name of the company that manufactured the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="LocalizedText" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6005" BrowseName="2:Model">
+        <DisplayName>Model</DisplayName>
+        <Description>Model name of the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAObject NodeId="ns=1;i=5003" BrowseName="1:ParameterSet">
+        <DisplayName>ParameterSet</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=58</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6010</Reference>
+            <Reference ReferenceType="HasComponent">ns=1;i=6011</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAObject>
+    <UAVariable DataType="Double" NodeId="ns=1;i=6010" BrowseName="1:DataPoint1" AccessLevel="3">
+        <DisplayName>DataPoint1</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5003</Reference>
+        </References>
+        <Value>
+            <uax:Double>0</uax:Double>
+        </Value>
+    </UAVariable>
+    <UAVariable DataType="Double" NodeId="ns=1;i=6011" BrowseName="1:DataPoint2" AccessLevel="3">
+        <DisplayName>DataPoint2</DisplayName>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
+            <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=5003</Reference>
+        </References>
+        <Value>
+            <uax:Double>0</uax:Double>
+        </Value>
+    </UAVariable>
+    <UAVariable DataType="Int32" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6006" BrowseName="2:RevisionCounter">
+        <DisplayName>RevisionCounter</DisplayName>
+        <Description>An incremental counter indicating the number of times the static data within the Device has been modified</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6007" BrowseName="2:SerialNumber">
+        <DisplayName>SerialNumber</DisplayName>
+        <Description>Identifier that uniquely identifies, within a manufacturer, a device instance</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+    <UAVariable DataType="String" ParentNodeId="ns=1;i=5002" NodeId="ns=1;i=6008" BrowseName="2:SoftwareRevision">
+        <DisplayName>SoftwareRevision</DisplayName>
+        <Description>Revision level of the software/firmware of the device</Description>
+        <References>
+            <Reference ReferenceType="HasTypeDefinition">i=68</Reference>
+            <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=5002</Reference>
+        </References>
+    </UAVariable>
+</UANodeSet>

BIN
obj/Release/DesignTimeResolveAssemblyReferencesInput.cache


+ 0 - 0
obj/Release/Lesson03_VS2015.csproj.CopyComplete


+ 1 - 0
obj/Release/Lesson03_VS2015.csproj.CoreCompileInputs.cache

@@ -0,0 +1 @@
+990f18daa625be1a5c1bd94b27b660cd7b293c78

+ 21 - 0
obj/Release/Lesson03_VS2015.csproj.FileListAbsolute.txt

@@ -0,0 +1,21 @@
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\bin\Release\ServerLesson03.exe.config
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\bin\Release\ServerLesson03.exe
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\bin\Release\ServerLesson03.pdb
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Release\Lesson03_VS2015.csprojAssemblyReference.cache
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Release\Lesson03_VS2015.csproj.CoreCompileInputs.cache
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Release\Lesson03_VS2015.csproj.CopyComplete
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Release\ServerLesson03.exe
+C:\Users\Andreas Fernbach\Tools\UaSdkNetBundleEval\examples\ServerGettingStarted\Lesson03\obj\Release\ServerLesson03.pdb
+C:\Users\Andreas Fernbach\bin\Release\ServerLesson03.exe.config
+C:\Users\Andreas Fernbach\bin\Release\ServerLesson03.exe
+C:\Users\Andreas Fernbach\bin\Release\ServerLesson03.pdb
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\Lesson03_VS2015.csprojAssemblyReference.cache
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\Lesson03_VS2015.csproj.CoreCompileInputs.cache
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\Lesson03_VS2015.csproj.CopyComplete
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\ServerLesson03.exe
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\ServerLesson03.pdb
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\ServerLesson03.exe.config
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\UnifiedAutomation.UaBase.dll
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\UnifiedAutomation.UaServer.dll
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\UnifiedAutomation.UaBase.xml
+C:\Users\Andreas Fernbach\Documents\GIT\UA.NET_Server_XML\obj\Release\UnifiedAutomation.UaServer.xml

BIN
obj/Release/Lesson03_VS2015.csprojAssemblyReference.cache


BIN
obj/Release/ServerLesson03.exe


+ 129 - 0
obj/Release/ServerLesson03.exe.config

@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<configuration>
+  <configSections>
+    <section name="UaApplicationConfiguration" type="UnifiedAutomation.UaBase.ApplicationConfigurationSection,UnifiedAutomation.UaBase"/>
+  </configSections>
+  <UaApplicationConfiguration>
+
+    <SecuredApplication xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://opcfoundation.org/UA/2011/03/SecuredApplication.xsd" xmlns:ua="http://opcfoundation.org/UA/2008/02/Types.xsd">
+
+      <!-- Identify the Application -->
+      <ApplicationName>UaServerNET</ApplicationName>
+      <ApplicationUri>urn:localhost:UnifiedAutomation:UaGettingStartedServerNet</ApplicationUri>
+      <ApplicationType>Server_0</ApplicationType>
+
+      <!-- Specify location of Certificates and Trust Lists -->
+      <ApplicationCertificate>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\own</StorePath>
+        <SubjectName>CN=GettingStartedServer/O=UnifiedAutomation/DC=localhost</SubjectName>
+        <ValidationOptions>0</ValidationOptions>
+      </ApplicationCertificate>
+      <TrustedCertificateStore>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\trusted</StorePath>
+        <ValidationOptions>0</ValidationOptions>
+      </TrustedCertificateStore>
+      <IssuerCertificateStore>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\issuers</StorePath>
+        <ValidationOptions>0</ValidationOptions>
+      </IssuerCertificateStore>
+      <RejectedCertificatesStore>
+        <StoreType>Directory</StoreType>
+        <StorePath>%CommonApplicationData%\unifiedautomation\UaSdkNetBundleEval\pkiserver\rejected</StorePath>
+        <ValidationOptions>0</ValidationOptions>
+      </RejectedCertificatesStore>
+
+      <!-- Specify Endpoints the Server will use -->
+      <BaseAddresses>
+        <BaseAddress>opc.tcp://localhost:48030</BaseAddress>
+
+        <!--
+        Uncomment this line to enable the HTTPS based profiles.
+
+        This profile works but is not officially supported in this version of the SDK.
+        This is the HTTP based protocol that will be supported by embedded devices.
+
+        Enabling this profile requires that you have a HTTPS certificate issued by a certificate authority
+        in your root certificate store. You can create your own authority and add it to the root store or
+        you can use authorities like VeriSign or Thawte.
+        -->
+        <!--
+        <BaseAddress>https://localhost:48031/</BaseAddress>
+         -->
+
+        <!--
+        Uncomment this line to enable the WS-Secure Conversation based profiles.
+
+        This profile works but is not officially supported since it is not practical to support on embedded devices.
+        You should not enable this protocol unless you have an application that must support XML Web Services.
+        -->
+        <!--
+        <BaseAddress>http://localhost:48032/wssecurity/</BaseAddress>
+        -->
+      </BaseAddresses>
+
+      <!-- Specify the SecurityProfiles the Server supports -->
+      <SecurityProfiles>
+        <SecurityProfile>
+          <ProfileUri>http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256</ProfileUri>
+          <Enabled>true</Enabled>
+        </SecurityProfile>
+        <SecurityProfile>
+          <ProfileUri>http://opcfoundation.org/UA/SecurityPolicy#None</ProfileUri>
+          <Enabled>true</Enabled>
+        </SecurityProfile>
+      </SecurityProfiles>
+
+      <!-- Specify Configuration for Different Components (Can include 'YourCompany' Configuration) -->
+      <Extensions>
+
+        <!-- Specify the Trace settings for the Application -->
+        <Extension>
+          <TraceSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd" MasterTraceEnabled="false" DefaultTraceLevel="Info">
+            <TraceFile>%CommonApplicationData%\unifiedautomation\logs\UaSdkNetBundleEval\UaGettingStartedServerNet.log.txt</TraceFile>
+            <MaxEntriesPerLog>100000</MaxEntriesPerLog>
+            <MaxLogFileBackups>3</MaxLogFileBackups>
+            <ModuleSettings>
+              <ModuleTraceSettings ModuleName="UnifiedAutomation.Stack"/>
+              <ModuleTraceSettings ModuleName="UnifiedAutomation.Server"/>
+            </ModuleSettings>
+          </TraceSettings>
+        </Extension>
+
+        <!-- Specify Settings when EXE is run with the /install argument -->
+        <Extension>
+          <InstallationSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <GenerateCertificateIfNone>true</GenerateCertificateIfNone>
+            <DeleteCertificateOnUninstall>true</DeleteCertificateOnUninstall>
+          </InstallationSettings>
+        </Extension>
+
+        <!-- Specify Settings for the ServerManager -->
+        <Extension>
+          <ServerSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <ProductName>UnifiedAutomation GettingStartedServer</ProductName>
+            <DiscoveryRegistration>
+              <Enabled>false</Enabled>
+            </DiscoveryRegistration>
+          </ServerSettings>
+        </Extension>
+
+        <Extension>
+          <SessionSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <MaxSessionCount>100</MaxSessionCount>
+          </SessionSettings>
+        </Extension>
+
+        <!-- Specify Settings for the SubscriptionManager -->
+        <Extension>
+          <SubscriptionSettings xmlns="http://unifiedautomation.com/schemas/2011/12/Application.xsd">
+            <MaxSubscriptionCount>500</MaxSubscriptionCount>
+          </SubscriptionSettings>
+        </Extension>
+
+      </Extensions>
+    </SecuredApplication>
+  </UaApplicationConfiguration>
+</configuration>

BIN
obj/Release/ServerLesson03.pdb


+ 0 - 0
obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs


+ 0 - 0
obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs


+ 0 - 0
obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs


BIN
obj/Release/UnifiedAutomation.UaBase.dll


File diff suppressed because it is too large
+ 139197 - 0
obj/Release/UnifiedAutomation.UaBase.xml


BIN
obj/Release/UnifiedAutomation.UaServer.dll


File diff suppressed because it is too large
+ 28415 - 0
obj/Release/UnifiedAutomation.UaServer.xml