Opc.UaFx.Client
2.20.4
.NET Core 3.1
.NET Standard 2.0
.NET Framework 4.6
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
Install-Package Opc.UaFx.Client -Version 2.20.4
dotnet add package Opc.UaFx.Client --version 2.20.4
<PackageReference Include="Opc.UaFx.Client" Version="2.20.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Opc.UaFx.Client --version 2.20.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Opc.UaFx.Client, 2.20.4"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Opc.UaFx.Client as a Cake Addin
#addin nuget:?package=Opc.UaFx.Client&version=2.20.4
// Install Opc.UaFx.Client as a Cake Tool
#tool nuget:?package=Opc.UaFx.Client&version=2.20.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Getting Started
The whole client development guides can be found here:
The most essential snippet to dig in:
using Opc.UaFx.Client;
...
using (var client = new OpcClient("opc.tcp://localhost:4840/")) {
client.Connect();
// Your code to interact with the server.
}
Let's Read a Node
OpcValue isRunning = client.ReadNode("ns=2;s=Machine/IsRunning");
More: Read Values of Node(s)
Let's Write a Node
OpcStatus result = client.WriteNode("ns=2;s=Machine/Job/Cancel", true);
More: Write Values of Node(s)
Let's Read a File Node
// All at once
string reportText = OpcFile.ReadAllText(client, "ns=2;s=Machine/Report");
// All via a stream
using (var stream = OpcFile.OpenRead(client, "ns=2;s=Machine/Report")) {
var reader = new StreamReader(stream);
while (!reader.EndOfStream)
Console.WriteLine(reader.ReadLine());
}
More: Working with File Nodes
Browse the Node Tree
// One node
OpcNodeInfo machineNode = client.BrowseNode("ns=2;s=Machine");
// A child node
OpcNodeInfo jobNode = machineNode.Child("Job");
// Some child nodes
foreach (var childNode in machineNode.Children()) {
// Your code to operate on each child node.
}
// Some node attributes
OpcAttributeInfo displayName = machineNode.Attribute(OpcAttribute.DisplayName);
foreach (var attribute in machineNode.Attributes()) {
// Your code to operate on each attribute.
}
More: Browsing Nodes
Observe some Alarm's and Event's
client.SubscribeEvent(OpcObjectTypes.Server, HandleGlobalEvents);
...
private static void HandleGlobalEvents(object sender, OpcEventReceivedEventArgs e)
{
Console.WriteLine(e.Event.Message);
}
More: Working with Events
Observe only Alarm's and Event's from interest
var severity = new OpcSimpleAttributeOperand(OpcEventTypes.Event, "Severity");
var conditionName = new OpcSimpleAttributeOperand(OpcEventTypes.Condition, "ConditionName");
var filter = OpcFilter.Using(client)
.FromEvents(OpcEventTypes.AlarmCondition)
.Where(severity > OpcEventSeverity.Medium & conditionName.Like("Temperature"))
.Select();
client.SubscribeEvent(OpcObjectTypes.Server, filter, HandleGlobalEvents);
More: Working with Events
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net46 net461 net462 net463 net47 net471 net472 net48 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- Microsoft.Win32.Registry (>= 4.7.0)
- Newtonsoft.Json (>= 12.0.3)
- Portable.BouncyCastle (>= 1.8.6)
- System.Management (>= 4.7.0)
- System.ServiceModel.Primitives (>= 4.5.3)
-
.NETFramework 4.6
- Newtonsoft.Json (>= 12.0.3)
- Portable.BouncyCastle (>= 1.8.6)
- System.Memory (>= 4.5.4)
- System.Net.Http (>= 4.3.4)
- System.ServiceModel.Primitives (>= 4.5.3)
- System.ValueTuple (>= 4.5.0)
-
.NETFramework 4.7.1
- Newtonsoft.Json (>= 12.0.3)
- Portable.BouncyCastle (>= 1.8.6)
- System.Memory (>= 4.5.4)
- System.ServiceModel.Primitives (>= 4.5.3)
-
.NETStandard 2.0
- Microsoft.Win32.Registry (>= 4.7.0)
- Newtonsoft.Json (>= 12.0.3)
- Portable.BouncyCastle (>= 1.8.6)
- System.Management (>= 4.7.0)
- System.Memory (>= 4.5.4)
- System.Reflection.Emit (>= 4.7.0)
- System.ServiceModel.Primitives (>= 4.5.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Opc.UaFx.Client:
Package | Downloads |
---|---|
Crosser.EdgeNode.Modules.Opc
Package Description |
|
OPCUA.Library
OPC UA library supporting OPC UA Client development for Xserver.IoT device. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
3.0.0-preview1-210917 | 444 | 9/17/2021 |
3.0.0-preview1 | 121 | 9/14/2021 |
2.26.0 | 810 | 4/13/2022 |
2.25.0 | 713 | 3/22/2022 |
2.24.0 | 364 | 3/9/2022 |
2.23.0 | 1,092 | 3/2/2022 |
2.22.0.1 | 491 | 2/25/2022 |
2.22.0 | 1,621 | 2/11/2022 |
2.21.0 | 843 | 2/1/2022 |
2.20.4 | 536 | 1/14/2022 |
2.20.3 | 1,019 | 1/4/2022 |
2.20.2 | 2,432 | 10/20/2021 |
2.20.1 | 435 | 10/8/2021 |
2.20.0 | 2,473 | 9/17/2021 |
2.19.2 | 994 | 9/10/2021 |
2.19.1 | 357 | 9/1/2021 |
2.19.0 | 381 | 8/27/2021 |
2.18.5 | 982 | 8/13/2021 |
2.18.4 | 203 | 8/9/2021 |
2.18.3 | 2,519 | 6/28/2021 |
2.18.2 | 272 | 6/17/2021 |
2.18.1 | 542 | 6/2/2021 |
2.18.0 | 866 | 5/26/2021 |
2.17.0 | 1,315 | 5/4/2021 |
2.16.1 | 336 | 4/21/2021 |
2.16.0 | 222 | 4/20/2021 |
2.15.0 | 518 | 4/1/2021 |
2.14.0 | 622 | 3/4/2021 |
2.13.0 | 406 | 3/1/2021 |
2.12.3 | 312 | 2/17/2021 |
2.12.2 | 2,516 | 2/15/2021 |
2.12.1 | 189 | 2/11/2021 |
2.12.0 | 582 | 2/4/2021 |
2.11.5 | 669 | 12/21/2020 |
2.11.4 | 279 | 12/15/2020 |
2.11.3.1 | 670 | 11/27/2020 |
2.11.3 | 364 | 11/23/2020 |
2.11.2 | 428 | 11/10/2020 |
2.11.1 | 332 | 11/5/2020 |
2.11.0 | 3,391 | 10/6/2020 |
2.10.0.3 | 992 | 9/11/2020 |
2.10.0.2 | 276 | 9/9/2020 |
2.10.0.1 | 675 | 7/15/2020 |
2.10.0 | 852 | 7/14/2020 |
2.9.2.1 | 3,440 | 5/8/2020 |
2.9.2 | 358 | 5/6/2020 |
2.9.1 | 395 | 4/22/2020 |
2.9.0 | 857 | 4/1/2020 |
2.8.3.1 | 4,788 | 1/24/2020 |
2.8.3 | 1,039 | 1/16/2020 |
2.8.2.1 | 700 | 12/13/2019 |
2.8.2 | 715 | 11/6/2019 |
2.8.1.3 | 557 | 10/24/2019 |
2.8.1.2 | 318 | 10/23/2019 |
2.8.1.1 | 434 | 10/11/2019 |
2.8.1 | 428 | 9/25/2019 |
2.8.0 | 387 | 9/18/2019 |
2.7.5.1 | 443 | 8/15/2019 |
2.7.5 | 367 | 8/13/2019 |
2.7.4 | 2,562 | 6/7/2019 |
2.7.3.1 | 418 | 5/23/2019 |
2.7.3 | 424 | 5/17/2019 |
2.7.2 | 409 | 5/10/2019 |
2.7.1.1 | 409 | 4/29/2019 |
2.7.1 | 706 | 3/25/2019 |
2.7.0 | 428 | 3/14/2019 |
2.6.0 | 650 | 2/20/2019 |
2.5.7 | 480 | 2/6/2019 |
2.5.6 | 5,759 | 10/19/2018 |
2.5.5 | 654 | 10/11/2018 |