no message

This commit is contained in:
MATRIX\29620 2025-03-28 17:56:56 +08:00
parent 04271e628a
commit d5b2ccd0b2

View File

@ -1,4 +1,4 @@
import taosrest # 使用 taosrest 连接 TDengine
import taosrest
import paho.mqtt.client as mqtt
import binascii
import json
@ -118,7 +118,6 @@ class ChargingPileProcessor:
return None
def parse_message(self, data):
"""根据协议解析充电桩报文"""
if not data or len(data) < 1:
logging.error("报文数据无效。")
return None
@ -126,7 +125,6 @@ class ChargingPileProcessor:
# 检查报文类型(第一个字节)
msg_type = data[0]
if msg_type != 0x23: # 23H 最新充电订单
# 仅在第一次遇到该类型时记录跳过日志
if msg_type not in self.skipped_msg_types:
logging.info(f"报文类型 {hex(msg_type)} 不是充电订单23H跳过。")
self.skipped_msg_types.add(msg_type)