namespace ZB.MOM.WW.OtOpcUa.Core.Abstractions;

/// <summary>
///     Driver-agnostic value snapshot returned by <see cref="IReadable"/> and pushed
///     by <see cref="ISubscribable.OnDataChange"/>. Mirrors the OPC UA <c>DataValue</c>
///     shape so the node-manager can pass through quality, source timestamp, and
///     server timestamp without translation.
/// </summary>
/// <param name="Value">The raw value; null when <see cref="StatusCode"/> indicates Bad.</param>
/// <param name="StatusCode">OPC UA status code (numeric value matches the OPC UA spec).</param>
/// <param name="SourceTimestampUtc">Driver-side timestamp when the value was sampled at the source. Null if unavailable.</param>
/// <param name="ServerTimestampUtc">Driver-side timestamp when the driver received / processed the value.</param>
public sealed record DataValueSnapshot(
    object? Value,
    uint StatusCode,
    DateTime? SourceTimestampUtc,
    DateTime ServerTimestampUtc);
