namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;
///
/// Optional driver capability — drivers whose backend has a native change signal
/// (Galaxy time_of_last_deploy, OPC UA server change notifications, TwinCAT
/// symbol-version-changed) implement this to tell Core when to re-run discovery.
///
///
/// Per docs/v2/plan.md decision #54 — static drivers (Modbus, S7, etc. whose tags
/// only change via a published config generation) don't implement IRediscoverable.
/// The Core just sees absence of the interface and skips change-detection wiring for that driver.
///
public interface IRediscoverable
{
///
/// Fired when the driver's backend signals that the address space may have changed.
/// The Core's response is to re-run and
/// diff the result against the current address space.
///
event EventHandler? OnRediscoveryNeeded;
}
/// Event payload for .
/// Driver-supplied reason string for the diagnostic log (e.g. "Galaxy time_of_last_deploy advanced", "TwinCAT symbol-version-changed 0x0702").
///
/// Optional hint about which subtree changed. Null means "the whole address space may have changed".
/// A non-null value (e.g. a folder path) lets the Core scope the rebuild surgically.
///
public sealed record RediscoveryEventArgs(string Reason, string? ScopeHint);