Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-WIC-Opencpc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-WIC-Opencpc
Commits
04509291
Commit
04509291
authored
Apr 21, 2018
by
joliu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
移除无用的测试文件
parent
7b85e54a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
6 deletions
+19
-6
tests/controler.py
tests/controler.py
+19
-6
No files found.
tests/controler.py
View file @
04509291
...
@@ -3,7 +3,7 @@ import sys
...
@@ -3,7 +3,7 @@ import sys
import
numpy
as
np
import
numpy
as
np
import
json
import
json
port
=
3
000
port
=
3
3335
inputTask
=
np
.
array
([[
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
],
\
inputTask
=
np
.
array
([[
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
],
\
[
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
],
\
[
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
],
\
...
@@ -21,14 +21,27 @@ jsnInputTypeList = json.dumps(inputTypeList.tolist())
...
@@ -21,14 +21,27 @@ jsnInputTypeList = json.dumps(inputTypeList.tolist())
jsnDeviceList
=
json
.
dumps
(
deviceList
)
jsnDeviceList
=
json
.
dumps
(
deviceList
)
#
message = 'controller&addOutput&%s&%s&%s&0&2' % (jsnInputTask, jsnInputTypeList, jsnDeviceList)
message
=
'controller&addOutput&%s&%s&%s&0&2'
%
(
jsnInputTask
,
jsnInputTypeList
,
jsnDeviceList
)
# 执行逻辑矩阵数据库
# 执行逻辑矩阵数据库
#
message = 'controller&show&resulovetable'
#message = 'controller&show&resulovetable'
# 数据缓存数据库
# 数据缓存数据库
#
message = 'controller&show&datacach'
#message = 'controller&show&datacach'
# 数据采集控制数据库
# 数据采集控制数据库
# message = 'controller&show&decidedestination'
#message = 'controller&show&decidedestination'
message
=
'controller&clear'
#message = 'controller&clear'
# 模拟Device设备发送信息
# message = 'device&dht102&0'
# 输出
# message = 'controller&stop'
#message = 'controller&start'
# 添加轮询查询传感器命令
#message = "controller&addInput&20&192.168.12.19:33335&20"
# 添加缓存数据库内容
data
=
[[
"delay1"
,
"dht102"
,
"dht103"
,
"dht104"
],[
10
,
1
,
0
,
1
]]
data_json
=
json
.
dumps
(
data
)
message
=
"controller&addCach&%s"
%
data_json
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
s
.
connect
((
"192.168.12.19"
,
port
))
s
.
connect
((
"192.168.12.19"
,
port
))
s
.
sendall
(
message
.
encode
())
s
.
sendall
(
message
.
encode
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment