v0.2.0.0(2024/07/17)

1. [profile: aio.py]
   - 增加velocity相关逻辑
   - 修改负载信息为曲线信息
2. [profile: factory_test.py]
   - 增加velocity相关逻辑
3. [profile: current.py]
   - 修正减速比获取的规则
4. [profile: openapi.py]
   - HmiRequest模块:日志取消记录move.monitor相关
   - HmiRequest模块:增加了durable_lock变量,控制文件读写互斥
This commit is contained in:
2024-07-17 14:17:00 +08:00
parent da5ddcea0a
commit 3010cb8931
9 changed files with 100 additions and 40 deletions

View File

@ -1,4 +1,4 @@
from json import load, dumps
from json import load, dumps, loads
from socket import socket, setdefaulttimeout, AF_INET, SOCK_STREAM
from threading import Thread
import selectors
@ -171,6 +171,7 @@ class HmiRequest(object):
self.half_length = 0
self.index = 0
self.reset_index = 0
self.durable_lock = 0
self.sock_conn()
self.t_heartbeat = Thread(target=self.heartbeat)
@ -257,8 +258,11 @@ class HmiRequest(object):
# f.write(str(loads(msg)) + '\n')
def msg_storage(self, response, flag=0):
# response是解码后的字符串
messages = self.c_msg if flag == 0 else self.c_msg_xs
if len(messages) < 20000:
if 'move.monitor' in response:
pass
elif len(messages) < 20000:
messages.insert(0, response)
else:
messages.insert(0, response)