Class
Sealed
public sealed class DlmsClientOptions
Namespace: SharpMeter.Dlms
Configuration options for the DLMS client.
Properties
| Name | Description |
|---|---|
Authentication |
Gets or sets the authentication mechanism. |
ClientAddress |
Gets or sets the HDLC client address. |
MaxPduSize |
Gets or sets the maximum PDU size. |
Password |
Gets or sets the authentication password (for LLS/HLS). |
ResponseTimeoutMs |
Gets or sets the response timeout in milliseconds. |
ServerAddress |
Gets or sets the HDLC server (meter) address. |
Authentication
AuthenticationMechanism DlmsClientOptions.Authentication { get; set; }
Gets or sets the authentication mechanism.
ClientAddress
HdlcAddress DlmsClientOptions.ClientAddress { get; set; }
Gets or sets the HDLC client address.
MaxPduSize
ushort DlmsClientOptions.MaxPduSize { get; set; }
Gets or sets the maximum PDU size.
Password
byte[] DlmsClientOptions.Password { get; set; }
Gets or sets the authentication password (for LLS/HLS).
ResponseTimeoutMs
int DlmsClientOptions.ResponseTimeoutMs { get; set; }
Gets or sets the response timeout in milliseconds.
ServerAddress
HdlcAddress DlmsClientOptions.ServerAddress { get; set; }
Gets or sets the HDLC server (meter) address.
View Source
/// <summary>
/// Configuration options for the DLMS client.
/// </summary>
public sealed class DlmsClientOptions
{
#region Properties
/// <summary>Gets or sets the HDLC client address.</summary>
public HdlcAddress ClientAddress { get; set; } = HdlcAddress.PublicClient;
/// <summary>Gets or sets the HDLC server (meter) address.</summary>
public HdlcAddress ServerAddress { get; set; } = HdlcAddress.MeterServer;
/// <summary>Gets or sets the authentication mechanism.</summary>
public AuthenticationMechanism Authentication { get; set; } = AuthenticationMechanism.None;
/// <summary>Gets or sets the authentication password (for LLS/HLS).</summary>
[SuppressMessage("Performance", "CA1819:Properties should not return arrays", Justification = "Configuration DTO; array simplifies binary password handling.")]
public byte[] Password { get; set; } = [];
/// <summary>Gets or sets the response timeout in milliseconds.</summary>
public int ResponseTimeoutMs { get; set; } = 10000;
/// <summary>Gets or sets the maximum PDU size.</summary>
public ushort MaxPduSize { get; set; } = 65535;
#endregion
}