| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- 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
- {
- /// <summary>
- ///
- /// </summary>
- /// <param name="volume">without decimal points, should >=0 and <=999999</param>
- /// <param name="amount">without decimal points, should >=0 and <=999999</param>
- /// <param name="gongJin">without decimal points, should >=0 and <=999999</param>
- /// <param name="price">without decimal points, should >=0 and <=999999</param>
- /// <param name="sequence">should >=0 and <=9999</param>
- 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; }
- }
- }
|