Browse Source

34343

master
fyf 2 years ago
parent
commit
9340d1cbb1
1 changed files with 10 additions and 9 deletions
  1. +10
    -9
      DataVAPI/UpAndDown/ProcessServer.cs

+ 10
- 9
DataVAPI/UpAndDown/ProcessServer.cs View File

@@ -68,7 +68,7 @@ namespace DataVAPI.UpAndDown
ConsoleHelper.WriteSuccessLine($"阿里云【Transit】连接失败");
}
//属性状态变xin
Subscribe(IOTDevServer.TargetStatusSubTopic);
//Subscribe(IOTDevServer.TargetStatusSubTopic);

//订阅上下线
Subscribe(IOTDevServer.HeartbeatSubTopic);
@@ -324,14 +324,15 @@ namespace DataVAPI.UpAndDown
logController.Create(Tools.JsonToObjectTools<LogTable>(message));

}
} else if (topic == IOTDevServer.TargetStatusSubTopic)//属性变更
{
ReceiveModel rEmodel = Tools.JsonToObjectTools<ReceiveModel>(message);
string name= rEmodel.deviceContext.deviceName;
string status = rEmodel.props.NodeStatus.value;
string id = deviceController.QueryDeviceName(name)?.obj?.data?.ClientId;
screenController.CreateOrUpdate(new LargeScreenTable() { json = status, devicename = name, ClientId = id, DeviceId = "" });
}
}
//else if (topic == IOTDevServer.TargetStatusSubTopic)//属性变更
//{
// ReceiveModel rEmodel = Tools.JsonToObjectTools<ReceiveModel>(message);
// string name= rEmodel.deviceContext.deviceName;
// string status = rEmodel.props.NodeStatus.value;
// string id = deviceController.QueryDeviceName(name)?.obj?.data?.ClientId;
// screenController.CreateOrUpdate(new LargeScreenTable() { json = status, devicename = name, ClientId = id, DeviceId = "" });
//}
}
}
}

Loading…
Cancel
Save