Skip to content

Commit

Permalink
Merge pull request #246 from technosoftware-gmbh/master
Browse files Browse the repository at this point in the history
Updated to 2.3.3
  • Loading branch information
technosoftware authored Sep 22, 2024
2 parents 43d51c0 + 1fdf32a commit da4de84
Show file tree
Hide file tree
Showing 80 changed files with 3,141 additions and 1,353 deletions.
18 changes: 14 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

-------------------------------------------------------------------------------------------------------------
## OPC UA Solution .NET - 3.3.2

### Changes
- Updated to OPC UA Solution .NET 3.3.2

### Enhancements
- Improve reconnect


### Known Issues
- Synchronous Reconnect unstable

-------------------------------------------------------------------------------------------------------------
## OPC UA Solution .NET - 3.3.1

Expand Down Expand Up @@ -127,10 +140,7 @@
## OPC UA Solution .NET - 3.0.2

### Breaking Changes
- License
- A new license ist needed. Old licenses from 2.3 or earlier will no longer work with 3.0 and above.
- Product puchases from 2021 and 2022 can get a new license free of charge. Either through their online account or by sending us an Email.
- All others can order an OPC UA Support subscription incl. Update [here](https://technosoftware.com/product/opc-support-subscription-update/). Be aware that you need the original invoice as proof of your license.
- A new license ist needed. Old licenses from 2.3 or earlier will no longer work with 3.0 and above.
- removed support of .NET Core 3.1 because of end of life (see [here](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core))

### Changes
Expand Down
2 changes: 1 addition & 1 deletion NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Technosoftware SDK" value="./nuget/packages" />
<!-- <add key="Technosoftware SDK" value="./nuget/packages" /> -->
</packageSources>
<packageRestore>
<add key="enabled" value="True" />
Expand Down
42 changes: 35 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Technosoftware GmbH OPC UA Solution .NET

The OPC UA Solution .NET is the implementation for the
The OPC UA Solution .NET offers everything to be able to develop OPC UA Clients and OPC UA Servers with only one solution needed:

* [OPC UA Client .NET](https://technosoftware.com/opc-ua-client-net/)
* [OPC UA Server .NET](https://technosoftware.com/opc-ua-server-net/)
* [OPC UA Bundle .NET](https://technosoftware.com/product/opc-ua-bundle-net/)

## OPC UA Client .NET

Expand Down Expand Up @@ -59,7 +58,33 @@ You can also use the PDFs provided from our Workshop available [here](./Workshop
- The Redistributable of the OPC UA Local Discovery Server are available [here](https://opcfoundation.org/developer-tools/samples-and-tools-unified-architecture/local-discovery-server-lds/).
- We used the version 1.04.405 for our tests

## Available Support Subscriptions
## Purchasing

### Product license

A license must be purchased to enable all features. It is available via

* [OPC UA Bundle .NET](https://technosoftware.com/product/opc-ua-bundle-net/)

The license includes

* .NET 8.0, .NET 7.0, .NET 6.0, .NET 4.8 support.
* Software may be used by multiple developers of the Licensee’s organization.
* Any application developed with the solutions can be delivered to an unlimited number of customers (no royalties)

#### Updates

* Updates and fixes are delivered here free of charge, if/when they are made available. For all upcoming updates of 3.x or even upgrades to 4.x.
* This is valid for license purchases since 1-JAN-2021.
* All others can order an OPC UA Support subscription incl. Update [here](https://technosoftware.com/product/opc-support-subscription-update/). Be aware that you need the original invoice as proof of your license.

### Support

The product license does not include support, please be aware that there is no obligation that Technosoftware will provide free maintenance, support or training.

For technical support, direct Email contact or remote sessions you need to purchase either an OPC UA Support Subscription, a Support Email Incident or a Support or Consulting Hour first.

#### Support Subscriptions

Ideal for a corporation and a user of Technosoftware GmbH’s solutions on productive systems for which you want to get support for.
A Support subscriptions includes
Expand All @@ -69,11 +94,14 @@ A Support subscriptions includes

By purchasing support, you agree to our [Support Services Agreement](https://technosoftware.com/documents/Support_Services_Agreement.pdf).

The Support Subscription is available [here](https://technosoftware.com/opc-ua-support/).
The Support Subscription is available [here](https://technosoftware.com/product/opc-ua-support-subscription/).

#### Other Support Options

### Get Support for the Solution without a Support Subscription:
Support for the Solution without a Support Subscription is available as a paid service. Options available are:

Free of charge support for the Solution is available [here](https://github.com/technosoftware-gmbh/opcua-solution-net/issues).
* [Support Email Incident](https://technosoftware.com/product/support-email-incident/) handling a single question or a very specific issue about one of Technosoftware GmbH’s solutions.
* [Support or Consulting Hour](https://technosoftware.com/product/support-or-consulting-hour/) can involve application design or OPC related issues such as compatibility issues between server and clients, programming issues or design questions.

## Contribution

Expand Down
15 changes: 13 additions & 2 deletions Tests/Technosoftware.UaClient.Tests/ClientFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using System.Diagnostics;
using System.IO;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using NUnit.Framework;

using Opc.Ua;
Expand Down Expand Up @@ -346,6 +347,17 @@ public void SetTraceOutput(TextWriter writer)
}
}

/// <summary>
/// Adjust the Log level for the tracer
/// </summary>
public void SetTraceOutputLevel(LogLevel logLevel = LogLevel.Debug)
{
if(traceLogger_ != null)
{
traceLogger_.MinimumLogLevel = logLevel;
}
}

/// <summary>
/// Configures Activity Listener and registers with Activity Source.
/// </summary>
Expand Down Expand Up @@ -381,7 +393,6 @@ public void StartActivityListenerInternal(bool disableActivityLogging)
ActivitySource.AddActivityListener(ActivityListener);
}


/// <summary>
/// Disposes Activity Listener and unregisters from Activity Source.
/// </summary>
Expand All @@ -398,7 +409,7 @@ private void Session_KeepAlive(object sender, SessionKeepAliveEventArgs e)
var session = (IUaSession)sender;
if (ServiceResult.IsBad(e.Status))
{
session?.Dispose();
Utils.LogError("Session '{0}' keep alive error: {1}", session.SessionName, e.Status);
}
}
#endregion
Expand Down
3 changes: 2 additions & 1 deletion Tests/Technosoftware.UaClient.Tests/ClientTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -837,6 +837,7 @@ public void ReadPublicProperties()
TestContext.Out.WriteLine("SubscriptionCount: {0}", Session.SubscriptionCount);
TestContext.Out.WriteLine("DefaultSubscription: {0}", Session.DefaultSubscription);
TestContext.Out.WriteLine("LastKeepAliveTime: {0}", Session.LastKeepAliveTime);
TestContext.Out.WriteLine("LastKeepAliveTickCount: {0}", Session.LastKeepAliveTickCount);
TestContext.Out.WriteLine("KeepAliveInterval: {0}", Session.KeepAliveInterval);
Session.KeepAliveInterval += 1000;
TestContext.Out.WriteLine("KeepAliveInterval: {0}", Session.KeepAliveInterval);
Expand Down Expand Up @@ -1006,7 +1007,7 @@ public async Task BrowseFullAddressSpace(string securityPolicy, bool operationLi
}

var clientTestServices = new ClientTestServices(session);
ReferenceDescriptions = CommonTestWorkers.BrowseFullAddressSpaceWorker(clientTestServices, requestHeader, operationLimits ? OperationLimits : null);
ReferenceDescriptions = CommonTestWorkers.BrowseFullAddressSpaceWorker(clientTestServices, requestHeader, operationLimits ? OperationLimits : null, outputResult: true);

if (securityPolicy != null)
{
Expand Down
76 changes: 47 additions & 29 deletions Tests/Technosoftware.UaClient.Tests/ClientTestFramework.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using System.Threading;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
using Microsoft.Extensions.Logging;
using NUnit.Framework;
using Assert = NUnit.Framework.Legacy.ClassicAssert;

Expand Down Expand Up @@ -60,6 +61,7 @@ public class ClientTestFramework
public string UriScheme { get; private set; }
public string PkiRoot { get; set; }
public Uri ServerUrl { get; private set; }
public int ServerFixturePort { get; set; }
public ExpandedNodeId[] TestSetStatic { get; private set; }
public ExpandedNodeId[] TestSetSimulation { get; private set; }
public ExpandedNodeId[] TestSetDataSimulation { get; private set; }
Expand Down Expand Up @@ -96,7 +98,12 @@ public Task OneTimeSetUp()
/// Setup a server and client fixture.
/// </summary>
/// <param name="writer">The test output writer.</param>
public async Task OneTimeSetUpAsync(TextWriter writer = null, bool securityNone = false, bool enableTracing = false, bool disableActivityLogging = false)
public async Task OneTimeSetUpAsync(TextWriter writer = null,
bool securityNone = false,
bool enableClientSideTracing = false,
bool enableServerSideTracing = false,
bool disableActivityLogging = false
)
{
// pki directory root for test runs.
PkiRoot = Path.GetTempPath() + Path.GetRandomFileName();
Expand All @@ -123,35 +130,10 @@ public async Task OneTimeSetUpAsync(TextWriter writer = null, bool securityNone

if (customUrl == null)
{
// start Ref server
ServerFixture = new ServerFixture<ReferenceServer>(enableTracing, disableActivityLogging) {
UriScheme = UriScheme,
SecurityNone = securityNone,
AutoAccept = true,
AllNodeManagers = true,
OperationLimits = true,
MaxChannelCount = MaxChannelCount,
};

if (writer != null)
{
ServerFixture.TraceMasks = Utils.TraceMasks.Error | Utils.TraceMasks.Security;
await CreateReferenceServerFixture(enableServerSideTracing, disableActivityLogging, securityNone, writer).ConfigureAwait(false);
}

await ServerFixture.LoadConfiguration(PkiRoot).ConfigureAwait(false);
ServerFixture.Config.TransportQuotas.MaxMessageSize = TransportQuotaMaxMessageSize;
ServerFixture.Config.TransportQuotas.MaxByteStringLength =
ServerFixture.Config.TransportQuotas.MaxStringLength = TransportQuotaMaxStringLength;
ServerFixture.Config.ServerConfiguration.UserTokenPolicies.Add(new UserTokenPolicy(UserTokenType.UserName));
ServerFixture.Config.ServerConfiguration.UserTokenPolicies.Add(new UserTokenPolicy(UserTokenType.Certificate));
ServerFixture.Config.ServerConfiguration.UserTokenPolicies.Add(
new UserTokenPolicy(UserTokenType.IssuedToken) { IssuedTokenType = Opc.Ua.Profiles.JwtUserToken });

ReferenceServer = await ServerFixture.StartAsync(writer ?? TestContext.Out).ConfigureAwait(false);
ReferenceServer.TokenValidator = this.TokenValidator;
}

ClientFixture = new ClientFixture(enableTracing, disableActivityLogging);
ClientFixture = new ClientFixture(enableClientSideTracing, disableActivityLogging);

await ClientFixture.LoadClientConfiguration(PkiRoot).ConfigureAwait(false);
ClientFixture.Config.TransportQuotas.MaxMessageSize = TransportQuotaMaxMessageSize;
Expand All @@ -164,7 +146,7 @@ public async Task OneTimeSetUpAsync(TextWriter writer = null, bool securityNone
}
else
{
ServerUrl = new Uri(UriScheme + "://localhost:" + ServerFixture.Port.ToString(CultureInfo.InvariantCulture));
ServerUrl = new Uri(UriScheme + "://localhost:" + ServerFixturePort.ToString(CultureInfo.InvariantCulture));
}

if (SingleSession)
Expand All @@ -182,6 +164,42 @@ public async Task OneTimeSetUpAsync(TextWriter writer = null, bool securityNone
}
}

virtual public async Task CreateReferenceServerFixture(
bool enableTracing,
bool disableActivityLogging,
bool securityNone,
TextWriter writer)
{
{
// start Ref server
ServerFixture = new ServerFixture<ReferenceServer>(enableTracing, disableActivityLogging) {
UriScheme = UriScheme,
SecurityNone = securityNone,
AutoAccept = true,
AllNodeManagers = true,
OperationLimits = true
};
}

if (writer != null)
{
ServerFixture.TraceMasks = Utils.TraceMasks.Error | Utils.TraceMasks.Security;
}

await ServerFixture.LoadConfiguration(PkiRoot).ConfigureAwait(false);
ServerFixture.Config.TransportQuotas.MaxMessageSize = TransportQuotaMaxMessageSize;
ServerFixture.Config.TransportQuotas.MaxByteStringLength =
ServerFixture.Config.TransportQuotas.MaxStringLength = TransportQuotaMaxStringLength;
ServerFixture.Config.ServerConfiguration.UserTokenPolicies.Add(new UserTokenPolicy(UserTokenType.UserName));
ServerFixture.Config.ServerConfiguration.UserTokenPolicies.Add(new UserTokenPolicy(UserTokenType.Certificate));
ServerFixture.Config.ServerConfiguration.UserTokenPolicies.Add(
new UserTokenPolicy(UserTokenType.IssuedToken) { IssuedTokenType = Opc.Ua.Profiles.JwtUserToken });

ReferenceServer = await ServerFixture.StartAsync(writer ?? TestContext.Out).ConfigureAwait(false);
ReferenceServer.TokenValidator = this.TokenValidator;
ServerFixturePort = ServerFixture.Port;
}

/// <summary>
/// Tear down the Server and the Client.
/// </summary>
Expand Down
Loading

0 comments on commit da4de84

Please sign in to comment.