Skip to content

Commit f19e841

Browse files
committed
remove System.Reactive
1 parent 11f54d9 commit f19e841

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Supports .NET Core, Universal Windows Platform (UWP), Windows Presentation Frame
1010

1111
### Getting Started
1212

13-
Install package ``Workstation.UaClient`` from [Nuget](https://www.nuget.org/packages/Workstation.UaClient/) to get the latest release for your hmi project.
13+
Install package ``Workstation.UaClient`` from [Nuget](https://www.nuget.org/packages/Workstation.UaClient/) to get the latest release for your HMI project.
1414

1515
Here's an example of reading the variable ``ServerStatus`` from a public OPC UA server.
1616

@@ -40,7 +40,7 @@ public class Program
4040
clientDescription,
4141
null, // no x509 certificates
4242
new AnonymousIdentity(), // no user identity
43-
"opc.tcp://opcua.rocks:4840", // the public endpoint of a server at opcua.rocks.
43+
"opc.tcp://opcua.demo-this.com:51210/UA/SampleServer", // the public endpoint
4444
SecurityPolicyUris.None); // no encryption
4545
try
4646
{
@@ -58,8 +58,8 @@ public class Program
5858
NodesToRead = new[] {
5959
// construct a ReadValueId from a NodeId and AttributeId.
6060
new ReadValueId {
61-
// you can parse the nodeId from a string.
62-
// e.g. NodeId.Parse("ns=2;s=Demo.Static.Scalar.Double")
61+
// you can parse the NodeId from a string.
62+
// e.g. NodeId.Parse("ns=2;i=10226")
6363
NodeId = NodeId.Parse(VariableIds.Server_ServerStatus),
6464
// variable class nodes have a Value attribute.
6565
AttributeId = AttributeIds.Value
@@ -83,22 +83,24 @@ public class Program
8383
Console.WriteLine($"\nClosing session '{channel.SessionId}'.");
8484
await channel.CloseAsync();
8585
}
86-
catch(Exception ex)
86+
catch (Exception ex)
8787
{
88-
await channel.AbortAsync();
88+
await channel.AbortAsync();
8989
Console.WriteLine(ex.Message);
9090
}
9191
}
9292
}
9393

9494
// Server status:
95-
// ProductName: open62541 OPC UA Server
96-
// SoftwareVersion: 1.0.0-rc5-52-g04067153-dirty
97-
// ManufacturerName: open62541
95+
// ProductName: OPC UA SDK Samples
96+
// SoftwareVersion: 1.2
97+
// ManufacturerName: OPC Foundation
9898
// State: Running
9999
100100
```
101101

102+
An example of subscribing for a variable by use of [System.Reactive](https://www.nuget.org/packages/System.Reactive/) can be found in our [sample repository](https://github.com/convertersystems/opc-ua-samples/tree/master/ConsoleApp/Program.cs#L122).
103+
102104
### Model, View, ViewModel (MVVM)
103105

104106
For HMI applications, you can use XAML bindings to connect your UI elements to live data.

UaClient.UnitTests/Workstation.UaClient.UnitTests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="7.0.0" />
3333
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
3434
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua" Version="1.4.371.50" />
35+
<PackageReference Include="System.Reactive" Version="5.0.0" />
3536
<PackageReference Include="xunit" Version="2.4.2" />
3637
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
3738
<PrivateAssets>all</PrivateAssets>

UaClient/Workstation.UaClient.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
<ItemGroup>
4343
<PackageReference Include="Microsoft.IO.RecyclableMemoryStream" Version="2.2.1" />
4444
<PackageReference Include="Portable.BouncyCastle" Version="1.9.0" />
45-
<PackageReference Include="System.Reactive" Version="5.0.0" />
4645
<PackageReference Include="System.Threading.Tasks.Dataflow" Version="7.0.0" />
4746
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
4847
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />

0 commit comments

Comments
 (0)