fyf 2 anni fa
parent
commit
9340d1cbb1
1 ha cambiato i file con 10 aggiunte e 9 eliminazioni
  1. +10
    -9
      DataVAPI/UpAndDown/ProcessServer.cs

+ 10
- 9
DataVAPI/UpAndDown/ProcessServer.cs Vedi 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 = "" });
//}
}
}
}

Caricamento…
Annulla
Salva