mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
添加Openssl,Gmssl加密库
This commit is contained in:
@@ -279,7 +279,7 @@ int MqttClient::onMessageArrived(char* topic, int topicLen, MQTTAsync_message* m
|
||||
std::string command = GetSubStr("/", topicStr);
|
||||
std::string deviceCode = GetSubStr("/", topicStr);
|
||||
|
||||
spdlog::info("[mqtt] <<<<<<<<<< message arrived: topic=[{},{}], len={}, payload={}", topic, msg->qos, len, payload);
|
||||
spdlog::info("[mqtt] <<< message arrived: topic=[{},{}], len={}, payload={}", topic, msg->qos, len, payload);
|
||||
|
||||
njson json;
|
||||
bool ret = JSON::parse(payload, json);
|
||||
@@ -388,9 +388,9 @@ void MqttClient::ParseArrivedMessage(njson& json, string command, std::shared_pt
|
||||
{
|
||||
auto addr = iter->first;
|
||||
auto& regUnit = iter->second;
|
||||
if (regUnit.alert && val>=0)
|
||||
if (regUnit.alert && val > 0)
|
||||
{
|
||||
station->readAlert(device, val, "[" + command + "]" + regUnit.name + "(" + addr + ")");
|
||||
station->readAlert(device, addr, val, "[" + command + "]" + regUnit.name + "(" + addr + ")");
|
||||
}
|
||||
|
||||
device->setParam(addr, val);
|
||||
|
||||
Reference in New Issue
Block a user