update zmq log
This commit is contained in:
@@ -22,7 +22,7 @@ class zmqServer(threading.Thread):
|
||||
|
||||
self.host = host
|
||||
|
||||
# test_host = "10.200.27.140"
|
||||
# test_host = "192.168.254.102"
|
||||
# self.host = test_host
|
||||
|
||||
self.cmd_port = cmd_port # 命令交互端口:收JSON命令 + 返JSON结果
|
||||
@@ -180,7 +180,7 @@ class zmqServer(threading.Thread):
|
||||
# 转置为上位机需要的[50, 通道数]格式
|
||||
filtered_data = filtered_data.T.astype(np.float64)
|
||||
send_buf = filtered_data.tobytes()
|
||||
algo_log(f"发送滤波数据,长度: {len(send_buf)}字节, filtered_data.shape: {filtered_data.shape}", level="DEBUG", record_once=True)
|
||||
algo_log(f"发送滤波数据,长度: {len(send_buf)}字节, filtered_data.shape: {filtered_data.shape}", level="DEBUG", record_once=False)
|
||||
self.data_send_queue.put(send_buf)
|
||||
|
||||
def _process_data_send_queue(self):
|
||||
@@ -291,6 +291,8 @@ class zmqServer(threading.Thread):
|
||||
elif len(frames) == 3:
|
||||
# 标准格式
|
||||
ident, empty_sep, data_bytes = frames[:3]
|
||||
elif len(frames) == 2:
|
||||
ident, data_bytes = frames[:2]
|
||||
else:
|
||||
return
|
||||
# 注册新的数据客户端(单客户端场景,自动覆盖旧身份)
|
||||
|
||||
Reference in New Issue
Block a user