Files
2024-06-10 15:06:37 +02:00

147 lines
5.3 KiB
C#

namespace Common.Hardware.Interfaces.Protocols.SIRT.Payloads
{
using Common.Hardware.Interfaces.Ports.SIRT.Messages.Responses;
using System;
using System.Text;
public class Semi : FromAirResponse
{
public Semi(FromAirResponse response) : base(response)
{
var payload = this.Payload;
var index = 0;
this.ModuleAddress = BitConverter.ToUInt32(payload, index += 4);
this.DisplayVolume = BitConverter.ToUInt32(payload, index += 4);
this.Alarms = payload[index++];
this.PamStatus = payload[index++];
this.PamRssi = payload[index++];
this.MeterType = payload[index++];
this.TransmissionInterval = BitConverter.ToUInt16(payload, index += 2);
this.LATInterval = BitConverter.ToUInt16(payload, index += 2);
this.CurrentFlow = BitConverter.ToUInt16(payload, index += 2);
this.BackwardVolume = BitConverter.ToUInt32(payload, index += 4);
this.NumberOfDials = payload[index++];
this.Units = payload[index++];
this.MeterID = BitConverter.ToUInt32(payload, index += 4);
this.MBusStatus = payload[index++];
this.MBusTransmissionInterval = BitConverter.ToUInt16(payload, index += 2);
this.AlarmActiveInformation = payload[index++];
this.LeakageDetectionParameters = payload[index++];
this.BrokenPipeDetectionParameters = payload[index++];
this.BatteryRemaining = BitConverter.ToUInt16(payload, index += 2);
this.BatteryEndDetected = BitConverter.ToUInt16(payload, index += 2);
this.MaximumFlow = BitConverter.ToUInt16(payload, index += 2);
this.TimeOfMaximumFlow = BitConverter.ToUInt16(payload, index += 2);
this.LowBatteryDetected = BitConverter.ToUInt16(payload, index += 2);
this.LeakStart = BitConverter.ToUInt16(payload, index += 2);
this.LeakEnd = BitConverter.ToUInt16(payload, index += 2);
this.MagneticTamperStart = BitConverter.ToUInt16(payload, index += 2);
this.MagneticTamperEnd = BitConverter.ToUInt16(payload, index += 2);
this.ModuleRemoveStart = BitConverter.ToUInt16(payload, index += 2);
this.ModuleRemoveEnd = BitConverter.ToUInt16(payload, index += 2);
this.BackflowStart = BitConverter.ToUInt16(payload, index += 2);
this.BackflowEnd = BitConverter.ToUInt16(payload, index += 2);
this.BrokenPipeStart = BitConverter.ToUInt16(payload, index += 2);
this.BrokenPipeEnd = BitConverter.ToUInt16(payload, index += 2);
this.LogContent = BitConverter.ToUInt16(payload, index += 2);
this.LoggingInterval = BitConverter.ToUInt16(payload, index += 2);
this.FixedDateReadingContent = BitConverter.ToUInt16(payload, index += 2);
this.DayOfMonth = payload[index++];
this.ActualDateTime = BitConverter.ToUInt32(payload, index += 4);
this.HistoricalErrorLimit = payload[index++];
this.CustomerSpecificText = Encoding.ASCII.GetString(payload, index += 9, 9);
this.TimeOfFDRReset = BitConverter.ToUInt16(payload, index += 2);
this.TimeOfLogReset = BitConverter.ToUInt16(payload, index += 2);
this.MeterSize = payload[index++];
}
public UInt32 ModuleAddress { get; }
public UInt32 DisplayVolume { get; }
public Byte Alarms { get; }
public Byte PamStatus { get; }
public Byte PamRssi { get; }
public Byte MeterType { get; }
public UInt16 TransmissionInterval { get; }
public UInt16 LATInterval { get; }
public UInt16 CurrentFlow { get; }
public UInt32 BackwardVolume { get; }
public Byte NumberOfDials { get; }
public Byte Units { get; }
public UInt32 MeterID { get; }
public Byte MBusStatus { get; }
public UInt16 MBusTransmissionInterval { get; }
public Byte AlarmActiveInformation { get; }
public Byte LeakageDetectionParameters { get; }
public Byte BrokenPipeDetectionParameters { get; }
public UInt16 BatteryRemaining { get; }
public UInt16 BatteryEndDetected { get; }
public UInt16 MaximumFlow { get; }
public UInt16 TimeOfMaximumFlow { get; }
public UInt16 LowBatteryDetected { get; }
public UInt16 LeakStart { get; }
public UInt16 LeakEnd { get; }
public UInt16 MagneticTamperStart { get; }
public UInt16 MagneticTamperEnd { get; }
public UInt16 ModuleRemoveStart { get; }
public UInt16 ModuleRemoveEnd { get; }
public UInt16 BackflowStart { get; }
public UInt16 BackflowEnd { get; }
public UInt16 BrokenPipeStart { get; }
public UInt16 BrokenPipeEnd { get; }
public UInt16 LogContent { get; }
public UInt16 LoggingInterval { get; }
public UInt16 FixedDateReadingContent { get; }
public Byte DayOfMonth { get; }
public UInt32 ActualDateTime { get; }
public Byte HistoricalErrorLimit { get; }
public String CustomerSpecificText { get; }
public UInt16 TimeOfFDRReset { get; }
public UInt16 TimeOfLogReset { get; }
public Byte MeterSize { get; }
}
}