9cad9ed0fc
v2-ci / build (push) Failing after 41s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>/<param>/<returns>/<inheritdoc> where missing and removes project bookkeeping IDs (task/tracking refs) from shipped code comments, so the docs read cleanly and CommentChecker is quiet except for known false positives (PLC/protocol terms, event/IEqualityComparer inheritdoc). Doc/comment-only; no logic changed; solution builds clean.
47 lines
1.9 KiB
C#
47 lines
1.9 KiB
C#
namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;
|
|
|
|
/// <summary>
|
|
/// Health snapshot a driver returns to the Core. Drives the status dashboard,
|
|
/// ServiceLevel computation, and Bad-quality fan-out decisions.
|
|
/// </summary>
|
|
/// <param name="State">Current driver-instance state.</param>
|
|
/// <param name="LastSuccessfulRead">Timestamp of the most recent successful equipment read; null if never.</param>
|
|
/// <param name="LastError">
|
|
/// Most recent error message; null when no error has been recorded. The type makes no
|
|
/// guarantee about correlation with <paramref name="State"/> — a driver in
|
|
/// <see cref="DriverState.Healthy"/> may legitimately retain the last error from a recovered
|
|
/// failure (useful for diagnostics), and <see cref="DriverState.Degraded"/> /
|
|
/// <see cref="DriverState.Reconnecting"/> / <see cref="DriverState.Faulted"/> states may all
|
|
/// carry a non-null message. Callers must not key behaviour on the LastError-null ↔ Healthy
|
|
/// pairing.
|
|
/// </param>
|
|
public sealed record DriverHealth(
|
|
DriverState State,
|
|
DateTime? LastSuccessfulRead,
|
|
string? LastError);
|
|
|
|
/// <summary>Driver-instance lifecycle state.</summary>
|
|
public enum DriverState
|
|
{
|
|
/// <summary>Driver has not been initialized yet.</summary>
|
|
Unknown,
|
|
|
|
/// <summary>Driver is in the middle of <see cref="IDriver.InitializeAsync"/> or <see cref="IDriver.ReinitializeAsync"/>.</summary>
|
|
Initializing,
|
|
|
|
/// <summary>Driver is connected and serving data.</summary>
|
|
Healthy,
|
|
|
|
/// <summary>Driver is connected but reporting degraded data (e.g. some equipment unreachable, some tags Bad).</summary>
|
|
Degraded,
|
|
|
|
/// <summary>Driver lost connection to its data source; reconnecting in the background.</summary>
|
|
Reconnecting,
|
|
|
|
/// <summary>
|
|
/// Driver hit an unrecoverable error and stopped trying.
|
|
/// Operator must reinitialize via Admin UI; nodes report Bad quality.
|
|
/// </summary>
|
|
Faulted,
|
|
}
|