Enum
public enum ServiceCode

Namespace: SharpMeter.Core.Protocol

ANSI C12.18 Layer 7 service request codes.

Fields

NameDescription
Authenticate static Additional authentication.
Disconnect static Connection disconnect.
Identify static Session initiation — identifies the meter.
Logoff static User logoff.
Logon static User logon.
NegotiateBase static Baud rate negotiation base (add supported count).
ReadDefault static Read default table.
ReadFull static Read a complete table.
ReadIndex static Read by index.
ReadOffset static Read with byte offset and count (partial read).
Security static Security/password authentication.
Terminate static Session termination.
TimingSetup static Timing configuration setup.
Wait static Wait/keep-alive.
WriteFull static Write a complete table.
WriteIndex static Write by index.
WriteOffset static Write with byte offset (partial write).

Authenticate

Authenticate = 83

Additional authentication.

Disconnect

Disconnect = 34

Connection disconnect.

Identify

Identify = 32

Session initiation — identifies the meter.

Logoff

Logoff = 82

User logoff.

Logon

Logon = 80

User logon.

NegotiateBase

NegotiateBase = 96

Baud rate negotiation base (add supported count).

ReadDefault

ReadDefault = 62

Read default table.

ReadFull

ReadFull = 48

Read a complete table.

ReadIndex

ReadIndex = 49

Read by index.

ReadOffset

ReadOffset = 63

Read with byte offset and count (partial read).

Security

Security = 81

Security/password authentication.

Terminate

Terminate = 33

Session termination.

TimingSetup

TimingSetup = 113

Timing configuration setup.

Wait

Wait = 112

Wait/keep-alive.

WriteFull

WriteFull = 64

Write a complete table.

WriteIndex

WriteIndex = 65

Write by index.

WriteOffset

WriteOffset = 79

Write with byte offset (partial write).

View Source
/// <summary>
///     ANSI C12.18 Layer 7 service request codes.
/// </summary>
[SuppressMessage("Design", "CA1028:Enum storage should be Int32", Justification = "Wire protocol requires byte for binary serialization.")]
[SuppressMessage("Design", "CA1008:Enums should have zero value", Justification = "Protocol-defined values; 0x00 is not a valid service code.")]
public enum ServiceCode : byte
{
    /// <summary>Session initiation — identifies the meter.</summary>
    Identify = 0x20,
    /// <summary>Session termination.</summary>
    Terminate = 0x21,
    /// <summary>Connection disconnect.</summary>
    Disconnect = 0x22,
    /// <summary>Read a complete table.</summary>
    ReadFull = 0x30,
    /// <summary>Read by index.</summary>
    ReadIndex = 0x31,
    /// <summary>Read default table.</summary>
    ReadDefault = 0x3E,
    /// <summary>Read with byte offset and count (partial read).</summary>
    ReadOffset = 0x3F,
    /// <summary>Write a complete table.</summary>
    WriteFull = 0x40,
    /// <summary>Write by index.</summary>
    WriteIndex = 0x41,
    /// <summary>Write with byte offset (partial write).</summary>
    WriteOffset = 0x4F,
    /// <summary>User logon.</summary>
    Logon = 0x50,
    /// <summary>Security/password authentication.</summary>
    Security = 0x51,
    /// <summary>User logoff.</summary>
    Logoff = 0x52,
    /// <summary>Additional authentication.</summary>
    Authenticate = 0x53,
    /// <summary>Baud rate negotiation base (add supported count).</summary>
    NegotiateBase = 0x60,
    /// <summary>Wait/keep-alive.</summary>
    Wait = 0x70,
    /// <summary>Timing configuration setup.</summary>
    TimingSetup = 0x71
}
Was this page helpful?