18 lines
429 B
Dart
18 lines
429 B
Dart
|
|
class MqttHandler {
|
|
|
|
|
|
// 报警处理 单独线程 todo
|
|
void message(String topic, String msg) {
|
|
// print("topic: $topic, msg:$msg");
|
|
try {
|
|
// statisticsService.saveDeviceStatus(msg);
|
|
// alarmRuleService.judgeInstantAlarm(msg);
|
|
} catch (e) {
|
|
// print(e);
|
|
}
|
|
//遍历路径获取匹配的topic 进行websocket数据转发
|
|
// _topicPathHandler.forwardMessageByTopic(topic, msg);
|
|
}
|
|
}
|