feat(commons): extend OpcUaEndpointConfig with auth, subscription tuning, read/filter knobs

Adds POCOs and enums for upcoming OPC UA editor expansion:
- OpcUaUserTokenType (Anonymous | UsernamePassword | X509Certificate)
- OpcUaUserIdentityConfig (TokenType + Username/Password + CertificatePath/Password)
- OpcUaDeadbandType (Absolute | Percent) + OpcUaDeadbandConfig
- OpcUaTimestampsToReturn (Source | Server | Both)

OpcUaEndpointConfig grows three new scalars (DiscardOldest, SubscriptionPriority,
SubscriptionDisplayName) plus optional UserIdentity and Deadband sub-objects.
Defaults preserve current runtime behavior (anonymous, no deadband, DiscardOldest=true).
This commit is contained in:
Joseph Doherty
2026-05-12 02:20:12 -04:00
parent 084da55ad6
commit 16f7ab0d0a
6 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
namespace ScadaLink.Commons.Types.DataConnections;
public sealed class OpcUaDeadbandConfig
{
public OpcUaDeadbandType Type { get; set; } = OpcUaDeadbandType.Absolute;
public double Value { get; set; } = 0.0;
}

View File

@@ -0,0 +1,7 @@
namespace ScadaLink.Commons.Types.DataConnections;
public enum OpcUaDeadbandType
{
Absolute,
Percent
}

View File

@@ -18,6 +18,16 @@ public sealed class OpcUaEndpointConfig
public int KeepAliveCount { get; set; } = 10;
public int LifetimeCount { get; set; } = 30;
public int MaxNotificationsPerPublish { get; set; } = 100;
public bool DiscardOldest { get; set; } = true;
public byte SubscriptionPriority { get; set; } = 0;
public string SubscriptionDisplayName { get; set; } = "ScadaLink";
// Read / filter
public OpcUaTimestampsToReturn TimestampsToReturn { get; set; } = OpcUaTimestampsToReturn.Source;
public OpcUaDeadbandConfig? Deadband { get; set; }
// Authentication (optional; null = anonymous)
public OpcUaUserIdentityConfig? UserIdentity { get; set; }
// Heartbeat (optional)
public OpcUaHeartbeatConfig? Heartbeat { get; set; }

View File

@@ -0,0 +1,8 @@
namespace ScadaLink.Commons.Types.DataConnections;
public enum OpcUaTimestampsToReturn
{
Source,
Server,
Both
}

View File

@@ -0,0 +1,10 @@
namespace ScadaLink.Commons.Types.DataConnections;
public sealed class OpcUaUserIdentityConfig
{
public OpcUaUserTokenType TokenType { get; set; } = OpcUaUserTokenType.Anonymous;
public string Username { get; set; } = "";
public string Password { get; set; } = "";
public string CertificatePath { get; set; } = "";
public string CertificatePassword { get; set; } = "";
}

View File

@@ -0,0 +1,8 @@
namespace ScadaLink.Commons.Types.DataConnections;
public enum OpcUaUserTokenType
{
Anonymous,
UsernamePassword,
X509Certificate
}