From a2d6a4563f0f7cadcfe308606f229650efb8490f Mon Sep 17 00:00:00 2001
From: fyf <11621@LAPTOP-04QQU0AO>
Date: Tue, 19 Apr 2022 15:30:58 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=92=96=E5=95=A1=E6=9C=BA?=
=?UTF-8?q?=20=E5=86=B0=E6=B7=87=E6=B7=8BEvent,?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../BPASmartClient.DRCoffee.csproj | 1 +
BPASmartClient.DRCoffee/CoffeeMachine.cs | 44 ++++++++-
BPASmartClient.KLMCoffee/Protocal/BitValue.cs | 42 ++++++++
.../Protocal/FaultMessage.cs | 96 +++++++++++++++++++
.../Protocal/K95Command.cs | 11 +--
.../Protocal/K95SysTemStatus.cs | 25 +++++
.../Protocal/K95commandEnumExtensions.cs | 60 ++++++++++++
.../Protocal/MakeStatus.cs | 19 ++++
.../Protocal/SystemStatusModel.cs | 84 ++++++++++++++++
.../Protocal/TaskIndex.cs | 22 +++++
.../Protocal/UpkeepMessage.cs | 36 +++++++
.../BPASmartClient.Model.csproj | 4 +
.../冰淇淋/GSIceCreamEvent.cs | 38 ++++++++
BPASmartClient.Model/单片机/SCChipEvent.cs | 46 +++++++++
.../咖啡机/DRCoffeeEvent.cs | 45 +++++++++
.../咖啡机/KLMCoffeeEvent.cs | 46 +++++++++
BPASmartClient/DeviceInfo.xml | 4 +
17 files changed, 610 insertions(+), 13 deletions(-)
create mode 100644 BPASmartClient.KLMCoffee/Protocal/BitValue.cs
create mode 100644 BPASmartClient.KLMCoffee/Protocal/FaultMessage.cs
create mode 100644 BPASmartClient.KLMCoffee/Protocal/K95SysTemStatus.cs
create mode 100644 BPASmartClient.KLMCoffee/Protocal/MakeStatus.cs
create mode 100644 BPASmartClient.KLMCoffee/Protocal/SystemStatusModel.cs
create mode 100644 BPASmartClient.KLMCoffee/Protocal/TaskIndex.cs
create mode 100644 BPASmartClient.KLMCoffee/Protocal/UpkeepMessage.cs
create mode 100644 BPASmartClient.Model/冰淇淋/GSIceCreamEvent.cs
create mode 100644 BPASmartClient.Model/单片机/SCChipEvent.cs
create mode 100644 BPASmartClient.Model/咖啡机/DRCoffeeEvent.cs
create mode 100644 BPASmartClient.Model/咖啡机/KLMCoffeeEvent.cs
diff --git a/BPASmartClient.DRCoffee/BPASmartClient.DRCoffee.csproj b/BPASmartClient.DRCoffee/BPASmartClient.DRCoffee.csproj
index 1d904b63..8f4b204d 100644
--- a/BPASmartClient.DRCoffee/BPASmartClient.DRCoffee.csproj
+++ b/BPASmartClient.DRCoffee/BPASmartClient.DRCoffee.csproj
@@ -10,6 +10,7 @@
+
diff --git a/BPASmartClient.DRCoffee/CoffeeMachine.cs b/BPASmartClient.DRCoffee/CoffeeMachine.cs
index 95609276..e3e9b163 100644
--- a/BPASmartClient.DRCoffee/CoffeeMachine.cs
+++ b/BPASmartClient.DRCoffee/CoffeeMachine.cs
@@ -1,10 +1,13 @@
using BPASmartClient.DRCoffee;
+using BPASmartClient.EventBus;
using BPASmartClient.Helper;
+using BPASmartClient.Model;
using BPASmartClient.Peripheral;
using BPASmartClient.SerialPort;
using System;
using System.Collections.Generic;
using System.Threading;
+using static BPASmartClient.EventBus.EventBus;
namespace BPASmartClient.DRCoffee
{
@@ -13,7 +16,7 @@ namespace BPASmartClient.DRCoffee
///
public class CoffeeMachine: BasePeripheral
{
-
+ public Action PauseAsk { get; set; }
//通讯代理
SerialPortClient commProxy = null;
//数据仓库
@@ -70,9 +73,20 @@ namespace BPASmartClient.DRCoffee
///
public Action CoffeeAppStatusChanged;
+ private DrCoffeePackage drinksOrder = new DrCoffeePackage();
+
+ ///
+ /// 串口COM口
+ ///
+ public string PortName { get; set; }
+ ///
+ /// 串口波特率
+ ///
+ public string BaudRate { get; set; }
+
public CoffeeMachine()
{
- //commProxy = new SerialPortClient(portName, baud);
+ //
//commProxy.SetDataStorage(dataStorage);
//commandHandler.Init(commProxy);
//commandHandler.PauseAsk = delegate (bool pause)
@@ -86,6 +100,7 @@ namespace BPASmartClient.DRCoffee
///
public override void Start()
{
+ commProxy = new SerialPortClient(PortName,(BaudRates)Enum.Parse(typeof(BaudRates),BaudRate));
commProxy.Start();
running = true;
MainLoop();
@@ -155,12 +170,35 @@ namespace BPASmartClient.DRCoffee
protected override void InitStatus()
{
- throw new NotImplementedException();
+
}
public override void Init()
{
+ //咖博士咖啡机制作
+ EventBus.EventBus.GetInstance().Subscribe(DeviceId,delegate (IEvent @event,EventCallBackHandle callBack)
+ {
+ PauseAsk?.Invoke(true);
+ Thread.Sleep(200);
+ drinksOrder.CommCmd = DrCoffeeCommCmd.饮品制作指令;
+ //drinksOrder.DrinksCode = ((DRCoffee_MakeCoffeeEvent)@event).CommCmd;
+ commProxy.SendData(DrCoffee.Packe(drinksOrder));
+ Thread.Sleep(200);
+ PauseAsk?.Invoke(false);
+ });
+
+ //咖博士咖啡机取消制作咖啡
+ EventBus.EventBus.GetInstance().Subscribe(DeviceId,delegate (IEvent @event,EventCallBackHandle callBack)
+ {
+
+ });
+
+ //咖博士咖啡机模式设置
+ EventBus.EventBus.GetInstance().Subscribe(DeviceId,delegate (IEvent @event,EventCallBackHandle callBack)
+ {
+
+ });
}
}
}
diff --git a/BPASmartClient.KLMCoffee/Protocal/BitValue.cs b/BPASmartClient.KLMCoffee/Protocal/BitValue.cs
new file mode 100644
index 00000000..3a1d23bc
--- /dev/null
+++ b/BPASmartClient.KLMCoffee/Protocal/BitValue.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.KLMCoffee.Protocal
+{
+ public class BitValue
+ {
+ #region Byte位数据获取
+ ///
+ /// 7 6 5 4 3 2 1 0
+ ///
+ ///
+ ///
+ ///
+ public bool GetBitValue(byte value,byte bit)
+ {
+ return (value & (byte)Math.Pow(2,bit)) > 0 ? true : false;
+ }
+
+ ///
+ /// 设置某一位的值
+ ///
+ ///
+ /// 要设置的位, 值从低到高为 1-8
+ /// 要设置的值 true / false
+ ///
+ public byte SetBitValue(byte data,int index,bool flag)
+ {
+ if (!((index > 8 || index < 1)))
+ {
+ int v = index < 2 ? index : (2 << (index - 2));
+ return flag ? (byte)(data | v) : (byte)(data & ~v);
+ }
+ else
+ return data;
+ }
+ #endregion
+ }
+}
diff --git a/BPASmartClient.KLMCoffee/Protocal/FaultMessage.cs b/BPASmartClient.KLMCoffee/Protocal/FaultMessage.cs
new file mode 100644
index 00000000..2fb9f2d6
--- /dev/null
+++ b/BPASmartClient.KLMCoffee/Protocal/FaultMessage.cs
@@ -0,0 +1,96 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.KLMCoffee.Protocal
+{
+ public class FaultMessage :BitValue
+ {
+ ///
+ /// 蓄水盘没有安装
+ /// ///
+ public bool 安装蓄水盘 { get; set; }
+ ///
+ /// 水箱缺水
+ ///
+ public bool 水箱缺水 { get; set; }
+ ///
+ /// 磨豆异常,无豆检测有豆子,可能是磨豆少、磨豆机不转等问题。
+ ///
+ public bool 磨豆异常 { get; set; }
+ ///
+ /// 蓄水盘废水满
+ ///
+ public bool 蓄水盘满 { get; set; }
+ ///
+ /// 咖啡机满渣
+ ///
+ public bool 咖啡渣满 { get; set; }
+ ///
+ /// 系统缺水
+ ///
+ public bool 系统缺水 { get; set; }
+ ///
+ /// 冲泡器下压位置异常
+ ///
+ public bool 冲泡器故障L { get; set; }
+ ///
+ /// 冲泡器复位位置异常
+ ///
+ public bool 冲泡器故障H { get; set; }
+ ///
+ /// 咖啡机电热盘温度过高,高于设定上限温度
+ ///
+ public bool 高温报警 { get; set; }
+ ///
+ /// 咖啡机开机温度检测环境温度低于 0°。需要温度升到 1° C 以上才可以使用
+ ///
+ public bool 低温报警 { get; set; }
+ ///
+ /// NTC 损坏,阻值无穷大
+ ///
+ public bool ERROR2 { get; set; }
+ ///
+ /// 豆盒中没有豆了
+ ///
+ public bool 咖啡豆用尽 { get; set; }
+ ///
+ /// 电热盘保险丝烧断,加热 NTC 阻值无变化
+ /// ///
+ public bool ERROR1 { get; set; }
+ ///
+ /// 制作咖啡时管路压力过大
+ ///
+ public bool 压力过大 { get; set; }
+ ///
+ /// 连续 3 次系统补水,仍补不上水
+ ///
+ public bool ERROR6 { get; set; }
+ ///
+ /// A & B 中没有牛奶
+ ///
+ public bool 牛奶已用尽 { get; set; }
+
+ public FaultMessage(byte valueL,byte valueH)
+ {
+ 安装蓄水盘 = GetBitValue(valueL,0);
+ 水箱缺水 = GetBitValue(valueL,1);
+ 磨豆异常 = GetBitValue(valueL,2);
+ 蓄水盘满 = GetBitValue(valueL,3);
+ 咖啡渣满 = GetBitValue(valueL,4);
+ 系统缺水 = GetBitValue(valueL,5);
+ 冲泡器故障L = GetBitValue(valueL,6);
+ 冲泡器故障H = GetBitValue(valueL,7);
+ 高温报警 = GetBitValue(valueL,0);
+ 低温报警 = GetBitValue(valueH,1);
+ ERROR2 = GetBitValue(valueH,2);
+ 咖啡豆用尽 = GetBitValue(valueH,3);
+ ERROR1 = GetBitValue(valueH,4);
+ 压力过大 = GetBitValue(valueH,5);
+ ERROR6 = GetBitValue(valueH,6);
+ 牛奶已用尽 = GetBitValue(valueH,7);
+ }
+ }
+}
diff --git a/BPASmartClient.KLMCoffee/Protocal/K95Command.cs b/BPASmartClient.KLMCoffee/Protocal/K95Command.cs
index e1fe4b7e..b3ed5059 100644
--- a/BPASmartClient.KLMCoffee/Protocal/K95Command.cs
+++ b/BPASmartClient.KLMCoffee/Protocal/K95Command.cs
@@ -168,16 +168,7 @@ namespace BPASmartClient.KLMCoffee.Protocal
{
try
{
- if (string.IsNullOrEmpty(message) || message.Length < 21)
- return;
- //:010510000000000000000000F3A 10000000000000000000F
- string str = message.Trim().Substring(5,message.Trim().Length - 7); // 去掉字符串首尾处的空格
- string systemStatus = str.Substring(0,4);
- string makeStatus = str.Substring(4,4);
- string makeProgress = str.Substring(8,4);
- string makeProgress1 = str.Substring(12,4);
- string Error = str.Substring(16,4);
- string InFormation = str.Substring(20,1);
+ SystemStatusModel systemStatus = new SystemStatusModel(message);
}
catch (Exception)
{
diff --git a/BPASmartClient.KLMCoffee/Protocal/K95SysTemStatus.cs b/BPASmartClient.KLMCoffee/Protocal/K95SysTemStatus.cs
new file mode 100644
index 00000000..30ed9435
--- /dev/null
+++ b/BPASmartClient.KLMCoffee/Protocal/K95SysTemStatus.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.KLMCoffee.Protocal
+{
+ ///
+ /// 系统状态
+ ///
+ public enum K95SysTemStatus
+ {
+ 初始化状态,
+ 空闲状态,
+ 运行状态,
+ 关机状态,
+ 正在制作咖啡,
+ 冲泡器清洗和奶沫器清洗,
+ 冲泡器药片清洗,
+ 奶沫器药片清洗,
+ 除垢清洗,
+ 清空管路
+ }
+}
diff --git a/BPASmartClient.KLMCoffee/Protocal/K95commandEnumExtensions.cs b/BPASmartClient.KLMCoffee/Protocal/K95commandEnumExtensions.cs
index 944af4f4..5c8caa29 100644
--- a/BPASmartClient.KLMCoffee/Protocal/K95commandEnumExtensions.cs
+++ b/BPASmartClient.KLMCoffee/Protocal/K95commandEnumExtensions.cs
@@ -146,5 +146,65 @@ namespace BPASmartClient.KLMCoffee.Protocal
default: return "00";
}
}
+
+ ///
+ /// 获取系统状态枚举值
+ ///
+ ///
+ ///
+ public static string GetString(this K95SysTemStatus me)
+ {
+ switch (me)
+ {
+ case K95SysTemStatus.初始化状态: return "0";
+ case K95SysTemStatus.空闲状态: return "1";
+ case K95SysTemStatus.运行状态: return "2";
+ case K95SysTemStatus.关机状态: return "3";
+ case K95SysTemStatus.正在制作咖啡: return "8";
+ case K95SysTemStatus.冲泡器清洗和奶沫器清洗: return "9";
+ case K95SysTemStatus.冲泡器药片清洗: return "A";
+ case K95SysTemStatus.奶沫器药片清洗: return "B";
+ case K95SysTemStatus.除垢清洗: return "C";
+ case K95SysTemStatus.清空管路: return "D";
+ default: return "0";
+ }
+ }
+
+ ///
+ /// 获取饮品制作状态值
+ ///
+ ///
+ ///
+ public static string GetString(this MakeStatus me)
+ {
+ switch (me)
+ {
+ case MakeStatus.正在制作: return "0";
+ case MakeStatus.暂停: return "1";
+ case MakeStatus.取消: return "2";
+ case MakeStatus.完成: return "3";
+ default: return "0";
+ }
+ }
+
+ ///
+ /// 获取饮品制作状态值
+ ///
+ ///
+ ///
+ public static string GetString(this TaskIndex me)
+ {
+ switch (me)
+ {
+ case TaskIndex.无任务: return "0";
+ case TaskIndex.出咖啡: return "1";
+ case TaskIndex.出热水: return "2";
+ case TaskIndex.出牛奶: return "3";
+ case TaskIndex.出奶沫: return "4";
+ case TaskIndex.同时出: return "5";
+ case TaskIndex.磨豆: return "6";
+ default: return "0";
+ }
+ }
}
}
diff --git a/BPASmartClient.KLMCoffee/Protocal/MakeStatus.cs b/BPASmartClient.KLMCoffee/Protocal/MakeStatus.cs
new file mode 100644
index 00000000..4a4b6829
--- /dev/null
+++ b/BPASmartClient.KLMCoffee/Protocal/MakeStatus.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.KLMCoffee.Protocal
+{
+ ///
+ /// 饮品制作状态
+ ///
+ public enum MakeStatus
+ {
+ 正在制作,
+ 暂停,
+ 取消,
+ 完成
+ }
+}
diff --git a/BPASmartClient.KLMCoffee/Protocal/SystemStatusModel.cs b/BPASmartClient.KLMCoffee/Protocal/SystemStatusModel.cs
new file mode 100644
index 00000000..7702e89f
--- /dev/null
+++ b/BPASmartClient.KLMCoffee/Protocal/SystemStatusModel.cs
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.KLMCoffee.Protocal
+{
+ public class SystemStatusModel :BitValue
+ {
+ ///
+ /// 系统状态
+ ///
+ public K95SysTemStatus temStatus { get; set; }
+ ///
+ /// 饮品类型
+ ///
+ public DrinkType drinkType { get; set; }
+ ///
+ /// 制作状态
+ ///
+ public MakeStatus makeStatus { get; set; }
+ ///
+ /// 当前任务
+ ///
+ public TaskIndex taskIndex { get; set; }
+ ///
+ /// 当前进度 10%
+ ///
+ public int progress { get; set; }
+ ///
+ /// 故障信息
+ ///
+ public FaultMessage faultMessage { get; set; }
+ ///
+ /// 保养信息
+ ///
+ public UpkeepMessage upkeepMessage { get; set; }
+
+ public SystemStatusModel(string cmd)
+ {
+ // 去掉字符串首尾处的空格
+ if (string.IsNullOrEmpty(cmd) || cmd.Length < 21)
+ return;
+ string str = cmd.Trim().Substring(5,cmd.Trim().Length - 7).Replace(@"\R","").Replace("\r","").Replace(@"\n","").Replace(@"\N","");
+ string systemStatus = str.Substring(0,4);//系统状态
+ string makeSta = str.Substring(4,4);//制作状态
+ string makeProgress = str.Substring(8,4);//制作进度
+ string makeProgress1 = str.Substring(12,4);//制作进度
+ byte ErrorH = byte.Parse(str.Substring(16,2));//故障信息
+ byte ErrorL = byte.Parse(str.Substring(18,2));//故障信息
+ byte InFormation = byte.Parse(str.Substring(20,1));//保养信息
+
+ foreach (var item in Enum.GetNames(typeof(K95SysTemStatus)))
+ {
+ if (systemStatus.Substring(0,1) == ((K95SysTemStatus)Enum.Parse(typeof(K95SysTemStatus),item)).GetString())
+ temStatus = ((K95SysTemStatus)Enum.Parse(typeof(K95SysTemStatus),item));
+ }
+
+ foreach (var item in Enum.GetNames(typeof(DrinkType)))
+ {
+ if ("0" + makeSta.Substring(0,1) == ((DrinkType)Enum.Parse(typeof(DrinkType),item)).GetString())
+ drinkType = ((DrinkType)Enum.Parse(typeof(DrinkType),item));
+ }
+
+ foreach (var item in Enum.GetNames(typeof(MakeStatus)))
+ {
+ if (makeSta.Substring(1,1) == ((MakeStatus)Enum.Parse(typeof(MakeStatus),item)).GetString())
+ makeStatus = ((MakeStatus)Enum.Parse(typeof(MakeStatus),item));
+ }
+
+ foreach (var item in Enum.GetNames(typeof(TaskIndex)))
+ {
+ if (makeSta.Substring(2,1) == ((TaskIndex)Enum.Parse(typeof(TaskIndex),item)).GetString())
+ taskIndex = ((TaskIndex)Enum.Parse(typeof(TaskIndex),item));
+ }
+
+ if (makeProgress1 != "0000")
+ progress = Convert.ToInt32(makeProgress,16) / Convert.ToInt32(makeProgress1,16);
+ faultMessage = new FaultMessage(ErrorL,ErrorH);
+ upkeepMessage = new UpkeepMessage(InFormation);
+ }
+ }
+}
diff --git a/BPASmartClient.KLMCoffee/Protocal/TaskIndex.cs b/BPASmartClient.KLMCoffee/Protocal/TaskIndex.cs
new file mode 100644
index 00000000..12aabf77
--- /dev/null
+++ b/BPASmartClient.KLMCoffee/Protocal/TaskIndex.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.KLMCoffee.Protocal
+{
+ ///
+ /// 任务进度索引
+ ///
+ public enum TaskIndex
+ {
+ 无任务,
+ 出咖啡,
+ 出热水,
+ 出牛奶,
+ 出奶沫,
+ 同时出,
+ 磨豆
+ }
+}
diff --git a/BPASmartClient.KLMCoffee/Protocal/UpkeepMessage.cs b/BPASmartClient.KLMCoffee/Protocal/UpkeepMessage.cs
new file mode 100644
index 00000000..cf1c757b
--- /dev/null
+++ b/BPASmartClient.KLMCoffee/Protocal/UpkeepMessage.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.KLMCoffee.Protocal
+{
+ public class UpkeepMessage :BitValue
+ {
+ ///
+ /// 1 冲泡器需要清洗,
+ /// ///
+ public bool 冲泡器需要清洗 { get; set; }
+ ///
+ /// 1 奶沫器需要清洗,
+ /// ///
+ public bool 奶沫器需要清洗 { get; set; }
+ ///
+ /// 1 咖啡机需要除垢,
+ /// ///
+ public bool 咖啡机需要除垢 { get; set; }
+ ///
+ /// 1 需要更换滤芯,
+ /// ///
+ public bool 需要更换滤芯 { get; set; }
+
+ public UpkeepMessage(byte value)
+ {
+ 冲泡器需要清洗 = GetBitValue(value,3);
+ 奶沫器需要清洗 = GetBitValue(value,2);
+ 咖啡机需要除垢 = GetBitValue(value,1);
+ 需要更换滤芯 = GetBitValue(value,0);
+ }
+ }
+}
diff --git a/BPASmartClient.Model/BPASmartClient.Model.csproj b/BPASmartClient.Model/BPASmartClient.Model.csproj
index 9ff0b6e0..4de56856 100644
--- a/BPASmartClient.Model/BPASmartClient.Model.csproj
+++ b/BPASmartClient.Model/BPASmartClient.Model.csproj
@@ -10,4 +10,8 @@
+
+
+
+
diff --git a/BPASmartClient.Model/冰淇淋/GSIceCreamEvent.cs b/BPASmartClient.Model/冰淇淋/GSIceCreamEvent.cs
new file mode 100644
index 00000000..447dea1d
--- /dev/null
+++ b/BPASmartClient.Model/冰淇淋/GSIceCreamEvent.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.Model
+{
+ ///
+ /// 驱动设备: 广深冰淇淋机器
+ /// 设备序列号:0x02225132
+ /// 创建时间: 20220419
+ ///
+
+ ///
+ /// 广深冰淇淋机模式设置
+ ///
+ public class GSIceCream_ModeSetEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// 广深冰淇淋机打料
+ ///
+ public class GSIceCream_DischargeEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// 广深冰淇淋机结束制作
+ ///
+ public class GSIceCream_EndCookEvent :BaseEvent
+ {
+
+ }
+}
diff --git a/BPASmartClient.Model/单片机/SCChipEvent.cs b/BPASmartClient.Model/单片机/SCChipEvent.cs
new file mode 100644
index 00000000..6a76f911
--- /dev/null
+++ b/BPASmartClient.Model/单片机/SCChipEvent.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.Model.单片机
+{
+ ///
+ /// 驱动设备: 单片机外设
+ /// 设备序列号:0x02225132
+ /// 创建时间: 20220419
+ ///
+
+ ///
+ /// STM32F103RCT6单片机下杯
+ ///
+ public class SCChip_TakeCupEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// STM32F103RCT6单片机舵机打料
+ ///
+ public class SCChip_MakeIceCreamEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// STM32F103RCT6单片机舵机打开或者关闭
+ ///
+ public class SCChip_SESwitchCreamEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// STM32F103RCT6单片机控制冰淇淋机器转
+ ///
+ public class SCChip_RotorSwitchEvent :BaseEvent
+ {
+
+ }
+}
diff --git a/BPASmartClient.Model/咖啡机/DRCoffeeEvent.cs b/BPASmartClient.Model/咖啡机/DRCoffeeEvent.cs
new file mode 100644
index 00000000..5d49b769
--- /dev/null
+++ b/BPASmartClient.Model/咖啡机/DRCoffeeEvent.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.Model
+{
+ ///
+ /// 驱动设备: 咖博士咖啡机器
+ /// 设备序列号:0x02225132
+ /// 创建时间: 20220419
+ ///
+
+ ///
+ /// 咖博士咖啡机制作
+ ///
+ public class DRCoffee_MakeCoffeeEvent :BaseEvent
+ {
+ }
+
+ ///
+ /// 咖博士咖啡机取消制作咖啡
+ ///
+ public class DRCoffee_CancelMakeCoffeeEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// 咖博士咖啡机模式设置
+ ///
+ public class DRCoffee_CoffeeCommCmdEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// 咖博士咖啡机结束制作
+ ///
+ public class DRCoffee_CoffeEndCookEvent :BaseEvent
+ {
+
+ }
+}
diff --git a/BPASmartClient.Model/咖啡机/KLMCoffeeEvent.cs b/BPASmartClient.Model/咖啡机/KLMCoffeeEvent.cs
new file mode 100644
index 00000000..05dbf030
--- /dev/null
+++ b/BPASmartClient.Model/咖啡机/KLMCoffeeEvent.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BPASmartClient.Model
+{
+ ///
+ /// 驱动设备: 伽乐美咖啡机
+ /// 设备序列号:0x02225132
+ /// 创建时间: 20220419
+ ///
+
+ ///
+ /// 伽乐美咖啡机制作
+ ///
+ public class KLMCoffee_MakeCoffeeEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// 伽乐美咖啡机取消制作咖啡
+ ///
+ public class KLMCoffee_CancelMakeCoffeeEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// 伽乐美咖啡机模式设置
+ ///
+ public class KLMCoffee_CoffeeCommEvent :BaseEvent
+ {
+
+ }
+
+ ///
+ /// 伽乐美咖啡机结束制作
+ ///
+ public class KLMCoffee_CoffeEndCookEvent :BaseEvent
+ {
+
+ }
+}
diff --git a/BPASmartClient/DeviceInfo.xml b/BPASmartClient/DeviceInfo.xml
index c0ff5449..22ff6ea2 100644
--- a/BPASmartClient/DeviceInfo.xml
+++ b/BPASmartClient/DeviceInfo.xml
@@ -11,10 +11,14 @@
+ COM5
+ 9600
+ COM5
+ 9600