|
- using BPASmartClient.Model.咖啡机.Enum;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Runtime.InteropServices;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.DRCoffee
- {
- /// <summary>
- /// Dr咖啡机基础协议
- /// </summary>
- [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
- public struct DrCoffeePackage
- {
- /// <summary>
- /// 包头(固定0x7E)
- /// </summary>
- public byte Header;
- /// <summary>
- /// 包长度: 固定为26个字节
- /// </summary>
- public byte Length;
- /// <summary>
- /// 警告(咖啡机负责写,工控机负责读)
- /// </summary>
- public DrCoffeeWarning Warning;
- /// <summary>
- /// 故障(咖啡机负责写,工控机负责读)
- /// </summary>
- public DrCoffeeFault Fault;
- /// <summary>
- /// 咖啡机状态(咖啡机负责写,工控机负责读)
- /// </summary>
- public DrCoffeeStatus Status;
- /// <summary>
- /// 通信指令(咖啡机负责读,工控机负责写)
- /// </summary>
- public DrCoffeeCommCmd CommCmd;
- /// <summary>
- /// 应用状态(咖啡机负责写,工控机负责读)
- /// </summary>
- public DrCoffeeAppStatus ApplicationStatus;
- /// <summary>
- /// 饮品编号(咖啡机负责读,工控机负责写)
- /// </summary>
- public DrCoffeeDrinksCode DrinksCode;
- /// <summary>
- /// 应用编号(咖啡机负责写,工控机负责读)
- /// </summary>
- public DrCoffeAppCode ApplicationCode;
- /// <summary>
- /// 预留
- /// </summary>
- public byte Retain;
- /// <summary>
- /// 校验和(除去包头包尾和校验和以外的 所有字节累加和的低字节)
- /// </summary>
- public byte CalcCode;
- /// <summary>
- /// 包尾(固定为0x7E)
- /// </summary>
- public byte End;
- }
- }
|