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:
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace ScadaLink.Commons.Types.DataConnections;
|
||||
|
||||
public enum OpcUaDeadbandType
|
||||
{
|
||||
Absolute,
|
||||
Percent
|
||||
}
|
||||
@@ -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; }
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace ScadaLink.Commons.Types.DataConnections;
|
||||
|
||||
public enum OpcUaTimestampsToReturn
|
||||
{
|
||||
Source,
|
||||
Server,
|
||||
Both
|
||||
}
|
||||
@@ -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; } = "";
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace ScadaLink.Commons.Types.DataConnections;
|
||||
|
||||
public enum OpcUaUserTokenType
|
||||
{
|
||||
Anonymous,
|
||||
UsernamePassword,
|
||||
X509Certificate
|
||||
}
|
||||
Reference in New Issue
Block a user