namespace ZB.MOM.WW.MxGateway.Worker.Ipc;

/// <summary>
/// Relative scheduling priority for an outbound worker frame. The single writer task drains all
/// pending <see cref="Control"/> frames before any <see cref="Event"/> frame, so a command reply,
/// fault, heartbeat, or shutdown acknowledgement is not delayed behind a backlog of queued events.
/// Priority only reorders the write; the frame sequence is stamped at actual write time,
/// so the on-wire order and the envelope <c>Sequence</c> always agree.
/// </summary>
public enum WorkerFrameWritePriority
{
    /// <summary>Control-plane frame (hello, ready, command reply, heartbeat, fault, shutdown ack). Written ahead of events.</summary>
    Control = 0,

    /// <summary>Event frame. Written only when no control frame is pending.</summary>
    Event = 1,
}
