using Edge.Core.Parser.BinaryParser.Attributes; using Edge.Core.Parser.BinaryParser.Util; using System; using System.Collections.Generic; using System.Text; namespace Censtar_31064V105OrV106_Pump.MessageEntity.Outgoing { public class PresetAmountRequest : MessageBase { /// /// /// /// without decimal points, should >=0 and <=999999 /// without decimal points, should >=0 and <=999999 /// without decimal points, should >=0 and <=999999 /// without decimal points, should >=0 and <=999999 /// should >=0 and <=9999 public PresetAmountRequest(int volume, int amount, int gongJin, int price, int sequence) { base.Cmd = 0x02; this.Volume = volume; this.Amount = amount; this.GongJin = gongJin; this.Price = price; this.单价倒数 = 0; this.Flag = 0; this.SequenceNumber = sequence; } [Format(3, EncodingType.BCD, 0)] public int Volume { get; set; } [Format(3, EncodingType.BCD, 1)] public int Amount { get; set; } [Format(3, EncodingType.BCD, 2)] public int GongJin { get; set; } [Format(3, EncodingType.BCD, 3)] public int Price { get; set; } [Format(4, EncodingType.BCD, 4)] public int 单价倒数 { get; set; } [Format(1, EncodingType.BCD, 5)] public byte Flag { get; set; } [Format(2, EncodingType.BCD, 6)] public int SequenceNumber { get; set; } } }