OutgoingMessageBase.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Edge.Core.Parser.BinaryParser.Attributes;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace VeederRoot_ATG_Console.MessageEntity.DispenserInterface.Outgoing
  6. {
  7. public abstract class OutgoingMessageBase : MessageBase
  8. {
  9. /// <summary>
  10. /// from 0 - 9, rotation control is needed, ASCII Decimal
  11. /// </summary>
  12. [Format(1, EncodingType.ASCII, -9700)]
  13. [Range(0, 9, "EventId must in range 0 to 9")]
  14. public int EventId { get; set; }
  15. /// <summary>
  16. /// Range: '00' to 'FF'
  17. /// Bit mapped errors where each active high bit represents an error condition,
  18. /// Bit Map: (MSB) 7 6 5 4 3 2 1 0 (LSB)
  19. /// Format: ASCII Hexadecimal.
  20. /// BIT ERROR
  21. /// 0 Data lost. (Queue overwrite.)
  22. /// 1-7 Reserved, should be 0.
  23. /// </summary>
  24. [Format(2, EncodingType.ASCII_PadLeftWithZero, -9600)]
  25. public byte ErrorFlag { get; set; }
  26. /// <summary>
  27. /// 0 to 9999, Number of seconds the event was delayed before it was transmitted.
  28. /// </summary>
  29. [Format(4, EncodingType.ASCII_PadLeftWithZero, -9500)]
  30. [Range(0, 9999, "SecondsDelay must in range 0 to 9999")]
  31. public int SecondsDelay { get; set; }
  32. /// <summary>
  33. /// 1 to 99, ASCII Decimal, Dispensing location identifier, Each position must have a unique identifier
  34. /// </summary>
  35. [Format(2, EncodingType.ASCII_PadLeftWithZero, -9400)]
  36. [Range(0, 99, "EventId must in range 0 to 99")]
  37. public byte FuelingPositionId { get; set; }
  38. //check sum 2bytes will be inserted in Parser
  39. }
  40. }