/// /// Copyright (c) 2015 Sensus Metering Systems /// Author: Milan Hanajík /// using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TBF.BenchControl.WaterMeters.iPerl { public enum MessageID { Calibration = 0x00, /// Access to stCalibration Configuration = 0x01, /// Access to stConfig Status = 0x02, /// Access to stStaus, read only Power = 0x03, /// Access to stPower, containing power info from both processors LCD = 0x04, /// Access to stLCD EventData = 0x05, /// NOT USED IntervalData = 0x06, /// NOT USED Diagnostics = 0x07, /// Access tostMetroDiagArray, read onl MetrologyMemory = 0x08, /// Memory block access, read only Error_LongAck = 0x09, /// Error message Command = 0x0A, /// Command to execute, with no arguments Parameterizing = 0x0B, /// Parameterizing message is used in MCI-SPI interface only Error_ShortAck = 0x0C, /// Short acknowledge message is used in MCI-SPI interface only ChanelAlive = 0x0D, /// Channel alive message is used in MCI-SPI interface only RadioPassthrough = 0x0E, /// RFID <-> Metrology <-> Radio passthrough message ASICRegisterReadTest = 0x0F, /// ASIC Register read test IMIDebugMessagesAccess = 0x10, /// IMI debug messages read test ProductionChecksumsRead = 0x11, /// Production checksum read: Calibration (1 byte), Configuration (2 bytes), spare (4 bytes) HardwareParametersTest = 0x12, /// Hardware Parameters Testing: User configurable fixed field drive time (1 byte) /// /// Notes: /// 1. Short Ack message contains 1-byte error code and all the fields (Offset, Payload length, payload and password) will not be present. /// 2. Channel Alive message does not contain the fields (Offset, Payload length, payload and password). /// 3. Except the above two special messages, rest all the messages in the above table will follow the message format mentioned in sections 3.1 and 3.2. /// Count /// Number of MessageID-s } public enum MeterType : byte { DN15 = 0, CoaxManifold = 1, DN20 = 2, DN25 = 3, DN26 = 4, /// DN25* DN32 = 5, DN40 = 6, AutoDetect, Count /// Number of meter types } public enum VolumeUnits : byte { m3 = 0, UK_gallon = 1, US_gallon = 2, Count /// Number of volume units } public enum FlowArrow : byte { No = 0, Right = 1, Left = 2, Count /// Number of flow arrows } public enum MeterSealed : byte { InProduction = 0x00, OutOfProduction = 0xA5, Sealed = 0x5A, } public enum MeterState : byte { None = 0, Idle = 1, Active = 2, Test = 3, EndOfLife = 4, Count /// Number of meter states } public enum FlowState : byte { No = 0, Reverse = 1, Forward = 2, EmptyPipe = 3, Count /// Number of flow states } public enum OptoTelegramFlags : byte { OK = 0, OK_TestStart, OK_TestEnd, InvalidTelegram, /// Wrong telegram format of checksum error SyncError, } public enum OptoState { Read, Flush, } }