using Edge.Core.Parser.BinaryParser.Util; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Wayne_Pump_Dart.MessageEntity.Outgoing { public class RequestTotalVolumeCountersRequest : MessageBase { /// /// /// /// /// /// range from 0x01 to 0x08, 0x09 is asking for all nozzles public RequestTotalVolumeCountersRequest(byte address, byte blockSeqNumber, byte physicalNozzleNumber) { if (physicalNozzleNumber < 0x01 || physicalNozzleNumber > 0x09) throw new ArgumentException("logicalNozzleNumber must range from 0x01 to 0x09, but now is: 0x" + physicalNozzleNumber.ToString("X").PadLeft(2, '0')); base.Adrs = address; base.BlockSeqNumber = blockSeqNumber; base.ControlCharacter = ControlCharacter.DATA; base.TransactionDatas = new List() { new TransactionData() { TransactionNumber = 0x65, RawData = new List(){ physicalNozzleNumber } } }; } } }