Commit 0a52556b authored by joliu's avatar joliu

添加通过控制器直接控制device设备命令模式

parent 6e1daaee
......@@ -29,7 +29,7 @@ from controllMatrix import *
# 两种控制模式,controller:控制器写入控制命令,device:接收其他传感器控制命令
controlModeList = ['controller', 'device']
controlMethodList = ['addInput','addOutput', 'addCach', 'rm', 'clear', 'period', 'show', 'start', 'stop']
controlMethodList = ['addInput','addOutput', 'addCach', 'rm', 'clear', 'period', 'show', 'start', 'stop', 'run']
class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
'''
......@@ -173,6 +173,9 @@ def executeCommand(command, information):
return updateTaskStatus(1)
elif command == 'stop':
return updateTaskStatus(0)
elif command == 'run':
method = information[0]
return sendCommandToDevice(method)
# 创建数据库
......
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