diff --git a/src/Core/ZB.MOM.WW.OtOpcUa.Commons/Messages/Drivers/DriverHealthChanged.cs b/src/Core/ZB.MOM.WW.OtOpcUa.Commons/Messages/Drivers/DriverHealthChanged.cs new file mode 100644 index 00000000..dd941e23 --- /dev/null +++ b/src/Core/ZB.MOM.WW.OtOpcUa.Commons/Messages/Drivers/DriverHealthChanged.cs @@ -0,0 +1,23 @@ +namespace ZB.MOM.WW.OtOpcUa.Commons.Messages.Drivers; + +/// +/// Snapshot of a single driver instance's health, published to the +/// driver-health DistributedPubSub topic whenever a driver actor +/// transitions state or logs an error. Consumed by +/// DriverStatusSignalRBridge in the AdminUI for live status push. +/// +/// Cluster this driver belongs to. +/// Globally-unique driver instance ID. +/// DriverState enum as string (Healthy, Faulted, Reconnecting, etc.). +/// Most recent successful equipment read; null if never. +/// Latest error message; null when none. +/// Number of state-transitions into Faulted in the last 5 minutes. +/// Timestamp this snapshot was published. +public sealed record DriverHealthChanged( + string ClusterId, + string DriverInstanceId, + string State, + DateTime? LastSuccessfulReadUtc, + string? LastError, + int ErrorCount5Min, + DateTime PublishedUtc);