Browse Source

11

master
fyf 2 years ago
parent
commit
91bd48ed66
1 changed files with 35 additions and 2 deletions
  1. +35
    -2
      HBLConsole.Business/IotReport.cs

+ 35
- 2
HBLConsole.Business/IotReport.cs View File

@@ -89,6 +89,10 @@ namespace HBLConsole.Business
{
if (IOTDevServer.client != null && IOTDevServer.client.IsConnected && device != null)
{
#region 私有变量
bool IsAllowRun = false;
bool TemperatureReached = false;
#endregion
string kzsx = string.Empty;
string jbsx = Tools.JsonConvertTools<DevSX>(new DevSX
{
@@ -102,10 +106,33 @@ namespace HBLConsole.Business
switch (GeneralConfig.DeviceType)
{
case BPA.Message.Enum.DeviceClientType.MORKD:
//IsAllowRun = GetTypeValue<bool>("AllowRun");
//TemperatureReached = GetTypeValue<bool>("TemperatureReached");

////设置扩展属性与状态,连接上机器人后才会处理
//if (IsAllowRun)
//{
// kzsx = Tools.JsonConvertTools<DevSX>(new DevSX
// {
// data = new List<DevSXBase>
// {
// new DevSXBase { SXMC="设备硬件",SXLX="煮面炉",SXStatus= !TemperatureReached ,
// SXYCMS=!TemperatureReached?"":DateTime.Now+" 异常,煮面炉温度不够,疑似正在加热或者未工作...."},
// new DevSXBase { SXMC="设备硬件",SXLX="装小碗结构",SXStatus=MissingBowl ,
// SXYCMS=MissingBowl?"":DateTime.Now+" 异常,缺小碗...."},
// new DevSXBase { SXMC="设备硬件",SXLX="装大碗结构",SXStatus=MissingBowlSignal2 ,
// SXYCMS=MissingBowlSignal2?"":DateTime.Now+" 异常,缺大碗...."},
// new DevSXBase { SXMC="设备硬件",SXLX="取面转台",SXStatus=IsNoodles ,
// SXYCMS=IsNoodles?"":DateTime.Now+" 异常,转台位置缺少物料...."},
// new DevSXBase { SXMC="设备硬件",SXLX="配料机",SXStatus=!(!AllowFallNoodle && isCookNoodles) ,
// SXYCMS=!((!AllowFallNoodle && isCookNoodles))?"":DateTime.Now+" 异常,配料机未配完料,疑似碗未到配料机下方或者配料机未工作...."}
// }
// });
//}
break;
case BPA.Message.Enum.DeviceClientType.MORKS:
bool IsAllowRun = GetTypeValue<bool>("AllowRun");
bool TemperatureReached = GetTypeValue<bool>("TemperatureReached");
IsAllowRun = GetTypeValue<bool>("AllowRun");
TemperatureReached = GetTypeValue<bool>("TemperatureReached");
bool MissingBowl = GetTypeValue<bool>("MissingBowl");
bool MissingBowlSignal2 = GetTypeValue<bool>("MissingBowlSignal2");
bool IsNoodles = GetTypeValue<bool>("IsNoodles");//转台
@@ -134,10 +161,16 @@ namespace HBLConsole.Business
}
break;
case BPA.Message.Enum.DeviceClientType.MORKI:


break;
case BPA.Message.Enum.DeviceClientType.MORKC:


break;
case BPA.Message.Enum.DeviceClientType.MORKIC:


break;
default:
break;


Loading…
Cancel
Save