Totalizer.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Edge.Core.Parser.BinaryParser.Attributes;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace HengshanPaymentTerminal.MessageEntity.Incoming
  6. {
  7. /// <summary>
  8. /// Full totalizer data returned by pump (or technically speaking, the terminal),
  9. /// which contains the volume accumulator and amount accumulator.
  10. /// </summary>
  11. public class Totalizer : CardMessageBase
  12. {
  13. #region Constructor
  14. public Totalizer() : base(Command.ReturnTotalizer)
  15. {
  16. }
  17. #endregion
  18. [Format(1, EncodingType.BIN, -90)]
  19. public byte NozzleCount { get; set; }
  20. [EnumerableFormat("NozzleCount", -89, EncodingType = EncodingType.BIN)]
  21. public List<TotalizerDatum> TotalizerData { get; set; }
  22. }
  23. public class TotalizerDatum
  24. {
  25. [Format(1, EncodingType.BIN, 1)]
  26. public byte NozzleNo { get; set; }
  27. [Format(4, EncodingType.HexString, 2)]
  28. public string VolumeTotal { get; set; }
  29. [Format(4, EncodingType.HexString, 3)]
  30. public string AmountTotal { get; set; }
  31. }
  32. }