StartResponse.cs 670 B

123456789101112131415161718192021222324252627282930
  1. using Parser.BinaryParser.Attributes;
  2. using System;
  3. namespace HengShan_Pump_NonIC.MessageEntity
  4. {
  5. /// <summary>
  6. /// 0FFH+03H+0A5H+55H+校验
  7. /// 55H:成功,AA失败
  8. /// </summary>
  9. public class StartResponse : NonICMessageTemplateBase
  10. {
  11. public StartResponse()
  12. {
  13. //CMD = 0xE5;
  14. }
  15. [Format(1, EncodingType.BIN, 3)]
  16. public int result { get; set; }
  17. public Result EnumResult
  18. {
  19. get { return result == 0x55 ? Result.成功 : Result.失败; }
  20. set
  21. {
  22. result = (value == Result.成功) ? 0x55 : 0xAA;
  23. }
  24. }
  25. }
  26. }