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