优化了测试界面
This commit is contained in:
@@ -18,6 +18,7 @@ def receive_messages(sock, logwin:logWin, disSysWin:disSys):
|
||||
current_time = datetime.now()
|
||||
formatted_time = current_time.strftime("%Y-%m-%d %H:%M:%S")
|
||||
data, address = sock.recvfrom(4096)
|
||||
# 接受配电系统消息
|
||||
disSysWin.update_fromMsg(data)
|
||||
headBuf = data[:6]
|
||||
header = struct.unpack('<BBHH',headBuf)
|
||||
@@ -49,8 +50,7 @@ def send_messages(sock, logwin:logWin, disSysWin:disSys,ccuSysWin:ccuSys):
|
||||
sock.sendto(d, (target_ip, target_port))
|
||||
|
||||
#TODO复合管控消息反馈
|
||||
#TODOccu消息反馈
|
||||
e = ccuSysWin.ccuState.pack()
|
||||
sock.sendto(e, (target_ip, target_port))
|
||||
sock.sendto(e, (target_ip, target_port))
|
||||
|
||||
threading.Event().wait(1) # 每隔1秒发送一次消息
|
||||
|
||||
Reference in New Issue
Block a user