Enum
public enum ControlFlags

Namespace: SharpMeter.Core.Protocol

ANSI C12.18 L2 frame control byte flags.

Fields

NameDescription
MultiPacket static Indicates the first or continuation of a multi-packet transmission.
None static No flags set.
SinglePacket static Indicates this is a single-packet transmission.
ToggleBit static Toggle bit — alternates between frames for sequencing.

MultiPacket

MultiPacket = 128

Indicates the first or continuation of a multi-packet transmission.

None

None = 0

No flags set.

SinglePacket

SinglePacket = 64

Indicates this is a single-packet transmission.

ToggleBit

ToggleBit = 32

Toggle bit — alternates between frames for sequencing.

View Source
/// <summary>
///     ANSI C12.18 L2 frame control byte flags.
/// </summary>
[Flags]
[SuppressMessage("Design", "CA1028:Enum storage should be Int32", Justification = "Wire protocol requires byte for binary serialization.")]
[SuppressMessage("Naming", "CA1711:Identifiers should not have incorrect suffix", Justification = "This is a [Flags] enum representing protocol control flags.")]
public enum ControlFlags : byte
{
    /// <summary>No flags set.</summary>
    None = 0x00,
    /// <summary>Toggle bit — alternates between frames for sequencing.</summary>
    ToggleBit = 0x20,
    /// <summary>Indicates this is a single-packet transmission.</summary>
    SinglePacket = 0x40,
    /// <summary>Indicates the first or continuation of a multi-packet transmission.</summary>
    MultiPacket = 0x80
}
Was this page helpful?