namespace ZB.MOM.WW.OtOpcUa.Driver.TwinCAT;
///
/// Thrown by when the client refuses to register a
/// native notification for one tag — its declared type cannot decode the PLC symbol
/// (), or an array is too large for a native notification.
/// The driver isolates that one tag to (one WARN) and keeps the rest of the
/// subscription; the intent stays registered so the probe-tick retry re-checks it.
///
internal class TwinCATNotificationRefusedException : Exception
{
/// Initializes a new instance of the class.
/// The ADS symbol the tag names.
/// The one-line reason.
/// The OPC UA status the refused tag publishes.
public TwinCATNotificationRefusedException(string symbolPath, string reason, uint statusCode)
: base($"TwinCAT symbol '{symbolPath}': {reason}")
{
SymbolPath = symbolPath;
StatusCode = statusCode;
}
/// Gets the ADS symbol the refused tag names.
public string SymbolPath { get; }
/// Gets the OPC UA status the refused tag publishes.
public uint StatusCode { get; }
}