mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
实现MQTT协议消息订阅和消息解析流程
This commit is contained in:
@@ -276,6 +276,16 @@ std::shared_ptr<Device> AppData::getDevice(int stationId, int deviceId)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<Device> AppData::getDeviceByType(int stationId, int deviceType, std::string code)
|
||||
{
|
||||
auto station = getStation(stationId);
|
||||
if (station)
|
||||
{
|
||||
return station->getDeviceByType(deviceType, code);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::string AppData::getDeviceNameById(int typeId)
|
||||
{
|
||||
auto iter = mapDeviceType.find(typeId);
|
||||
|
||||
Reference in New Issue
Block a user