Commit be7027a9 by 周田

mod

parent f2f06cea
......@@ -76,7 +76,7 @@ def set_communication_to_devinfo_table(request):
# 清空设备信息表
# TODO:实际开始用的时候,需要将这个注释打开
# TableXproAllDevinfo.objects.all().delete()
TableXproAllDevinfo.objects.all().delete()
TableXproAllDevinfo.objects.bulk_create(
[TableXproAllDevinfo(sta_id=communication.station_id,
......
......@@ -26,7 +26,6 @@ class TableAllDevCmdDefineView(ModelViewSet):
def perform_destroy(self, instance):
"""
删除某个字段,需要将字段的 index 更新
TODO: 返回更新后的数据(不能做完一个操作之后,页面就刷新)
"""
# 获取改字段的 cmd_name
......
......@@ -31,9 +31,8 @@ def on_message(mqtt_client, userdata, msg):
def send_message(data: dict, device_name: str):
"""
发送 websocket 消息
TODO: 通过不同的 port 发向不同的 group name
"""
send_websocket_message(data)
dev_info = TableXproAllDevinfo.objects.filter(dev_name=device_name).first()
if "TCP" in dev_info.comunitate_mode.upper():
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment