fyf 2 роки тому
джерело
коміт
c040143d32
3 змінених файлів з 105 додано та 107 видалено
  1. +0
    -6
      BPASmartClient.IoT/DataVClient.cs
  2. +4
    -0
      BPASmartClient.IoT/Model/DataVReport.cs
  3. +101
    -101
      BPASmartClient.IoT/Model/IOT/IOTDevModel.cs

+ 0
- 6
BPASmartClient.IoT/DataVClient.cs Переглянути файл

@@ -65,12 +65,6 @@ namespace BPASmartClient.IoT
/// 大屏上报Model
/// </summary>
public DataVAPI.Tool.IOT.IOTDevSXModel iOTDevSXModel = new DataVAPI.Tool.IOT.IOTDevSXModel() { };
/// <summary>
/// 广播
/// </summary>
//public string PubTopic = "/broadcast/" + "grgpECHSL7q" + "/" + "Transit_SetDevice";
//public string PubTopic = "/broadcast/" + "grgpECHSL7q" + "/" + "Transit_Test_SetDevice";

/// <summary>
/// key值
/// </summary>


+ 4
- 0
BPASmartClient.IoT/Model/DataVReport.cs Переглянути файл

@@ -369,6 +369,10 @@ namespace BPASmartDatavDeviceClient.IoT
/// </summary>
public string BroadcastTopic = "/broadcast/" + "grgpECHSL7q" + "/" + DeviceName + "_SetDevice";
/// <summary>
/// 文件上床Topic
/// </summary>
public string FileUpLoadTopic = $"/sys/{ProductKey}/{DeviceName}/thing/file/upload/mqtt/init";
/// <summary>
/// 订阅主题集合
/// </summary>
public static List<string> SubTopicList = new List<string>();


+ 101
- 101
BPASmartClient.IoT/Model/IOT/IOTDevModel.cs Переглянути файл

@@ -66,30 +66,30 @@ namespace DataVAPI.Tool.IOT
/// </summary>
public class IOTDevSXModel
{
/// <summary>
/// 硬件状态
/// </summary>
public string HardwareStatus { get; set; }
/// <summary>
/// 扩展属性
/// </summary>
public string KZSX { get; set; }
/// <summary>
/// 基本属性
/// </summary>
public string JBSX { get; set; }
///// <summary>
///// 硬件状态
///// </summary>
//public string HardwareStatus { get; set; }
///// <summary>
///// 扩展属性
///// </summary>
//public string KZSX { get; set; }
///// <summary>
///// 基本属性
///// </summary>
//public string JBSX { get; set; }
/// <summary>
/// 节点状态
/// </summary>
public string NodeStatus { get; set; }
/// <summary>
/// 运行日志
/// </summary>
public string SZXX { get; set; }
/// <summary>
/// 运行告警
/// </summary>
public string GJXX { get; set; }
///// <summary>
///// 运行日志
///// </summary>
//public string SZXX { get; set; }
///// <summary>
///// 运行告警
///// </summary>
//public string GJXX { get; set; }
/// <summary>
/// Model
/// </summary>
@@ -114,87 +114,87 @@ namespace DataVAPI.Tool.IOT
return string.Empty;
}
}
/// <summary>
/// 设置基本属性
/// </summary>
/// <param name="devSX"></param>
/// <returns></returns>
public void SetJBSX(DevSX devSX)
{
try
{
JBSX = Tools.JsonConvertTools(devSX);
}
catch (Exception ex)
{
JBSX = string.Empty;
}
}
/// <summary>
/// 设置基本属性状态
/// </summary>
/// <param name="devSX"></param>
/// <returns></returns>
public void SetJBSXStatus(DevSXBase sXBase, bool Status)
{
try
{
if (sXBase == null) return;
DevSX dev = Tools.JsonToObjectTools<DevSX>(JBSX);
dev.data?.ForEach(x =>
{
if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX)
{
x.SXStatus = Status;
}
});
JBSX = Tools.JsonConvertTools(dev);
}
catch (Exception ex)
{
JBSX = string.Empty;
}
}
/// <summary>
/// 设置扩展属性
/// </summary>
/// <param name="devSX"></param>
public void SetKZSX(DevSX devSX)
{
try
{
KZSX = Tools.JsonConvertTools(devSX);
}
catch (Exception ex)
{
KZSX = string.Empty;
}
}
/// <summary>
/// 设置扩展属性状态
/// </summary>
/// <param name="devSX"></param>
/// <returns></returns>
public void SetKZSXStatus(DevSXBase sXBase, bool Status)
{
try
{
if (sXBase == null) return;
DevSX dev = Tools.JsonToObjectTools<DevSX>(KZSX);
dev.data?.ForEach(x =>
{
if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX)
{
x.SXStatus = Status;
}
});
KZSX = Tools.JsonConvertTools(dev);
}
catch (Exception ex)
{
KZSX = string.Empty;
}
}
///// <summary>
///// 设置基本属性
///// </summary>
///// <param name="devSX"></param>
///// <returns></returns>
//public void SetJBSX(DevSX devSX)
//{
// try
// {
// JBSX = Tools.JsonConvertTools(devSX);
// }
// catch (Exception ex)
// {
// JBSX = string.Empty;
// }
//}
///// <summary>
///// 设置基本属性状态
///// </summary>
///// <param name="devSX"></param>
///// <returns></returns>
//public void SetJBSXStatus(DevSXBase sXBase, bool Status)
//{
// try
// {
// if (sXBase == null) return;
// DevSX dev = Tools.JsonToObjectTools<DevSX>(JBSX);
// dev.data?.ForEach(x =>
// {
// if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX)
// {
// x.SXStatus = Status;
// }
// });
// JBSX = Tools.JsonConvertTools(dev);
// }
// catch (Exception ex)
// {
// JBSX = string.Empty;
// }
//}
///// <summary>
///// 设置扩展属性
///// </summary>
///// <param name="devSX"></param>
//public void SetKZSX(DevSX devSX)
//{
// try
// {
// KZSX = Tools.JsonConvertTools(devSX);
// }
// catch (Exception ex)
// {
// KZSX = string.Empty;
// }
//}
///// <summary>
///// 设置扩展属性状态
///// </summary>
///// <param name="devSX"></param>
///// <returns></returns>
//public void SetKZSXStatus(DevSXBase sXBase, bool Status)
//{
// try
// {
// if (sXBase == null) return;
// DevSX dev = Tools.JsonToObjectTools<DevSX>(KZSX);
// dev.data?.ForEach(x =>
// {
// if (x.SXMC == sXBase.SXMC && x.SXLX == sXBase.SXLX)
// {
// x.SXStatus = Status;
// }
// });
// KZSX = Tools.JsonConvertTools(dev);
// }
// catch (Exception ex)
// {
// KZSX = string.Empty;
// }
//}
}
/// <summary>
/// 告警消息


Завантаження…
Відмінити
Зберегти