namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;
///
/// Optional driver capability for per-host connectivity reporting. Currently used by
/// the Galaxy driver (Platform / AppEngine ScanState) but generalized so future drivers
/// with multi-host topology (e.g. an OPC UA Client gateway proxying multiple upstream
/// servers) can opt in.
///
///
/// Per docs/v2/plan.md §5a — the Galaxy driver's GalaxyRuntimeProbeManager
/// becomes IHostConnectivityProbe after the v2 refactor.
///
public interface IHostConnectivityProbe
{
///
/// Snapshot of host-level connectivity. The Core uses this to drive Bad-quality
/// fan-out scoped to the affected host's subtree (not the whole driver namespace).
///
IReadOnlyList GetHostStatuses();
/// Fired when a host transitions Running ↔ Stopped (or similar lifecycle change).
event EventHandler? OnHostStatusChanged;
}
/// Per-host connectivity snapshot.
/// Driver-side host identifier (e.g. for Galaxy: Platform or AppEngine name).
/// Current state.
/// Timestamp of the last state transition.
public sealed record HostConnectivityStatus(
string HostName,
HostState State,
DateTime LastChangedUtc);
/// Event payload for .
public sealed record HostStatusChangedEventArgs(
string HostName,
HostState OldState,
HostState NewState);
/// Host lifecycle state. Generalization of Galaxy's Platform/Engine ScanState.
public enum HostState { Unknown, Running, Stopped, Faulted }