|
|
@@ -0,0 +1,45 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Threading; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using BPA.Helper; |
|
|
|
using BPASmartClient.MQTT; |
|
|
|
|
|
|
|
namespace BPASmartClient.MorkS |
|
|
|
{ |
|
|
|
public class DataServer |
|
|
|
{ |
|
|
|
|
|
|
|
private volatile static DataServer _Instance; |
|
|
|
public static DataServer GetInstance => _Instance ?? (_Instance = new DataServer()); |
|
|
|
private DataServer() { } |
|
|
|
|
|
|
|
public void Init() |
|
|
|
{ |
|
|
|
MQTTProxy mQTTProxy = new MQTTProxy(); |
|
|
|
mQTTProxy.Connected = new Action(() => |
|
|
|
{ |
|
|
|
mQTTProxy.Subscrib(""); |
|
|
|
ThreadManage.GetInstance().StartLong(new Action(() => |
|
|
|
{ |
|
|
|
mQTTProxy.Publish("", ""); |
|
|
|
Thread.Sleep(100); |
|
|
|
}), "海科食堂大屏监听"); |
|
|
|
}); |
|
|
|
mQTTProxy.Connect("UserName", "Password", "Host", 1883, $"MORKS 设备监听数据{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//订单信息(正在制作,等待制作,制作完成) |
|
|
|
//煮面炉上下状态(6个煮面炉上或下) |
|
|
|
//温度状态(煮面炉温度是否到达) |
|
|
|
//料仓位置(当前料仓在几号位置) |
|
|
|
//料仓上下物料检测 |
|
|
|
//落碗机构缺碗检测 |
|
|
|
//机器人状态 |
|
|
|
//当日订单总量 |
|
|
|
//报警信息 |
|
|
|
} |
|
|
|
} |