├── .gitignore ├── GettingStarted.md ├── LICENSE ├── README.md ├── cpp ├── Basic │ ├── Client.AE │ │ ├── AssemblyInfo.cpp │ │ ├── Client.AE.vcxproj │ │ ├── ObservedNode.hpp │ │ ├── ObservedNodeCollection.hpp │ │ ├── Observer.hpp │ │ └── Program.cpp │ ├── Client.Authentication │ │ ├── AssemblyInfo.cpp │ │ ├── Client.Authentication.vcxproj │ │ └── Program.cpp │ ├── Client.Browsing │ │ ├── AssemblyInfo.cpp │ │ ├── Client.Browsing.vcxproj │ │ └── Program.cpp │ ├── Client.HDA │ │ ├── AssemblyInfo.cpp │ │ ├── Client.HDA.vcxproj │ │ └── Program.cpp │ └── Client │ │ ├── AssemblyInfo.cpp │ │ ├── Client.vcxproj │ │ └── Program.cpp ├── NuGetSurrogate.csproj ├── NuGetSurrogate.targets ├── Opc.UaFx.ClientSamples.sln └── Opc.UaFx.Samples.sln ├── cs ├── Basic │ ├── Client.AE │ │ ├── Client.AE.csproj │ │ ├── ObservedNode.cs │ │ ├── ObservedNodeCollection.cs │ │ └── Program.cs │ ├── Client.Authentication │ │ ├── Client.Authentication.csproj │ │ └── Program.cs │ ├── Client.Browsing │ │ ├── Client.Browsing.csproj │ │ └── Program.cs │ ├── Client.DataTypes │ │ ├── Client.DataTypes.csproj │ │ ├── Program.cs │ │ └── ServerDataTypes.cs │ ├── Client.EventTypes │ │ ├── Client.EventTypes.csproj │ │ ├── MachineJob.cs │ │ ├── MachineJobEvent.cs │ │ ├── MachineSetup.cs │ │ └── Program.cs │ ├── Client.HDA │ │ ├── Client.HDA.csproj │ │ └── Program.cs │ ├── Client.Methods │ │ ├── Client.Methods.csproj │ │ └── Program.cs │ ├── Client.Unity │ │ ├── .gitignore │ │ ├── Assets │ │ │ ├── OpcUaClientBehaviour.cs │ │ │ └── Scenes │ │ │ │ └── SampleScene.unity │ │ ├── Library │ │ │ ├── BuildSettings.asset │ │ │ ├── EditorSnapSettings.asset │ │ │ ├── EditorUserBuildSettings.asset │ │ │ ├── InspectorExpandedItems.asset │ │ │ ├── MonoManager.asset │ │ │ ├── SceneVisibilityState.asset │ │ │ └── SpriteAtlasDatabase.asset │ │ ├── Packages │ │ │ ├── manifest.json │ │ │ └── packages-lock.json │ │ ├── ProjectSettings │ │ │ ├── AudioManager.asset │ │ │ ├── ClusterInputManager.asset │ │ │ ├── DynamicsManager.asset │ │ │ ├── EditorBuildSettings.asset │ │ │ ├── EditorSettings.asset │ │ │ ├── GraphicsSettings.asset │ │ │ ├── InputManager.asset │ │ │ ├── NavMeshAreas.asset │ │ │ ├── PackageManagerSettings.asset │ │ │ ├── Physics2DSettings.asset │ │ │ ├── PresetManager.asset │ │ │ ├── ProjectSettings.asset │ │ │ ├── ProjectVersion.txt │ │ │ ├── QualitySettings.asset │ │ │ ├── TagManager.asset │ │ │ ├── TimeManager.asset │ │ │ ├── UnityConnectSettings.asset │ │ │ ├── VFXManager.asset │ │ │ ├── VersionControlSettings.asset │ │ │ └── XRSettings.asset │ │ └── README.md │ ├── Client │ │ ├── Client.csproj │ │ └── Program.cs │ ├── Server.AE │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.AE.csproj │ ├── Server.Authentication │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.Authentication.csproj │ ├── Server.DataTypes.Complex │ │ ├── MachineJob.cs │ │ ├── MachineJobNode.cs │ │ ├── MachineSetup.cs │ │ ├── MachineStatus.cs │ │ ├── ManufacturingOrder.cs │ │ ├── ManufacturingOrderNode.cs │ │ ├── OpcNodeExtensions.cs │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.DataTypes.Complex.csproj │ ├── Server.DataTypes │ │ ├── MachineJob.cs │ │ ├── MachineSetup.cs │ │ ├── MachineStatus.cs │ │ ├── ManufacturingOrder.cs │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.DataTypes.csproj │ ├── Server.EventTypes │ │ ├── MachineJob.cs │ │ ├── MachineJobEventNode.cs │ │ ├── MachineSetup.cs │ │ ├── MyNodeSet.xml │ │ ├── NodeManager.cs │ │ ├── Program.cs │ │ └── Server.EventTypes.csproj │ ├── Server.HDA.Sql │ │ ├── History.Modified.db │ │ ├── History.db │ │ ├── Program.cs │ │ ├── SampleHistorian.cs │ │ ├── SampleHistory.Repository.cs │ │ ├── SampleHistory.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.HDA.Sql.csproj │ ├── Server.HDA │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.HDA.csproj │ ├── Server.Methods │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.Methods.csproj │ ├── Server.NodeTypes │ │ ├── MyNodeSet.xml │ │ ├── NodeManager.cs │ │ ├── Nodes │ │ │ ├── MyComplexObjectNode.cs │ │ │ ├── MyComplexVariableNode.cs │ │ │ ├── MySimpleObjectNode.cs │ │ │ └── MySimpleVariableNode.cs │ │ ├── Program.cs │ │ └── Server.NodeTypes.csproj │ └── Server │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.csproj ├── Configuration │ ├── Client.ConfiguredViaCode │ │ ├── Client.ConfiguredViaCode.csproj │ │ └── Program.cs │ ├── Client.ConfiguredViaXml │ │ ├── App.config │ │ ├── Client.ConfiguredViaXml.csproj │ │ ├── ClientConfig.xml │ │ └── Program.cs │ ├── Server.ConfiguredViaCode │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.ConfiguredViaCode.csproj │ └── Server.ConfiguredViaXml │ │ ├── App.config │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ ├── Server.ConfiguredViaXml.csproj │ │ └── ServerConfig.xml ├── Nodes │ ├── Client.AnalogItemNode │ │ ├── Client.AnalogItemNode.csproj │ │ └── Program.cs │ ├── Client.DataTypeNode │ │ ├── Client.DataTypeNode.csproj │ │ └── Program.cs │ ├── Client.MethodNode │ │ ├── Client.MethodNode.csproj │ │ └── Program.cs │ ├── Server.AnalogItemNode │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.AnalogItemNode.csproj │ ├── Server.DataTypeNode │ │ ├── MachineStatus.cs │ │ ├── Program.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.DataTypeNode.csproj │ └── Server.MethodNode │ │ ├── Program.cs │ │ ├── SampleNodeManager.Commands.cs │ │ ├── SampleNodeManager.Delegates.cs │ │ ├── SampleNodeManager.Methods.cs │ │ ├── SampleNodeManager.cs │ │ └── Server.MethodNode.csproj ├── Opc.UaFx.ClientSamples.sln ├── Opc.UaFx.Samples.sln ├── Opc.UaFx.ServerSamples.sln ├── Platforms │ ├── Client.Uwp │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── Assets │ │ │ ├── Client.Uwp.pfx │ │ │ ├── LockScreenLogo.scale-200.png │ │ │ ├── SplashScreen.scale-200.png │ │ │ ├── Square150x150Logo.scale-200.png │ │ │ ├── Square44x44Logo.scale-200.png │ │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ │ ├── StoreLogo.png │ │ │ └── Wide310x150Logo.scale-200.png │ │ ├── Client.Uwp.csproj │ │ ├── Client.Uwp_TemporaryKey.pfx │ │ ├── MainPage.xaml │ │ ├── MainPage.xaml.cs │ │ ├── Package.appxmanifest │ │ └── Properties │ │ │ ├── AssemblyInfo.cs │ │ │ └── Default.rd.xml │ └── Client.Wpf │ │ ├── App.xaml │ │ ├── App.xaml.cs │ │ ├── AssemblyInfo.cs │ │ ├── Client.Wpf.csproj │ │ ├── ComponentModel │ │ ├── DelegateCommand.cs │ │ └── ViewModel.cs │ │ ├── MainView.xaml │ │ ├── MainView.xaml.cs │ │ └── MainViewModel.cs ├── Scenarios │ ├── App.LicenseUsage │ │ ├── App.LicenseUsage.csproj │ │ └── Program.cs │ ├── Client.Blazor │ │ ├── App.razor │ │ ├── Client.Blazor.csproj │ │ ├── MainLayout.razor │ │ ├── Pages │ │ │ ├── Index.razor │ │ │ └── _Host.cshtml │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── _Imports.razor │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ └── wwwroot │ │ │ └── css │ │ │ └── site.css │ ├── Client.ClientAddedNodesWithHistory │ │ ├── Client.ClientAddedNodesWithHistory.csproj │ │ └── Program.cs │ ├── Client.DynamicNamespaces │ │ ├── Client.DynamicNamespaces.csproj │ │ └── Program.cs │ ├── Client.GenericEvents │ │ ├── Client.GenericEvents.csproj │ │ ├── GenericEvent.cs │ │ └── Program.cs │ ├── Client.Localization │ │ ├── Client.Localization.csproj │ │ └── Program.cs │ ├── Client.NodeExplorer │ │ ├── Client.NodeExplorer.csproj │ │ ├── Form1.Designer.cs │ │ ├── Form1.cs │ │ ├── Form1.resx │ │ ├── Program.cs │ │ └── Resources │ │ │ ├── FolderNode.png │ │ │ ├── MethodNode.png │ │ │ ├── ObjectNode.png │ │ │ ├── PropertyNode.png │ │ │ └── VariableNode.png │ ├── Client.PackML │ │ ├── Client.PackML.csproj │ │ ├── Opc.Ua.PackML.NodeSet2Model.cs │ │ ├── PackML.cs │ │ └── Program.cs │ ├── Client.RecursiveSubscription │ │ ├── Client.RecursiveSubscription.csproj │ │ └── Program.cs │ ├── Client.SignalR │ │ ├── Client.SignalR.csproj │ │ ├── Program.cs │ │ ├── Properties │ │ │ └── launchSettings.json │ │ ├── SignalRHub.cs │ │ ├── Startup.cs │ │ ├── libman.json │ │ └── wwwroot │ │ │ └── index.html │ ├── Client.StateMachine │ │ ├── Client.StateMachine.csproj │ │ └── Program.cs │ ├── Client.Temperature │ │ ├── Client.Temperature.csproj │ │ └── Program.cs │ ├── Client.Umati.Legacy │ │ ├── Client.Umati.Legacy.csproj │ │ ├── MachineAlarmCondition.cs │ │ └── Program.cs │ ├── Client.Umati.MachineTool │ │ ├── Alert.cs │ │ ├── Client.Umati.MachineTool.csproj │ │ ├── MachineTool.cs │ │ └── Program.cs │ ├── Server.ClientAddedNodesWithHistory │ │ ├── NodeManager.cs │ │ ├── Program.cs │ │ └── Server.ClientAddedNodesWithHistory.csproj │ ├── Server.CustomFile │ │ ├── FtpFileInfo.cs │ │ ├── Program.cs │ │ └── Server.CustomFile.csproj │ ├── Server.DynamicNamespaces │ │ ├── NodeManager.cs │ │ ├── Program.cs │ │ └── Server.DynamicNamespaces.csproj │ ├── Server.DynamicNodes │ │ ├── NodeManager.cs │ │ ├── Program.cs │ │ └── Server.DynamicNodes.csproj │ ├── Server.LightweightEvents │ │ ├── Program.cs │ │ └── Server.LightweightEvents.csproj │ ├── Server.Localization │ │ ├── Program.cs │ │ └── Server.Localization.csproj │ ├── Server.NodeAccess │ │ ├── NodeManager.VariableNode.cs │ │ ├── NodeManager.cs │ │ ├── Program.cs │ │ ├── Server.NodeAccess.csproj │ │ └── SystemIdentity.cs │ ├── Server.NodeSet.PackML │ │ ├── NodeManager.cs │ │ ├── Opc.Ua.PackML.NodeSet2.xml │ │ ├── Opc.Ua.PackML.NodeSet2Model.cs │ │ ├── PackML.cs │ │ ├── PackMLAdminObject.cs │ │ ├── PackMLBaseObject.cs │ │ ├── PackMLBaseStateMachine.cs │ │ ├── PackMLStatusObject.cs │ │ ├── Program.cs │ │ ├── Server.NodeSet.PackML.csproj │ │ └── Server.NodeSet.PackML.sln │ ├── Server.NodeSet.Umati.Legacy │ │ ├── MachineToolAlarmConditionNode.cs │ │ ├── NodeManager.cs │ │ ├── Program.cs │ │ ├── Server.NodeSet.Umati.Legacy.csproj │ │ ├── umati-instances_EMO2019.xml │ │ └── umati_EMO2019.xml │ ├── Server.NodeSet.Umati.MachineTool │ │ ├── NodeManager.cs │ │ ├── NodeSets │ │ │ ├── MachineTool-Example.cs │ │ │ ├── Machinetool-Example.xml │ │ │ ├── Opc.Ua.Di │ │ │ │ ├── Opc.Ua.Di.NodeSet2.xml │ │ │ │ └── Opc.Ua.Di.cs │ │ │ ├── Opc.Ua.IA │ │ │ │ ├── Opc.Ua.IA.NodeSet2.xml │ │ │ │ └── Opc.Ua.IA.cs │ │ │ ├── Opc.Ua.MachineTool │ │ │ │ ├── Nodes │ │ │ │ │ ├── AlertNode.cs │ │ │ │ │ ├── MachineToolNode.cs │ │ │ │ │ ├── MessagesNode.cs │ │ │ │ │ └── NotificationNode.cs │ │ │ │ ├── Opc.Ua.MachineTool.NodeSet2.xml │ │ │ │ └── Opc.Ua.MachineTool.cs │ │ │ └── Opc.Ua.Machinery │ │ │ │ ├── Opc.Ua.Machinery.NodeSet2.xml │ │ │ │ └── Opc.Ua.Machinery.cs │ │ ├── Program.cs │ │ ├── Server.NodeSet.Umati.MachineTool.csproj │ │ └── Server.NodeSet.Umati.MachineTool.sln │ ├── Server.Playground │ │ ├── NodeManager.DataTypes.cs │ │ ├── NodeManager.Factories.cs │ │ ├── NodeManager.Handlers.cs │ │ ├── NodeManager.Methods.cs │ │ ├── NodeManager.Randomizers.cs │ │ ├── NodeManager.cs │ │ ├── Program.Playground.cs │ │ ├── Program.cs │ │ └── Server.Playground.csproj │ ├── Server.RecursiveSubscription │ │ ├── NodeManager.cs │ │ ├── Program.cs │ │ └── Server.RecursiveSubscription.csproj │ ├── Server.SignalR │ │ ├── Program.cs │ │ └── Server.SignalR.csproj │ ├── Server.SimaticNodeSet │ │ ├── NodeManager.cs │ │ ├── NodeSets │ │ │ ├── Opc.Ua.Di.NodeSet2.xml │ │ │ └── Server.SimaticNodeSet2.xml │ │ ├── Program.cs │ │ └── Server.SimaticNodeSet.csproj │ ├── Server.SimaticNodes │ │ ├── Program.cs │ │ ├── Server.SimaticNodes.csproj │ │ └── SimaticNodeIdFactory.cs │ ├── Server.StateMachine │ │ ├── Program.cs │ │ ├── SampleStateMachine.cs │ │ ├── SampleStates.cs │ │ └── Server.StateMachine.csproj │ ├── Server.Temperature │ │ ├── Program.cs │ │ └── Server.Temperature.csproj │ └── Server.UserIdentities │ │ ├── Program.cs │ │ ├── Server.UserIdentities.csproj │ │ ├── SubSystem │ │ ├── OpcSubSystemIdentity.cs │ │ └── OpcSubSystemImpersonationContext.cs │ │ └── Windows │ │ ├── OpcWindowsAccessControlList.cs │ │ ├── OpcWindowsIdentity.cs │ │ ├── OpcWindowsImpersonationContext.cs │ │ └── Platform │ │ ├── Advapi32.cs │ │ ├── Advapi32UnsafeNativeMethods.cs │ │ ├── Kernel32UnsafeNativeMethods.cs │ │ ├── LogonProvider.cs │ │ └── LogonType.cs └── Subscriptions │ ├── Client.BulkChanges.HiRes │ ├── Client.BulkChanges.HiRes.csproj │ └── Program.cs │ ├── Client.BulkChanges │ ├── Client.BulkChanges.csproj │ └── Program.cs │ ├── Client.HandshakeChanges │ ├── Client.HanshakeChanges.csproj │ └── Program.cs │ ├── Server.BulkChanges.HiRes │ ├── Program.cs │ └── Server.BulkChanges.HiRes.csproj │ ├── Server.BulkChanges │ ├── Program.cs │ └── Server.BulkChanges.csproj │ └── Server.HandshakeChanges │ ├── Program.cs │ └── Server.HandshakeChanges.csproj ├── lv └── Basic │ └── Client │ ├── Client.Block.png │ ├── Client.Front.png │ ├── Client.aliases │ ├── Client.lvlps │ ├── Client.lvproj │ ├── Main.vi │ └── README.md ├── lw └── Basic │ └── Client │ ├── Client.c │ ├── Client.cws │ ├── Client.prj │ ├── Opc.UaFx.Client.c │ ├── Opc.UaFx.Client.fp │ ├── Opc.UaFx.Client.h │ └── README.md ├── ps ├── Client.Temperature.ps1 └── Opc.UaFx.Client.Bootstrapper.ps1 └── vb ├── Basic ├── Client.AE │ ├── Client.AE.vbproj │ ├── ObservedNode.vb │ ├── ObservedNodeCollection.vb │ └── Program.vb ├── Client.Authentication │ ├── Client.Authentication.vbproj │ └── Program.vb ├── Client.Browsing │ ├── Client.Browsing.vbproj │ └── Program.vb ├── Client.DataTypes │ ├── Client.DataTypes.vbproj │ ├── Program.vb │ └── ServerDataTypes.dll ├── Client.EventTypes │ ├── Client.EventTypes.vbproj │ ├── MachineJob.vb │ ├── MachineJobEvent.vb │ ├── MachineSetup.vb │ └── Program.vb ├── Client.HDA │ ├── Client.HDA.vbproj │ └── Program.vb ├── Client │ ├── Client.vbproj │ └── Program.vb ├── Server.AE │ ├── Program.vb │ ├── SampleNodeManager.vb │ └── Server.AE.vbproj ├── Server.Authentication │ ├── Program.vb │ ├── SampleNodeManager.vb │ └── Server.Authentication.vbproj ├── Server.DataTypes │ ├── MachineJob.vb │ ├── MachineSetup.vb │ ├── MachineStatus.vb │ ├── ManufacturingOrder.vb │ ├── Program.vb │ ├── SampleNodeManager.vb │ └── Server.DataTypes.vbproj ├── Server.EventTypes │ ├── MachineJob.vb │ ├── MachineJobEventNode.vb │ ├── MachineSetup.vb │ ├── MyNodeSet.xml │ ├── NodeManager.vb │ ├── Program.vb │ └── Server.EventTypes.vbproj ├── Server.HDA.Sql │ ├── History.Modified.db │ ├── History.db │ ├── Program.vb │ ├── SampleHistorian.vb │ ├── SampleHistory.Repository.vb │ ├── SampleHistory.vb │ ├── SampleNodeManager.vb │ └── Server.HDA.Sql.vbproj ├── Server.HDA │ ├── Program.vb │ ├── SampleNodeManager.vb │ └── Server.HDA.vbproj ├── Server.NodeTypes │ ├── MyNodeSet.xml │ ├── NodeManager.vb │ ├── Nodes │ │ ├── MyComplexObjectNode.vb │ │ ├── MyComplexVariableNode.vb │ │ ├── MySimpleObjectNode.vb │ │ └── MySimpleVariableNode.vb │ ├── Program.vb │ └── Server.NodeTypes.vbproj └── Server │ ├── Program.vb │ ├── SampleNodeManager.vb │ └── Server.vbproj ├── Configuration ├── Client.ConfiguredViaCode │ ├── Client.ConfiguredViaCode.vbproj │ └── Program.vb ├── Client.ConfiguredViaXml │ ├── App.config │ ├── Client.ConfiguredViaXml.vbproj │ ├── ClientConfig.xml │ └── Program.vb ├── Server.ConfiguredViaCode │ ├── Program.vb │ ├── SampleNodeManager.vb │ └── Server.ConfiguredViaCode.vbproj └── Server.ConfiguredViaXml │ ├── App.config │ ├── Program.vb │ ├── SampleNodeManager.vb │ ├── Server.ConfiguredViaXml.vbproj │ └── ServerConfig.xml ├── Nodes ├── Client.AnalogItemNode │ ├── Client.AnalogItemNode.vbproj │ └── Program.vb ├── Client.DataTypeNode │ ├── Client.DataTypeNode.vbproj │ └── Program.vb ├── Server.AnalogItemNode │ ├── Program.vb │ ├── SampleNodeManager.vb │ └── Server.AnalogItemNode.vbproj └── Server.DataTypeNode │ ├── MachineStatus.vb │ ├── Program.vb │ ├── SampleNodeManager.vb │ └── Server.DataTypeNode.vbproj ├── Opc.UaFx.ClientSamples.sln ├── Opc.UaFx.Samples.sln ├── Opc.UaFx.ServerSamples.sln ├── Platforms └── Client.Wpf │ ├── App.config │ ├── Application.xaml │ ├── Application.xaml.vb │ ├── Client.Wpf.sln │ ├── Client.Wpf.vbproj │ ├── ComponentModel │ ├── DelegateCommand.vb │ └── ViewModel.vb │ ├── MainView.xaml │ ├── MainView.xaml.vb │ ├── MainViewModel.vb │ └── My Project │ ├── AssemblyInfo.vb │ ├── MyExtensions │ └── MyWpfExtension.vb │ ├── Resources.Designer.vb │ ├── Resources.resx │ ├── Settings.Designer.vb │ └── Settings.settings └── Scenarios ├── Client.NodeExplorer ├── App.config ├── Client.NodeExplorer.vbproj ├── Form1.Designer.vb ├── Form1.resx ├── Form1.vb ├── My Project │ ├── Application.Designer.vb │ ├── Application.myapp │ ├── AssemblyInfo.vb │ ├── Resources.Designer.vb │ ├── Resources.resx │ ├── Settings.Designer.vb │ └── Settings.settings └── Resources │ ├── FolderNode.png │ ├── MethodNode.png │ ├── ObjectNode.png │ ├── PropertyNode.png │ └── VariableNode.png ├── Client.Temperature ├── Client.Temperature.vbproj └── Program.vb ├── Server.NodeAccess ├── NodeManager.VariableNode.vb ├── NodeManager.vb ├── Program.vb └── Server.NodeAccess.vbproj ├── Server.SimaticNodes ├── Program.vb ├── Server.SimaticNodes.vbproj └── SimaticNodeIdFactory.vb └── Server.Temperature ├── Program.vb └── Server.Temperature.vbproj /GettingStarted.md: -------------------------------------------------------------------------------- 1 | # Getting started 2 | 3 | ## 1. Create Solution 4 | 5 | ```bash 6 | dotnet new sln 7 | 8 | mkdir ClientApp 9 | cd ClientApp 10 | dotnet new console 11 | dotnet add package Opc.UaFx.Client 12 | 13 | cd .. 14 | dotnet sln add ./ClientApp/ClientApp.csproj 15 | 16 | mkdir ServerApp 17 | cd ServerApp 18 | dotnet new console 19 | dotnet add package Opc.UaFx.Advanced 20 | 21 | cd .. 22 | dotnet sln add ./ServerApp/ServerApp.csproj 23 | 24 | ``` 25 | 26 | ## 2. Implement Server 27 | 28 | ```csharp 29 | var node = new OpcDataVariableNode("Hello", value: "Hello World!"); 30 | 31 | using (var server = new OpcServer(node)) { 32 | server.Start(); 33 | 34 | Console.Write("Started."); 35 | Console.ReadLine(); 36 | } 37 | ``` 38 | 39 | ## 3. Implement Client 40 | 41 | ```csharp 42 | using (var client = new OpcClient("opc.tcp://localhost:4840")) { 43 | client.Connect(); 44 | 45 | Console.Write(client.ReadNode("ns=2;s=Hello")); 46 | Console.ReadLine(); 47 | } 48 | ``` 49 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Traeger GmbH 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /cpp/Basic/Client.AE/AssemblyInfo.cpp: -------------------------------------------------------------------------------- 1 | 2 | using namespace System; 3 | using namespace System::Reflection; 4 | using namespace System::Runtime::CompilerServices; 5 | using namespace System::Runtime::InteropServices; 6 | using namespace System::Security::Permissions; 7 | 8 | [assembly:AssemblyTitleAttribute(L"Client.AE")]; 9 | [assembly:AssemblyDescriptionAttribute(L"")]; 10 | [assembly:AssemblyConfigurationAttribute(L"")]; 11 | [assembly:AssemblyCompanyAttribute(L"")]; 12 | [assembly:AssemblyProductAttribute(L"Client.AE")]; 13 | [assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2020")]; 14 | [assembly:AssemblyTrademarkAttribute(L"")]; 15 | [assembly:AssemblyCultureAttribute(L"")]; 16 | 17 | [assembly:AssemblyVersionAttribute("1.0.*")]; 18 | 19 | [assembly:ComVisible(false)]; 20 | 21 | [assembly:CLSCompliantAttribute(true)]; 22 | -------------------------------------------------------------------------------- /cpp/Basic/Client.AE/ObservedNodeCollection.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | #pragma once 3 | 4 | namespace AE 5 | { 6 | #include "ObservedNode.hpp" 7 | using namespace AE; 8 | 9 | using namespace System; 10 | using namespace System::Collections::ObjectModel; 11 | 12 | using namespace Opc::UaFx; 13 | using namespace Opc::UaFx::Client; 14 | 15 | ref class ObservedNodeCollection : public KeyedCollection 16 | { 17 | public: 18 | ObservedNodeCollection() 19 | : KeyedCollection() 20 | { 21 | } 22 | 23 | public: 24 | ObservedNode^ Add(OpcClient %client, OpcNodeId^ parentNodeId, String^ name) 25 | { 26 | auto item = gcnew ObservedNode(parentNodeId, name); 27 | item->Initialize(client); 28 | 29 | this->Add(item); 30 | return item; 31 | } 32 | 33 | protected: 34 | virtual String^ GetKeyForItem(ObservedNode^ item) override/*= KeyedCollection::GetKeyForItem*/ 35 | { 36 | return item->Id->ToString(OpcNodeIdFormat::Foundation); 37 | } 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /cpp/Basic/Client.AE/Program.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | #include "Observer.hpp" 4 | 5 | using namespace Opc::UaFx; 6 | using namespace Opc::UaFx::Client; 7 | 8 | using namespace AE; 9 | 10 | /// 11 | /// This sample demonstrates how to perform handling of Alarm + Events (AE) on the nodes 12 | /// provided by the OPC UA server. 13 | /// 14 | int main(array^ args) 15 | { 16 | //// If the server domain name does not match localhost just replace it 17 | //// e.g. with the IP address or name of the server machine. 18 | 19 | OpcClient client(L"opc.tcp://localhost:4840/SampleServer"); 20 | client.Connect(); 21 | 22 | Observer::Observe(client); 23 | client.Disconnect(); 24 | } 25 | -------------------------------------------------------------------------------- /cpp/Basic/Client.Authentication/AssemblyInfo.cpp: -------------------------------------------------------------------------------- 1 | 2 | using namespace System; 3 | using namespace System::Reflection; 4 | using namespace System::Runtime::CompilerServices; 5 | using namespace System::Runtime::InteropServices; 6 | using namespace System::Security::Permissions; 7 | 8 | [assembly:AssemblyTitleAttribute(L"Client.Authentication")]; 9 | [assembly:AssemblyDescriptionAttribute(L"")]; 10 | [assembly:AssemblyConfigurationAttribute(L"")]; 11 | [assembly:AssemblyCompanyAttribute(L"")]; 12 | [assembly:AssemblyProductAttribute(L"Client.Authentication")]; 13 | [assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2020")]; 14 | [assembly:AssemblyTrademarkAttribute(L"")]; 15 | [assembly:AssemblyCultureAttribute(L"")]; 16 | 17 | [assembly:AssemblyVersionAttribute("1.0.*")]; 18 | 19 | [assembly:ComVisible(false)]; 20 | 21 | [assembly:CLSCompliantAttribute(true)]; 22 | -------------------------------------------------------------------------------- /cpp/Basic/Client.Authentication/Program.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | using namespace System; 4 | 5 | using namespace Opc::UaFx; 6 | using namespace Opc::UaFx::Client; 7 | 8 | 9 | /// 10 | /// This sample demonstrates how to authenticate at an OPC UA server using user name 11 | /// and password. 12 | /// 13 | int main(array^ args) 14 | { 15 | //// If the server domain name does not match localhost just replace it 16 | //// e.g. with the IP address or name of the server machine. 17 | 18 | OpcClient client(L"opc.tcp://localhost:4840/SampleServer"); 19 | 20 | // Just configure the OpcClient instance with an appropriate user identity with 21 | // the name of the user and its password to use to authenticate. 22 | client.Security->UserIdentity = gcnew OpcClientIdentity(L"username", L"password"); 23 | 24 | client.Connect(); 25 | Console::WriteLine(L"ReadNode: {0}", client.ReadNode(L"ns=2;s=Machine_1/IsActive")); 26 | 27 | try { 28 | client.WriteNode(L"ns=2;s=Machine_1/IsActive", false); 29 | } 30 | catch (Exception^ ex) { 31 | Console::WriteLine(ex->Message); 32 | } 33 | 34 | Console::WriteLine(L"ReadNode: {0}", client.ReadNode(L"ns=2;s=Machine_1/IsActive")); 35 | 36 | client.Disconnect(); 37 | Console::ReadKey(true); 38 | } 39 | -------------------------------------------------------------------------------- /cpp/Basic/Client.Browsing/AssemblyInfo.cpp: -------------------------------------------------------------------------------- 1 | 2 | using namespace System; 3 | using namespace System::Reflection; 4 | using namespace System::Runtime::CompilerServices; 5 | using namespace System::Runtime::InteropServices; 6 | using namespace System::Security::Permissions; 7 | 8 | [assembly:AssemblyTitleAttribute(L"Client.Browsing")]; 9 | [assembly:AssemblyDescriptionAttribute(L"")]; 10 | [assembly:AssemblyConfigurationAttribute(L"")]; 11 | [assembly:AssemblyCompanyAttribute(L"")]; 12 | [assembly:AssemblyProductAttribute(L"Client.Browsing")]; 13 | [assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2020")]; 14 | [assembly:AssemblyTrademarkAttribute(L"")]; 15 | [assembly:AssemblyCultureAttribute(L"")]; 16 | 17 | [assembly:AssemblyVersionAttribute("1.0.*")]; 18 | 19 | [assembly:ComVisible(false)]; 20 | 21 | [assembly:CLSCompliantAttribute(true)]; 22 | -------------------------------------------------------------------------------- /cpp/Basic/Client.HDA/AssemblyInfo.cpp: -------------------------------------------------------------------------------- 1 | 2 | using namespace System; 3 | using namespace System::Reflection; 4 | using namespace System::Runtime::CompilerServices; 5 | using namespace System::Runtime::InteropServices; 6 | using namespace System::Security::Permissions; 7 | 8 | [assembly:AssemblyTitleAttribute(L"Client.HDA")]; 9 | [assembly:AssemblyDescriptionAttribute(L"")]; 10 | [assembly:AssemblyConfigurationAttribute(L"")]; 11 | [assembly:AssemblyCompanyAttribute(L"")]; 12 | [assembly:AssemblyProductAttribute(L"Client.HDA")]; 13 | [assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2020")]; 14 | [assembly:AssemblyTrademarkAttribute(L"")]; 15 | [assembly:AssemblyCultureAttribute(L"")]; 16 | 17 | [assembly:AssemblyVersionAttribute("1.0.*")]; 18 | 19 | [assembly:ComVisible(false)]; 20 | 21 | [assembly:CLSCompliantAttribute(true)]; 22 | -------------------------------------------------------------------------------- /cpp/Basic/Client/AssemblyInfo.cpp: -------------------------------------------------------------------------------- 1 | 2 | using namespace System; 3 | using namespace System::Reflection; 4 | using namespace System::Runtime::CompilerServices; 5 | using namespace System::Runtime::InteropServices; 6 | using namespace System::Security::Permissions; 7 | 8 | [assembly:AssemblyTitleAttribute(L"Client")]; 9 | [assembly:AssemblyDescriptionAttribute(L"")]; 10 | [assembly:AssemblyConfigurationAttribute(L"")]; 11 | [assembly:AssemblyCompanyAttribute(L"")]; 12 | [assembly:AssemblyProductAttribute(L"Client")]; 13 | [assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2020")]; 14 | [assembly:AssemblyTrademarkAttribute(L"")]; 15 | [assembly:AssemblyCultureAttribute(L"")]; 16 | 17 | [assembly:AssemblyVersionAttribute("1.0.*")]; 18 | 19 | [assembly:ComVisible(false)]; 20 | 21 | [assembly:CLSCompliantAttribute(true)]; 22 | -------------------------------------------------------------------------------- /cpp/NuGetSurrogate.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | win-x86 4 | net471 5 | False 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /cpp/NuGetSurrogate.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildThisFileDirectory)packages\Opc.UaFx.Client\ 5 | 6 | 7 | 8 | 9 | OutDir=$(SurrogateOutDir) 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /cs/Basic/Client.AE/Client.AE.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Client.AE/ObservedNode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace AE 4 | { 5 | using Opc.UaFx; 6 | using Opc.UaFx.Client; 7 | 8 | internal class ObservedNode 9 | { 10 | public ObservedNode(OpcNodeId parentNodeId, string name) 11 | : base() 12 | { 13 | this.Id = OpcNodeId.Of(name, parentNodeId); 14 | this.Label = (name + ":").PadRight(16); 15 | } 16 | 17 | public OpcNodeId Id 18 | { 19 | get; 20 | } 21 | 22 | public OpcEvent Event 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | public string Label 29 | { 30 | get; 31 | } 32 | 33 | public OpcEngineeringUnitInfo Unit 34 | { 35 | get; 36 | private set; 37 | } 38 | 39 | public OpcValue Value 40 | { 41 | get; 42 | set; 43 | } 44 | 45 | 46 | public void Initialize(OpcClient client) 47 | { 48 | var node = client.BrowseNode(this.Id); 49 | var analogNode = node as OpcAnalogItemNodeInfo; 50 | 51 | if (analogNode != null) 52 | this.Unit = analogNode.EngineeringUnit; 53 | 54 | this.Value = client.ReadNode(this.Id); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /cs/Basic/Client.AE/ObservedNodeCollection.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace AE 4 | { 5 | using System.Collections.ObjectModel; 6 | 7 | using Opc.UaFx; 8 | using Opc.UaFx.Client; 9 | 10 | internal class ObservedNodeCollection : KeyedCollection 11 | { 12 | public ObservedNodeCollection() 13 | : base() 14 | { 15 | } 16 | 17 | public ObservedNode Add(OpcClient client, OpcNodeId parentNodeId, string name) 18 | { 19 | var item = new ObservedNode(parentNodeId, name); 20 | item.Initialize(client); 21 | 22 | this.Add(item); 23 | return item; 24 | } 25 | 26 | protected override string GetKeyForItem(ObservedNode item) 27 | { 28 | return item.Id.ToString(OpcNodeIdFormat.Foundation); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /cs/Basic/Client.Authentication/Client.Authentication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Client.Browsing/Client.Browsing.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Client.DataTypes/Client.DataTypes.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Client.EventTypes/Client.EventTypes.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Client.EventTypes/MachineJob.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace EventTypes 4 | { 5 | using Opc.UaFx; 6 | 7 | // Use the 'OpcDataTypeAttribute' to declare the type as a data type used in OPC UA as well. 8 | [OpcDataType("ns=1;s=MachineJob")] 9 | // Use the 'OpcDataTypeEncodingAttribute' to declare the type specific encoding of the data type. 10 | [OpcDataTypeEncoding("ns=1;s=MachineJob.Binary", Type = OpcEncodingType.Binary)] 11 | public class MachineJob 12 | { 13 | public string Number 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | public MachineSetup RequiredSetup 20 | { 21 | get; 22 | set; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /cs/Basic/Client.EventTypes/MachineJobEvent.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace EventTypes 4 | { 5 | using Opc.UaFx; 6 | 7 | [OpcEventType("ns=1;s=MachineJobEventType")] 8 | public class MachineJobEvent : OpcEvent 9 | { 10 | #region ---------- Public constructors ---------- 11 | 12 | public MachineJobEvent(IOpcReadOnlyNodeDataStore dataStore) 13 | : base(dataStore) 14 | { 15 | } 16 | 17 | #endregion 18 | 19 | #region ---------- Public properties ---------- 20 | 21 | public MachineJob Job 22 | { 23 | get => this.DataStore.Get($"1:{nameof(this.Job)}"); 24 | } 25 | 26 | #endregion 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /cs/Basic/Client.HDA/Client.HDA.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Client.Methods/Client.Methods.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/Library/BuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Basic/Client.Unity/Library/BuildSettings.asset -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/Library/EditorSnapSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13954, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_SnapEnabled: 0 16 | m_SnapSettings: 17 | m_SnapValue: {x: 0.25, y: 0.25, z: 0.25} 18 | m_SnapMultiplier: {x: 2048, y: 2048, z: 2048} 19 | m_Rotation: 15 20 | m_Scale: 1 21 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/Library/EditorUserBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Basic/Client.Unity/Library/EditorUserBuildSettings.asset -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/Library/InspectorExpandedItems.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Basic/Client.Unity/Library/InspectorExpandedItems.asset -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/Library/MonoManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Basic/Client.Unity/Library/MonoManager.asset -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/Library/SceneVisibilityState.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Basic/Client.Unity/Library/SceneVisibilityState.asset -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/Library/SpriteAtlasDatabase.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Basic/Client.Unity/Library/SpriteAtlasDatabase.asset -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ugui": "1.0.0", 4 | "com.unity.modules.ai": "1.0.0", 5 | "com.unity.modules.androidjni": "1.0.0", 6 | "com.unity.modules.animation": "1.0.0", 7 | "com.unity.modules.assetbundle": "1.0.0", 8 | "com.unity.modules.audio": "1.0.0", 9 | "com.unity.modules.cloth": "1.0.0", 10 | "com.unity.modules.director": "1.0.0", 11 | "com.unity.modules.imageconversion": "1.0.0", 12 | "com.unity.modules.imgui": "1.0.0", 13 | "com.unity.modules.jsonserialize": "1.0.0", 14 | "com.unity.modules.particlesystem": "1.0.0", 15 | "com.unity.modules.physics": "1.0.0", 16 | "com.unity.modules.physics2d": "1.0.0", 17 | "com.unity.modules.screencapture": "1.0.0", 18 | "com.unity.modules.terrain": "1.0.0", 19 | "com.unity.modules.terrainphysics": "1.0.0", 20 | "com.unity.modules.tilemap": "1.0.0", 21 | "com.unity.modules.ui": "1.0.0", 22 | "com.unity.modules.uielements": "1.0.0", 23 | "com.unity.modules.umbra": "1.0.0", 24 | "com.unity.modules.unityanalytics": "1.0.0", 25 | "com.unity.modules.unitywebrequest": "1.0.0", 26 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 27 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 28 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 29 | "com.unity.modules.unitywebrequestwww": "1.0.0", 30 | "com.unity.modules.vehicles": "1.0.0", 31 | "com.unity.modules.video": "1.0.0", 32 | "com.unity.modules.vr": "1.0.0", 33 | "com.unity.modules.wind": "1.0.0", 34 | "com.unity.modules.xr": "1.0.0" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 1024 20 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 1 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ContactPairsMode: 0 26 | m_BroadphaseType: 0 27 | m_WorldBounds: 28 | m_Center: {x: 0, y: 0, z: 0} 29 | m_Extent: {x: 250, y: 250, z: 250} 30 | m_WorldSubdivisions: 8 31 | m_FrictionType: 0 32 | m_EnableEnhancedDeterminism: 0 33 | m_EnableUnifiedHeightmaps: 1 34 | m_DefaultMaxAngluarSpeed: 7 35 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | m_configObjects: {} 9 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 11 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 0 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;rsp;asmref 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_SerializeInlineMappingsOnOneLine: 1 -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 0 16 | m_EnablePackageDependencies: 0 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 0 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | m_UserSelectedRegistryName: 28 | m_UserAddingNewScopedRegistry: 0 29 | m_RegistryInfoDraft: 30 | m_ErrorMessage: 31 | m_Original: 32 | m_Id: 33 | m_Name: 34 | m_Url: 35 | m_Scopes: [] 36 | m_IsDefault: 0 37 | m_Capabilities: 0 38 | m_Modified: 0 39 | m_Name: 40 | m_Url: 41 | m_Scopes: 42 | - 43 | m_SelectedScopeIndex: 0 44 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.3.15f2 2 | m_EditorVersionWithRevision: 2020.3.15f2 (6cf78cb77498) 3 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_DashboardUrl: https://dashboard.unity3d.com 13 | m_TestInitMode: 0 14 | CrashReportingSettings: 15 | m_EventUrl: https://perf-events.cloud.unity3d.com 16 | m_Enabled: 0 17 | m_LogBufferSize: 10 18 | m_CaptureEditorExceptions: 1 19 | UnityPurchasingSettings: 20 | m_Enabled: 0 21 | m_TestMode: 0 22 | UnityAnalyticsSettings: 23 | m_Enabled: 0 24 | m_TestMode: 0 25 | m_InitializeOnStartup: 1 26 | UnityAdsSettings: 27 | m_Enabled: 0 28 | m_InitializeOnStartup: 1 29 | m_TestMode: 0 30 | m_IosGameId: 31 | m_AndroidGameId: 32 | m_GameIds: {} 33 | m_GameId: 34 | PerformanceReportingSettings: 35 | m_Enabled: 0 36 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /cs/Basic/Client.Unity/README.md: -------------------------------------------------------------------------------- 1 | # Client.Unity Sample 2 | 3 | This sample project demonstrates how the OPC UA .NET SDK can be used in Unity to interact with an OPC UA Server. 4 | 5 | ## Requirements 6 | 7 | To get started with the sample you have to assure the following requirements are fulfilled: 8 | 9 | * at least Unity Hub v2.4.5 is installed 10 | * at least Unity v2020.3.15f2 is installed 11 | 12 | ## Getting started 13 | 14 | 1. Clone this repository 15 | 16 | 2. Start the Playground Server (./Scenarios/Server.Playground) using 17 | 18 | ```shell 19 | dotnet run --framework netcoreapp3.1 20 | ``` 21 | 22 | 3. Open the 'Client.Unity' project 23 | 24 | 4. Add the [Opc.UaFx.Client Unity Package](https://docs.traeger.de/en/software/sdk/opc-ua/net/start#download) 25 | 1. Choose the menu entry 'Assets > Import Package > Custom Package...' 26 | 2. Browse to the *.unitypackage file and click 'Open' 27 | 3. Keep every item in the package checked and click 'Import' 28 | 29 | 5. Open the 'SampleScene' in Unity (Assets/Scenes) 30 | 1. Select the UI element 'statusText' 31 | 2. Assign the script 'OpcUaClientBehaviour' in the inspector 32 | 33 | 6. Start the Unity Player 34 | -------------------------------------------------------------------------------- /cs/Basic/Client/Client.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Server.AE/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace AE 4 | { 5 | using System; 6 | using System.Threading; 7 | 8 | using Opc.UaFx.Server; 9 | 10 | /// 11 | /// This sample demonstrates how to setup an OPC UA server to provide AE to its 12 | /// nodes provided. 13 | /// 14 | public class Program 15 | { 16 | #region ---------- Public static methods ---------- 17 | 18 | public static void Main(string[] args) 19 | { 20 | var nodeManager = new SampleNodeManager(); 21 | 22 | // If the server domain name does not match localhost just replace it 23 | // e.g. with the IP address or name of the server machine. 24 | OpcServer server = new OpcServer( 25 | "opc.tcp://localhost:4840/SampleServer", 26 | nodeManager); 27 | 28 | server.Start(); 29 | //// NOTE: All AE specific code will be found in the SampleNodeManager.cs. 30 | 31 | using (var semaphore = new SemaphoreSlim(0)) { 32 | var thread = new Thread(() => nodeManager.Simulate(semaphore)); 33 | thread.Start(); 34 | 35 | Console.WriteLine("OPC UA Server is running..."); 36 | Console.ReadKey(true); 37 | 38 | semaphore.Release(); 39 | thread.Join(); 40 | 41 | server.Stop(); 42 | } 43 | } 44 | 45 | #endregion 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /cs/Basic/Server.AE/Server.AE.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Server.Authentication/Server.Authentication.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Server.DataTypes.Complex/MachineJob.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace DataTypes.Complex 4 | { 5 | using System; 6 | using Opc.UaFx; 7 | 8 | // Use the 'OpcDataTypeAttribute' to declare the type as a data type used in OPC UA as well. 9 | [OpcDataType("ns=2;s=MachineJob")] 10 | // Use the 'OpcDataTypeEncodingAttribute' to declare the type specific encoding of the data type. 11 | [OpcDataTypeEncoding("ns=2;s=MachineJob.Binary", Type = OpcEncodingType.Binary)] 12 | public class MachineJob 13 | { 14 | public string Number 15 | { 16 | get; 17 | set; 18 | } 19 | 20 | public int Duration 21 | { 22 | get; 23 | set; 24 | } 25 | 26 | public int EstimatedDuration 27 | { 28 | get; 29 | set; 30 | } 31 | 32 | public bool InProcess 33 | { 34 | get; 35 | set; 36 | } 37 | 38 | public MachineSetup RequiredSetup 39 | { 40 | get; 41 | set; 42 | } 43 | 44 | public DateTime ScheduleTime 45 | { 46 | get; 47 | set; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /cs/Basic/Server.DataTypes.Complex/MachineStatus.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace DataTypes.Complex 4 | { 5 | using Opc.UaFx; 6 | 7 | // Use the 'OpcDataTypeAttribute' to declare the type as a data type used in OPC UA as well. 8 | [OpcDataType("ns=2;s=MachineStatus")] 9 | public enum MachineStatus : int 10 | { 11 | Unknown = 0, 12 | Stopped = 1, 13 | Started = 2, 14 | 15 | // Use the 'OpcEnumMemberAttribute' to rename an enum member. 16 | [OpcEnumMember("Paused by Job")] 17 | WaitingForOrders = 3, 18 | 19 | // Use the 'OpcEnumMemberAttribute' to rename an enum member. 20 | [OpcEnumMember("Paused by Operator")] 21 | Suspended = 4, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /cs/Basic/Server.DataTypes.Complex/ManufacturingOrder.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace DataTypes.Complex 4 | { 5 | using System; 6 | using Opc.UaFx; 7 | 8 | // Use the 'OpcDataTypeAttribute' to declare the type as a data type used in OPC UA as well. 9 | [OpcDataType("ns=2;s=ManufacturingOrder")] 10 | [OpcDataTypeEncoding("ns=2;s=ManufacturingOrder.Binary", Type = OpcEncodingType.Binary)] 11 | public class ManufacturingOrder 12 | { 13 | private MachineJob[] jobs = new MachineJob[3]; 14 | 15 | 16 | public string Article 17 | { 18 | get; 19 | set; 20 | } 21 | 22 | public string Order 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | 29 | public int JobsLength 30 | { 31 | get => this.jobs.Length; 32 | set => Array.Resize(ref this.jobs, value); 33 | } 34 | 35 | // Use the 'OpcDataTypeMemberLengthAttribute' to define the length of a variable array 36 | // field using the value of another field. 37 | [OpcDataTypeMemberLength(nameof(JobsLength))] 38 | public MachineJob[] Jobs 39 | { 40 | get => this.jobs; 41 | set => this.jobs = value; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /cs/Basic/Server.DataTypes.Complex/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace DataTypes.Complex 4 | { 5 | using System; 6 | using Opc.UaFx.Server; 7 | 8 | /// 9 | /// This sample demonstrates how to setup an OPC UA server to provide nodes with 10 | /// custom data types which are supplied using subtrees there appropriate. 11 | /// 12 | public class Program 13 | { 14 | #region ---------- Public static methods ---------- 15 | 16 | public static void Main(string[] args) 17 | { 18 | // If the server domain name does not match localhost just replace it 19 | // e.g. with the IP address or name of the server machine. 20 | OpcServer server = new OpcServer( 21 | "opc.tcp://localhost:4840/SampleServer", 22 | new SampleNodeManager()); 23 | 24 | //// NOTE: All DataTypes specific code will be found in the SampleNodeManager.cs. 25 | server.Start(); 26 | 27 | Console.Write("Server started..."); 28 | Console.ReadKey(true); 29 | 30 | server.Stop(); 31 | } 32 | 33 | #endregion 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /cs/Basic/Server.DataTypes.Complex/Server.DataTypes.Complex.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 9.0 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Server.DataTypes/MachineStatus.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace DataTypes 4 | { 5 | using Opc.UaFx; 6 | 7 | // Use the 'OpcDataTypeAttribute' to declare the type as a data type used in OPC UA as well. 8 | [OpcDataType("ns=2;s=MachineStatus")] 9 | public enum MachineStatus : int 10 | { 11 | Unknown = 0, 12 | Stopped = 1, 13 | Started = 2, 14 | 15 | // Use the 'OpcEnumMemberAttribute' to rename an enum member. 16 | [OpcEnumMember("Paused by Job")] 17 | WaitingForOrders = 3, 18 | 19 | // Use the 'OpcEnumMemberAttribute' to rename an enum member. 20 | [OpcEnumMember("Paused by Operator")] 21 | Suspended = 4, 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /cs/Basic/Server.DataTypes/ManufacturingOrder.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace DataTypes 4 | { 5 | using System; 6 | using Opc.UaFx; 7 | 8 | // Use the 'OpcDataTypeAttribute' to declare the type as a data type used in OPC UA as well. 9 | [OpcDataType("ns=2;s=ManufacturingOrder")] 10 | [OpcDataTypeEncoding("ns=2;s=ManufacturingOrder.Binary", Type = OpcEncodingType.Binary)] 11 | public class ManufacturingOrder 12 | { 13 | private MachineJob[] jobs; 14 | 15 | 16 | public string Article 17 | { 18 | get; 19 | set; 20 | } 21 | 22 | public string Order 23 | { 24 | get; 25 | set; 26 | } 27 | 28 | 29 | public int JobsLength 30 | { 31 | get => this.jobs.Length; 32 | set => Array.Resize(ref this.jobs, value); 33 | } 34 | 35 | // Use the 'OpcDataTypeMemberLengthAttribute' to define the length of a variable array 36 | // field using the value of another field. 37 | [OpcDataTypeMemberLength(nameof(JobsLength))] 38 | public MachineJob[] Jobs 39 | { 40 | get => this.jobs; 41 | set => this.jobs = value; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /cs/Basic/Server.DataTypes/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace DataTypes 4 | { 5 | using System; 6 | using Opc.UaFx.Server; 7 | 8 | /// 9 | /// This sample demonstrates how to setup an OPC UA server to provide nodes with 10 | /// custom data types. 11 | /// 12 | public class Program 13 | { 14 | #region ---------- Public static methods ---------- 15 | 16 | public static void Main(string[] args) 17 | { 18 | // If the server domain name does not match localhost just replace it 19 | // e.g. with the IP address or name of the server machine. 20 | OpcServer server = new OpcServer( 21 | "opc.tcp://localhost:4840/SampleServer", 22 | new SampleNodeManager()); 23 | 24 | //// NOTE: All DataTypes specific code will be found in the SampleNodeManager.cs. 25 | server.Start(); 26 | 27 | Console.Write("Server started..."); 28 | Console.ReadKey(true); 29 | 30 | server.Stop(); 31 | } 32 | 33 | #endregion 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /cs/Basic/Server.DataTypes/Server.DataTypes.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /cs/Basic/Server.EventTypes/MachineJob.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace EventTypes 4 | { 5 | using Opc.UaFx; 6 | 7 | // Use the 'OpcDataTypeAttribute' to declare the type as a data type used in OPC UA as well. 8 | [OpcDataType("ns=1;s=MachineJob")] 9 | // Use the 'OpcDataTypeEncodingAttribute' to declare the type specific encoding of the data type. 10 | [OpcDataTypeEncoding("ns=1;s=MachineJob.Binary", Type = OpcEncodingType.Binary)] 11 | public class MachineJob 12 | { 13 | public string Number 14 | { 15 | get; 16 | set; 17 | } 18 | 19 | public MachineSetup RequiredSetup 20 | { 21 | get; 22 | set; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /cs/Basic/Server.EventTypes/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace EventTypes 4 | { 5 | using System; 6 | using Opc.UaFx.Server; 7 | 8 | /// 9 | /// This use case demonstrates how to import and implement custom node types using a nodeset. 10 | /// 11 | public class Program 12 | { 13 | #region ---------- Public static methods ---------- 14 | 15 | public static void Main(string[] args) 16 | { 17 | var manager = new NodeManager(); 18 | 19 | using (var server = new OpcServer("opc.tcp://localhost:4840/", manager)) { 20 | server.ApplicationUri = new Uri("http://sampleserver/sampleeventtypes"); 21 | server.Start(); 22 | 23 | Console.WriteLine("Server started - now subscribe to Machine node event 'MachineJobEventNode' and call method 'StartJob'."); 24 | Console.ReadLine(); 25 | } 26 | } 27 | 28 | #endregion 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cs/Basic/Server.EventTypes/Server.EventTypes.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 7.3 6 | 7 | 8 | 9 | 10 | 11 | 12 | Always 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /cs/Basic/Server.HDA.Sql/History.Modified.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Basic/Server.HDA.Sql/History.Modified.db -------------------------------------------------------------------------------- /cs/Basic/Server.HDA.Sql/History.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Basic/Server.HDA.Sql/History.db -------------------------------------------------------------------------------- /cs/Basic/Server.HDA.Sql/Server.HDA.Sql.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | PreserveNewest 13 | 14 | 15 | PreserveNewest 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /cs/Basic/Server.HDA/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace HDA 4 | { 5 | using System; 6 | using Opc.UaFx.Server; 7 | 8 | /// 9 | /// This sample demonstrates how to setup an OPC UA server to provide HDA to its 10 | /// nodes provided. 11 | /// 12 | public class Program 13 | { 14 | #region ---------- Public static methods ---------- 15 | 16 | public static void Main(string[] args) 17 | { 18 | // If the server domain name does not match localhost just replace it 19 | // e.g. with the IP address or name of the server machine. 20 | OpcServer server = new OpcServer( 21 | "opc.tcp://localhost:4840/SampleServer", 22 | new SampleNodeManager()); 23 | 24 | //// NOTE: All HDA specific code will be found in the SampleNodeManager.cs. 25 | 26 | server.Start(); 27 | Console.ReadKey(true); 28 | server.Stop(); 29 | } 30 | 31 | #endregion 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /cs/Basic/Server.HDA/Server.HDA.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Server.Methods/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace Methods 4 | { 5 | using System; 6 | 7 | using Opc.UaFx; 8 | using Opc.UaFx.Server; 9 | 10 | /// 11 | /// This sample demonstrates how to setup an OPC UA server to provide method nodes. 12 | /// 13 | public class Program 14 | { 15 | #region ---------- Public static methods ---------- 16 | 17 | public static void Main(string[] args) 18 | { 19 | // Async method execution can be globally enabled for every server and node manager. 20 | // This results into the use of one worker thread per method being called. Independent 21 | // whether the method is implemented using the TPL (using Tasks) or not. 22 | // By default only TPL methods are executed in parallel. 23 | ////OpcAutomatism.UseAsyncMethodCalls = true; 24 | 25 | // If the server domain name does not match localhost just replace it 26 | // e.g. with the IP address or name of the server machine. 27 | OpcServer server = new OpcServer( 28 | "opc.tcp://localhost:4840/SampleServer", 29 | new SampleNodeManager()); 30 | 31 | //// NOTE: All node specific code will be found in the SampleNodeManager.cs. 32 | 33 | server.Start(); 34 | 35 | Console.WriteLine("Started."); 36 | Console.ReadKey(true); 37 | 38 | server.Stop(); 39 | } 40 | 41 | #endregion 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /cs/Basic/Server.Methods/Server.Methods.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Basic/Server.NodeTypes/Nodes/MySimpleObjectNode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace NodeTypes 4 | { 5 | using Opc.UaFx; 6 | 7 | internal class MySimpleObjectNode : OpcObjectNode 8 | { 9 | #region ---------- Public constructors ---------- 10 | 11 | public MySimpleObjectNode(OpcName name) 12 | : base(name) 13 | { 14 | } 15 | 16 | public MySimpleObjectNode(IOpcNode parent, OpcName name) 17 | : base(parent, name) 18 | { 19 | } 20 | 21 | #endregion 22 | 23 | #region ---------- Protected properties ---------- 24 | 25 | protected override OpcNodeId DefaultTypeDefinitionId 26 | { 27 | get => "ns=1;s=MySimpleObjectType"; 28 | } 29 | 30 | #endregion 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cs/Basic/Server.NodeTypes/Nodes/MySimpleVariableNode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace NodeTypes 4 | { 5 | using Opc.UaFx; 6 | 7 | internal class MySimpleVariableNode : OpcDataVariableNode 8 | { 9 | #region ---------- Public constructors ---------- 10 | 11 | public MySimpleVariableNode(OpcName name, int value) 12 | : base(name, value) 13 | { 14 | } 15 | 16 | public MySimpleVariableNode(IOpcNode parent, OpcName name, int value) 17 | : base(parent, name, value) 18 | { 19 | } 20 | 21 | #endregion 22 | 23 | #region ---------- Protected properties ---------- 24 | 25 | protected override OpcNodeId DefaultTypeDefinitionId 26 | { 27 | get => "ns=1;s=MySimpleVariableType"; 28 | } 29 | 30 | #endregion 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /cs/Basic/Server.NodeTypes/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace NodeTypes 4 | { 5 | using System; 6 | using Opc.UaFx.Server; 7 | 8 | /// 9 | /// This use case demonstrates how to import and implement custom node types using a nodeset. 10 | /// 11 | public class Program 12 | { 13 | #region ---------- Public static methods ---------- 14 | 15 | public static void Main(string[] args) 16 | { 17 | var manager = new NodeManager(); 18 | 19 | using (var server = new OpcServer("opc.tcp://localhost:4840/", manager)) { 20 | server.ApplicationUri = new Uri("http://sampleserver/samplenodetypes"); 21 | server.Start(); 22 | 23 | Console.WriteLine("Server started - now browse the resulting nodes."); 24 | Console.ReadLine(); 25 | } 26 | } 27 | 28 | #endregion 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /cs/Basic/Server.NodeTypes/Server.NodeTypes.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 7.3 6 | 7 | 8 | 9 | 10 | 11 | 12 | Always 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /cs/Basic/Server/Server.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Configuration/Client.ConfiguredViaCode/Client.ConfiguredViaCode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Configuration/Client.ConfiguredViaXml/Client.ConfiguredViaXml.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Always 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /cs/Configuration/Server.ConfiguredViaCode/Server.ConfiguredViaCode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Configuration/Server.ConfiguredViaXml/Server.ConfiguredViaXml.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Always 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /cs/Nodes/Client.AnalogItemNode/Client.AnalogItemNode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Nodes/Client.DataTypeNode/Client.DataTypeNode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Nodes/Client.MethodNode/Client.MethodNode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Nodes/Server.AnalogItemNode/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace AnalogItemNode 4 | { 5 | using System; 6 | using Opc.UaFx.Server; 7 | 8 | /// 9 | /// This sample demonstrates how to setup an OPC UA server to provide nodes 10 | /// of the AnalogItemType. 11 | /// 12 | public class Program 13 | { 14 | #region ---------- Public static methods ---------- 15 | 16 | public static void Main(string[] args) 17 | { 18 | // If the server domain name does not match localhost just replace it 19 | // e.g. with the IP address or name of the server machine. 20 | OpcServer server = new OpcServer( 21 | "opc.tcp://localhost:4840/SampleServer", 22 | new SampleNodeManager()); 23 | 24 | //// NOTE: All node specific code will be found in the SampleNodeManager.cs. 25 | 26 | server.Start(); 27 | Console.ReadKey(true); 28 | server.Stop(); 29 | } 30 | 31 | #endregion 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /cs/Nodes/Server.AnalogItemNode/Server.AnalogItemNode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Nodes/Server.DataTypeNode/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace DataTypeNode 4 | { 5 | using System; 6 | using Opc.UaFx.Server; 7 | 8 | /// 9 | /// This sample demonstrates how to setup an OPC UA server to provide 10 | /// DataTypeNode nodes. 11 | /// 12 | public class Program 13 | { 14 | #region ---------- Public static methods ---------- 15 | 16 | public static void Main(string[] args) 17 | { 18 | // If the server domain name does not match localhost just replace it 19 | // e.g. with the IP address or name of the server machine. 20 | OpcServer server = new OpcServer( 21 | "opc.tcp://localhost:4840/SampleServer", 22 | new SampleNodeManager()); 23 | 24 | //// NOTE: All node specific code will be found in the SampleNodeManager.cs. 25 | 26 | server.Start(); 27 | Console.ReadKey(true); 28 | server.Stop(); 29 | } 30 | 31 | #endregion 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /cs/Nodes/Server.DataTypeNode/Server.DataTypeNode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Nodes/Server.MethodNode/Program.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace MethodNode 4 | { 5 | using System; 6 | using Opc.UaFx.Server; 7 | 8 | /// 9 | /// This sample demonstrates how to setup an OPC UA server to provide 10 | /// MethodNode nodes. 11 | /// 12 | public class Program 13 | { 14 | #region ---------- Public static methods ---------- 15 | 16 | public static void Main(string[] args) 17 | { 18 | // If the server domain name does not match localhost just replace it 19 | // e.g. with the IP address or name of the server machine. 20 | OpcServer server = new OpcServer( 21 | "opc.tcp://localhost:4840/SampleServer", 22 | new SampleNodeManager()); 23 | 24 | //// NOTE: All node specific code will be found in the SampleNodeManager.cs. 25 | 26 | server.Start(); 27 | 28 | Console.WriteLine("Started."); 29 | Console.ReadKey(true); 30 | 31 | server.Stop(); 32 | } 33 | 34 | #endregion 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /cs/Nodes/Server.MethodNode/SampleNodeManager.Delegates.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Traeger Industry Components GmbH. All Rights Reserved. 2 | 3 | namespace MethodNode 4 | { 5 | using Opc.UaFx; 6 | 7 | /// 8 | /// Defines some delegate types used by the . 9 | /// 10 | internal partial class SampleNodeManager 11 | { 12 | public delegate int AddDelegate(OpcMethodContext context, int a, int b); 13 | public delegate int MultiplyDelegate(int a, int b); 14 | 15 | public delegate void ProcessOutputsDelegate(out string value); 16 | public delegate string ProcessMultipleOutputsDelegate(out string value); 17 | 18 | public delegate void ProcessInOutputsDelegate(int count, out string value); 19 | public delegate void ProcessMultipleInOutputsDelegate( 20 | string first, 21 | string second, 22 | out string result, 23 | out int resultLength); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /cs/Nodes/Server.MethodNode/Server.MethodNode.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | Exe 4 | net46;net471;net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/Assets/Client.Uwp.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Platforms/Client.Uwp/Assets/Client.Uwp.pfx -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Platforms/Client.Uwp/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Platforms/Client.Uwp/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Platforms/Client.Uwp/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Platforms/Client.Uwp/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Platforms/Client.Uwp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Platforms/Client.Uwp/Assets/StoreLogo.png -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Platforms/Client.Uwp/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/Client.Uwp_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Traeger-GmbH/opcuanet-samples/b48d4f534c54557539feaf949ca160ec3d8ce936/cs/Platforms/Client.Uwp/Client.Uwp_TemporaryKey.pfx -------------------------------------------------------------------------------- /cs/Platforms/Client.Uwp/MainPage.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 33 | 34 |