终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

66 lines
2.0 KiB

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