终端一体化运控平台
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

DrCoffeePackage.cs 2.1 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using BPASmartClient.Model.咖啡机.Enum;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Runtime.InteropServices;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace BPASmartClient.DRCoffee
  9. {
  10. /// <summary>
  11. /// Dr咖啡机基础协议
  12. /// </summary>
  13. [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
  14. public struct DrCoffeePackage
  15. {
  16. /// <summary>
  17. /// 包头(固定0x7E)
  18. /// </summary>
  19. public byte Header;
  20. /// <summary>
  21. /// 包长度: 固定为26个字节
  22. /// </summary>
  23. public byte Length;
  24. /// <summary>
  25. /// 警告(咖啡机负责写,工控机负责读)
  26. /// </summary>
  27. public DrCoffeeWarning Warning;
  28. /// <summary>
  29. /// 故障(咖啡机负责写,工控机负责读)
  30. /// </summary>
  31. public DrCoffeeFault Fault;
  32. /// <summary>
  33. /// 咖啡机状态(咖啡机负责写,工控机负责读)
  34. /// </summary>
  35. public DrCoffeeStatus Status;
  36. /// <summary>
  37. /// 通信指令(咖啡机负责读,工控机负责写)
  38. /// </summary>
  39. public DrCoffeeCommCmd CommCmd;
  40. /// <summary>
  41. /// 应用状态(咖啡机负责写,工控机负责读)
  42. /// </summary>
  43. public DrCoffeeAppStatus ApplicationStatus;
  44. /// <summary>
  45. /// 饮品编号(咖啡机负责读,工控机负责写)
  46. /// </summary>
  47. public DrCoffeeDrinksCode DrinksCode;
  48. /// <summary>
  49. /// 应用编号(咖啡机负责写,工控机负责读)
  50. /// </summary>
  51. public DrCoffeAppCode ApplicationCode;
  52. /// <summary>
  53. /// 预留
  54. /// </summary>
  55. public byte Retain;
  56. /// <summary>
  57. /// 校验和(除去包头包尾和校验和以外的 所有字节累加和的低字节)
  58. /// </summary>
  59. public byte CalcCode;
  60. /// <summary>
  61. /// 包尾(固定为0x7E)
  62. /// </summary>
  63. public byte End;
  64. }
  65. }