using Opc.Ua;

namespace ZB.MOM.WW.OtOpcUa.Client.Shared.Models;

/// <summary>
///     Event data for a monitored data value change.
/// </summary>
public sealed class DataChangedEventArgs : EventArgs
{
    /// <summary>Initializes a new instance of the DataChangedEventArgs class.</summary>
    /// <param name="nodeId">The node ID that changed.</param>
    /// <param name="value">The new data value.</param>
    public DataChangedEventArgs(string nodeId, DataValue value)
    {
        NodeId = nodeId;
        Value = value;
    }

    /// <summary>The string representation of the node that changed.</summary>
    public string NodeId { get; }

    /// <summary>The new data value from the server.</summary>
    public DataValue Value { get; }
}