Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
new-socketemulator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李远洪
new-socketemulator
Commits
03819733
Commit
03819733
authored
Mar 18, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加了附加属性的js代码
parent
f21d3a19
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
561 additions
and
133 deletions
+561
-133
README.md
README.md
+8
-2
lib/multiThread/SendMultMsgThread_m500.py
lib/multiThread/SendMultMsgThread_m500.py
+2
-2
lib/protocol/message/Location_msg.py
lib/protocol/message/Location_msg.py
+18
-15
lib/socket/messageTest.py
lib/socket/messageTest.py
+2
-2
lib/util/dataUtil.py
lib/util/dataUtil.py
+1
-1
lib/util/jsonUtil.py
lib/util/jsonUtil.py
+21
-0
run.py
run.py
+1
-1
templates/messageTools/message/location_msg_page.html
templates/messageTools/message/location_msg_page.html
+448
-110
views/messageTools/message_process.py
views/messageTools/message_process.py
+60
-0
No files found.
README.md
View file @
03819733
...
@@ -12,12 +12,18 @@ templates:存放网页模板文件 html
...
@@ -12,12 +12,18 @@ templates:存放网页模板文件 html
views:存放网页端操作的后台处理逻辑,以及页面的展示逻辑
views:存放网页端操作的后台处理逻辑,以及页面的展示逻辑
run.py:启动项目图形操作界面主程序,访问:127.0.0.1:5000 即可
run.py:启动项目图形操作界面主程序,访问:127.0.0.1:5000 即可
requirements.txt:设置项目需要的依赖库
requirements.txt:设置项目需要的依赖库
### (二)、安装部署
1、机器上安装了python3 和 pip包管理工具
2、进入项目根目录,编辑requirements.txt, 删除第一行wxPython==4.0.7.post2
3、使用 :pip install -r requirement.txt 安装依赖库
4、python3 run.py 运行项目
5、访问 host:5000 即可进入模拟器页面
### (
二
)、文档目录
### (
三
)、文档目录
[
1、lib使用库说明
](
doc/lib_details.md
)
[
1、lib使用库说明
](
doc/lib_details.md
)
[
2、如何使用web图形操作界面
](
https://www.baidu.com/
)
[
2、如何使用web图形操作界面
](
https://www.baidu.com/
)
### (
三
)、图形界面展示
### (
四
)、图形界面展示
#### m500操作界面:
#### m500操作界面:
![
alt text
](
doc/img/m500_1.png
"Title Text"
)
![
alt text
](
doc/img/m500_1.png
"Title Text"
)
#### 车安优操作界面:
#### 车安优操作界面:
...
...
lib/multiThread/SendMultMsgThread_m500.py
View file @
03819733
...
@@ -18,12 +18,12 @@ class SendMultMsgThread():
...
@@ -18,12 +18,12 @@ class SendMultMsgThread():
self
.
msg
=
msg
self
.
msg
=
msg
self
.
timeOut
=
30
#socket超时时间
self
.
timeOut
=
30
#socket超时时间
self
.
BUF_SIZE
=
1024
#接收消息缓存
self
.
BUF_SIZE
=
1024
#接收消息缓存
self
.
threadCount
=
1000
0
#并发线程数
self
.
threadCount
=
1000
#并发线程数
self
.
totalTime
=
0
#所有线程的运行总和
self
.
totalTime
=
0
#所有线程的运行总和
self
.
threadArr
=
{}
#保存每个线程的信息
self
.
threadArr
=
{}
#保存每个线程的信息
self
.
failThreadCount
=
0
#失败线程数
self
.
failThreadCount
=
0
#失败线程数
self
.
durThreads
=
[]
#持续发送线程数组,当数组为空,表示所有线程已经结束
self
.
durThreads
=
[]
#持续发送线程数组,当数组为空,表示所有线程已经结束
dt
=
1
*
2
0
*
60
dt
=
1
*
1
0
*
60
self
.
durTime
=
dt
#线程持续时间
self
.
durTime
=
dt
#线程持续时间
self
.
connectTimeoutNum
=
0
#连接超时线程数
self
.
connectTimeoutNum
=
0
#连接超时线程数
self
.
sendTimeoutNum
=
0
#发送超时线程数
self
.
sendTimeoutNum
=
0
#发送超时线程数
...
...
lib/protocol/message/Location_msg.py
View file @
03819733
...
@@ -36,11 +36,10 @@ class Location_msg(MessageBase):
...
@@ -36,11 +36,10 @@ class Location_msg(MessageBase):
return
msg
return
msg
# 生成一条完整的消息,针对图形界面,可传递参数
# 生成一条完整的消息,针对图形界面,可传递参数
def
generateMsg_GUI
(
self
,
msgID
=
"0200"
,
phoneNum
=
"13146201119"
,
msgWaterCode
=
1
,
encryptionType
=
0
,
subPkg
=
0
,
\
def
generateMsg_GUI
(
self
,
params
):
):
msg
=
""
msg
=
""
msgHeader
=
self
.
getMsgHeader_GUI
(
msgID
,
phoneNum
,
msgWaterCode
,
encryptionType
,
subPkg
)
msgHeader
=
self
.
getMsgHeader_GUI
(
params
[
"msgID"
],
int
(
params
[
"phoneNum"
]),
int
(
params
[
"msgWaterCode"
]),
int
(
params
[
"encryptionType"
]),
int
(
params
[
"subPkg"
])
)
msgBody
=
self
.
getMsgBody_GUI
()
msgBody
=
self
.
getMsgBody_GUI
(
params
)
checkCode
=
self
.
getCheckCode
(
msgHeader
+
msgBody
)
checkCode
=
self
.
getCheckCode
(
msgHeader
+
msgBody
)
msg
=
msg
+
self
.
IDENTIFY
msg
=
msg
+
self
.
IDENTIFY
info
=
msgHeader
+
msgBody
+
checkCode
info
=
msgHeader
+
msgBody
+
checkCode
...
@@ -78,10 +77,14 @@ class Location_msg(MessageBase):
...
@@ -78,10 +77,14 @@ class Location_msg(MessageBase):
return
msg
return
msg
# 获取消息体,针对图形界面,可传递参数
# 获取消息体,针对图形界面,可传递参数
def
getMsgBody_GUI
(
self
,
baseInfo
,
extraInfo
):
def
getMsgBody_GUI
(
self
,
params
):
msg
=
""
msg
=
""
locationBaseInfo
=
self
.
getLocationBaseInfo_GUI
(
baseInfo
)
#位置基本信息
locationBaseInfo
=
self
.
getLocationBaseInfo_GUI
(
params
[
"baseInfo"
])
#位置基本信息
locationExtraInfo
=
self
.
getLocationExtraInfo_GUI
(
extraInfo
)
#位置附加信息
locationExtraInfo
=
""
if
params
[
"extraInfo"
]
==
{}:
pass
else
:
locationExtraInfo
=
self
.
getLocationExtraInfo_GUI
(
params
[
"extraInfo"
])
#位置附加信息
msg
=
locationBaseInfo
+
locationExtraInfo
msg
=
locationBaseInfo
+
locationExtraInfo
return
msg
return
msg
# 获取消息体,数据随机产生
# 获取消息体,数据随机产生
...
@@ -112,13 +115,13 @@ class Location_msg(MessageBase):
...
@@ -112,13 +115,13 @@ class Location_msg(MessageBase):
# 获取位置基本信息,针对图形界面,可传递参数
# 获取位置基本信息,针对图形界面,可传递参数
def
getLocationBaseInfo_GUI
(
self
,
baseInfo
):
def
getLocationBaseInfo_GUI
(
self
,
baseInfo
):
msg
=
""
msg
=
""
alarmFlag
=
self
.
int2hexStringByBytes
(
baseInfo
[
"alarmFlag"
]
,
4
)
#报警标志
alarmFlag
=
self
.
int2hexStringByBytes
(
int
(
baseInfo
[
"alarmFlag"
])
,
4
)
#报警标志
status
=
self
.
int2hexStringByBytes
(
baseInfo
[
"status"
]
,
4
)
#状态
status
=
self
.
int2hexStringByBytes
(
int
(
baseInfo
[
"status"
])
,
4
)
#状态
latitude
=
self
.
getLatitude
(
baseInfo
[
"latitude"
]
)
#纬度
latitude
=
self
.
getLatitude
(
float
(
baseInfo
[
"latitude"
])
)
#纬度
longtitude
=
self
.
getLongtitude
(
baseInfo
[
"longtitude"
]
)
#经度
longtitude
=
self
.
getLongtitude
(
float
(
baseInfo
[
"longtitude"
])
)
#经度
elevation
=
self
.
getElevation
(
baseInfo
[
"elevation"
]
)
#海拔高度
elevation
=
self
.
getElevation
(
int
(
baseInfo
[
"elevation"
])
)
#海拔高度
speed
=
self
.
getSpeed
(
baseInfo
[
"speed"
]
)
#速度
speed
=
self
.
getSpeed
(
int
(
baseInfo
[
"speed"
])
)
#速度
directionAngle
=
self
.
getDirectionAngle
(
baseInfo
[
"directionAngle"
]
)
#获取方向角度
directionAngle
=
self
.
getDirectionAngle
(
int
(
baseInfo
[
"directionAngle"
])
)
#获取方向角度
infoTime
=
self
.
getInfoTime
(
baseInfo
[
"infoTime"
])
#获取时间
infoTime
=
self
.
getInfoTime
(
baseInfo
[
"infoTime"
])
#获取时间
msg
=
alarmFlag
+
status
+
latitude
+
longtitude
+
elevation
+
speed
+
directionAngle
+
infoTime
msg
=
alarmFlag
+
status
+
latitude
+
longtitude
+
elevation
+
speed
+
directionAngle
+
infoTime
return
msg
return
msg
...
@@ -182,7 +185,7 @@ class Location_msg(MessageBase):
...
@@ -182,7 +185,7 @@ class Location_msg(MessageBase):
# data = data +extra_FA
# data = data +extra_FA
return
data
return
data
def
getLocationExtraInfo_GUI
(
self
):
def
getLocationExtraInfo_GUI
(
self
,
extraInfo
):
data
=
""
data
=
""
# 里程,DWORD,1 / 10km,对应车上里程表读数;不支持OBD时,为基于GPS车速统计的车辆累计行驶总里程。
# 里程,DWORD,1 / 10km,对应车上里程表读数;不支持OBD时,为基于GPS车速统计的车辆累计行驶总里程。
extra_01
=
"01"
+
self
.
int2hexStringByBytes
(
4
)
+
self
.
int2hexStringByBytes
(
20202020
,
4
)
extra_01
=
"01"
+
self
.
int2hexStringByBytes
(
4
)
+
self
.
int2hexStringByBytes
(
20202020
,
4
)
...
...
lib/socket/messageTest.py
View file @
03819733
...
@@ -22,14 +22,14 @@ port = 9001
...
@@ -22,14 +22,14 @@ port = 9001
# msg = MessageBase().generateMsg()
# msg = MessageBase().generateMsg()
# msg = TerminalCommonMsgRes_msg().generateMsg() #终端通用应答
# msg = TerminalCommonMsgRes_msg().generateMsg() #终端通用应答
msg
=
TerminalHeartbeat_msg
()
.
generateMsg
()
#终端心跳
#
msg = TerminalHeartbeat_msg().generateMsg() #终端心跳
# msg = TerminalRegister_msg().generateMsg() #终端注册
# msg = TerminalRegister_msg().generateMsg() #终端注册
# msg = TerminalCancle_msg().generateMsg() #终端注销
# msg = TerminalCancle_msg().generateMsg() #终端注销
# msg = TerminalAuthenticate_msg().generateMsg() #终端鉴权
# msg = TerminalAuthenticate_msg().generateMsg() #终端鉴权
# msg = TerminalVersionInfo_msg().generateMsg() #终端版本信息上报
# msg = TerminalVersionInfo_msg().generateMsg() #终端版本信息上报
# msg = QueryTerminalParam_res().generateMsg() #查询终端参数应答
# msg = QueryTerminalParam_res().generateMsg() #查询终端参数应答
# msg = QueryTerminalProperty_res().generateMsg() #查询终端属性应答消息
# msg = QueryTerminalProperty_res().generateMsg() #查询终端属性应答消息
#
msg = Location_msg().generateMsg() #位置信息汇报
msg
=
Location_msg
()
.
generateMsg
()
#位置信息汇报
# msg = DataUpstreamTransport_msg().generateMsg() #数据上行透传消息
# msg = DataUpstreamTransport_msg().generateMsg() #数据上行透传消息
# msg = TerminalUpdataResult_msg().generateMsg() #终端升级结果通知
# msg = TerminalUpdataResult_msg().generateMsg() #终端升级结果通知
# msg = LocationDataBatchUpdate_msg().generateMsg() #定位数据批量上传
# msg = LocationDataBatchUpdate_msg().generateMsg() #定位数据批量上传
...
...
lib/util/dataUtil.py
View file @
03819733
lib/util/jsonUtil.py
0 → 100644
View file @
03819733
#coding:utf-8
'''
处理json辅助类
'''
#####################################################
# 判断json中是否有值为空的项
#####################################################
def
hasJsonDataIsNone
(
data
):
for
key
,
value
in
data
.
items
():
if
value
==
None
or
value
==
""
:
return
True
return
False
if
__name__
==
"__main__"
:
data
=
{
"a"
:
1
,
"b"
:
"bb"
,
"c"
:
"s"
,
"d"
:
123
}
print
(
hasJsonDataIsNone
(
data
))
\ No newline at end of file
run.py
View file @
03819733
...
@@ -25,7 +25,7 @@ app.register_blueprint(message_process,url_prefix = "/messageTools/message_proce
...
@@ -25,7 +25,7 @@ app.register_blueprint(message_process,url_prefix = "/messageTools/message_proce
@
app
.
route
(
'/'
)
@
app
.
route
(
'/'
)
def
hello
():
def
hello
():
return
redirect
(
'/
tab1/styl
e'
)
return
redirect
(
'/
messageTools/message_view/heartBeat_msg_pag
e'
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
app
.
run
(
debug
=
True
,
host
=
'0.0.0.0'
)
app
.
run
(
debug
=
True
,
host
=
'0.0.0.0'
)
\ No newline at end of file
templates/messageTools/message/location_msg_page.html
View file @
03819733
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
id=
"container3"
style=
"width:100%;min-height:750px;float:left;_background:green;margin-top:10px;_border-top: 1px solid #eee;"
>
<div
id=
"container3"
style=
"width:100%;min-height:750px;float:left;_background:green;margin-top:10px;_border-top: 1px solid #eee;"
>
<div
style=
"width:100%;_background:green;padding:5px;padding-top:0px;"
>
<div
style=
"width:100%;_background:green;padding:5px;padding-top:0px;"
>
<h3
style=
"border-bottom: 1px solid #eee;"
>
设置消息头:
</h3>
<h3
style=
"border-bottom: 1px solid #eee;"
>
设置消息头:
</h3>
<label>
消息ID:
</label><input
id=
"msgID"
type=
"text"
class=
"form-control"
disabled=
"disabled"
value=
"0
1
00"
style=
"width:80px;"
>
<label>
消息ID:
</label><input
id=
"msgID"
type=
"text"
class=
"form-control"
disabled=
"disabled"
value=
"0
2
00"
style=
"width:80px;"
>
<label>
终端手机号:
</label><input
id=
"phoneNum"
type=
"text"
class=
"form-control"
value=
"13146201119"
style=
"width:150px;"
>
<label>
终端手机号:
</label><input
id=
"phoneNum"
type=
"text"
class=
"form-control"
value=
"13146201119"
style=
"width:150px;"
>
<label>
消息流水号:
</label><input
id=
"msgWaterCode"
type=
"text"
class=
"form-control"
value=
"1"
style=
"width:60px;"
>
<label>
消息流水号:
</label><input
id=
"msgWaterCode"
type=
"text"
class=
"form-control"
value=
"1"
style=
"width:60px;"
>
<label>
是否加密:
</label><select
style=
"width:100px;"
id=
"encryptionType"
class=
"form-control"
>
<label>
是否加密:
</label><select
style=
"width:100px;"
id=
"encryptionType"
class=
"form-control"
>
...
@@ -187,30 +187,30 @@
...
@@ -187,30 +187,30 @@
<div
style=
"width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;background:skyblue;"
>
<div
style=
"width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;background:skyblue;"
>
<label>
选择附加消息:
</label><br>
<label>
选择附加消息:
</label><br>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li
style=
"width:50px;"
><label><input
type=
"checkbox"
id=
"01"
/>
里程
</label>
</li>
<li
style=
"width:50px;"
><label><input
type=
"checkbox"
id=
"01"
onclick=
"extraSelect(this)"
/>
里程
</label>
</li>
<li
style=
"width:60px;"
><label><input
type=
"checkbox"
id=
"02"
/>
油量
</label>
</li>
<li
style=
"width:60px;"
><label><input
type=
"checkbox"
id=
"02"
onclick=
"extraSelect(this)"
/>
油量
</label>
</li>
<li
style=
"width:140px;"
><label
style=
"width: 130px;"
><input
type=
"checkbox"
id=
"11"
/>
超速报警附加信息
</label>
</li>
<li
style=
"width:140px;"
><label
style=
"width: 130px;"
><input
type=
"checkbox"
id=
"11"
onclick=
"extraSelect(this)"
/>
超速报警附加信息
</label>
</li>
<li
style=
"width:200px;"
><label
style=
"width: 190px;"
><input
type=
"checkbox"
id=
"12"
/>
进出区域/路线报警附加信息
</label>
</li>
<li
style=
"width:200px;"
><label
style=
"width: 190px;"
><input
type=
"checkbox"
id=
"12"
onclick=
"extraSelect(this)"
/>
进出区域/路线报警附加信息
</label>
</li>
<li
style=
"width:260px;"
><label
style=
"width: 250px;"
><input
type=
"checkbox"
id=
"13"
/>
路段行驶时间不足/过长报警附加信息
</label>
</li>
<li
style=
"width:260px;"
><label
style=
"width: 250px;"
><input
type=
"checkbox"
id=
"13"
onclick=
"extraSelect(this)"
/>
路段行驶时间不足/过长报警附加信息
</label>
</li>
<li
style=
"width:80px;"
><label
style=
"width: 70px;"
><input
type=
"checkbox"
id=
"2A"
/>
IO状态位
</label>
</li>
<li
style=
"width:80px;"
><label
style=
"width: 70px;"
><input
type=
"checkbox"
id=
"2A"
onclick=
"extraSelect(this)"
/>
IO状态位
</label>
</li>
<li
style=
"width:170px;"
><label
style=
"width: 160px;"
><input
type=
"checkbox"
id=
"30"
/>
无线通信网络信号强度
</label>
</li>
<li
style=
"width:170px;"
><label
style=
"width: 160px;"
><input
type=
"checkbox"
id=
"30"
onclick=
"extraSelect(this)"
/>
无线通信网络信号强度
</label>
</li>
<li
style=
"width:200px;"
><label
style=
"width: 150px;"
><input
type=
"checkbox"
id=
"31"
/>
GNSS 定位卫星数
</label>
</li>
<li
style=
"width:200px;"
><label
style=
"width: 150px;"
><input
type=
"checkbox"
id=
"31"
onclick=
"extraSelect(this)"
/>
GNSS 定位卫星数
</label>
</li>
<li
style=
"width:120px;"
><label
style=
"width: 120px;"
><input
type=
"checkbox"
id=
"EA"
/>
基础数据项列表
</label>
</li>
<li
style=
"width:120px;"
><label
style=
"width: 120px;"
><input
type=
"checkbox"
id=
"EA"
onclick=
"extraSelect(this)"
/>
基础数据项列表
</label>
</li>
<li
style=
"width:145px;"
><label
style=
"width: 140px;"
><input
type=
"checkbox"
id=
"EB"
/>
轿车 OBD 数据流
</label>
</li>
<li
style=
"width:145px;"
><label
style=
"width: 140px;"
><input
type=
"checkbox"
id=
"EB"
onclick=
"extraSelect(this)"
/>
轿车 OBD 数据流
</label>
</li>
<li
style=
"width:200px;"
><label
style=
"width: 150px;"
><input
type=
"checkbox"
id=
"FA"
/>
报警事件 ID 数据项
</label>
</li>
<li
style=
"width:200px;"
><label
style=
"width: 150px;"
><input
type=
"checkbox"
id=
"FA"
onclick=
"extraSelect(this)"
/>
报警事件 ID 数据项
</label>
</li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"div_ext_01"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label>
里程:
</label><input
id=
"extra_01"
type=
"text"
class=
"form-control"
value=
"20202020"
></li>
<li><label>
里程:
</label><input
id=
"extra_01"
type=
"text"
class=
"form-control"
value=
"20202020"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"div_ext_02"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label>
油量:
</label><input
id=
"extra_02"
type=
"text"
class=
"form-control"
value=
"5200"
></li>
<li><label>
油量:
</label><input
id=
"extra_02"
type=
"text"
class=
"form-control"
value=
"5200"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"div_ext_11"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<label>
超速报警附加信息:
</label><br>
<label>
超速报警附加信息:
</label><br>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label>
位置类型:
</label><select
id=
"extra_11"
class=
"form-control"
>
<li><label>
位置类型:
</label><select
id=
"extra_11"
class=
"form-control"
>
...
@@ -222,7 +222,7 @@
...
@@ -222,7 +222,7 @@
<li><label
style=
"word-break:break-all;font-size:10px;"
>
区域或路段ID:
</label><input
id=
"areaId_1"
type=
"text"
class=
"form-control"
value=
"2020"
></li>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
区域或路段ID:
</label><input
id=
"areaId_1"
type=
"text"
class=
"form-control"
value=
"2020"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"div_ext_12"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<label>
进出区域/路线报警附加信息:
</label><br>
<label>
进出区域/路线报警附加信息:
</label><br>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label>
位置类型:
</label><select
id=
"extra_12"
class=
"form-control"
>
<li><label>
位置类型:
</label><select
id=
"extra_12"
class=
"form-control"
>
...
@@ -237,7 +237,7 @@
...
@@ -237,7 +237,7 @@
<option
value=
"1"
>
出
</option></select></li>
<option
value=
"1"
>
出
</option></select></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"div_ext_13"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<label>
路段行驶时间不足/过长报警附加信息:
</label><br>
<label>
路段行驶时间不足/过长报警附加信息:
</label><br>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label>
路段Id:
</label><input
id=
"areaId_3"
type=
"text"
class=
"form-control"
value=
"2020"
></li>
<li><label>
路段Id:
</label><input
id=
"areaId_3"
type=
"text"
class=
"form-control"
value=
"2020"
></li>
...
@@ -247,53 +247,53 @@
...
@@ -247,53 +247,53 @@
<option
value=
"1"
>
过长
</option></select></li>
<option
value=
"1"
>
过长
</option></select></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"div_ext_2A"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<label>
状态位:
</label><br>
<label>
状态位:
</label><br>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li
style=
"width:180px;"
><select
style=
"width:170px;"
id=
"deepSleepStatus"
class=
"form-control"
>
<li
style=
"width:180px;"
><select
style=
"width:170px;"
id=
"deepSleepStatus"
class=
"form-control"
>
<option
value=
"0"
>
深度休眠状态(否)
</option>
<option
value=
"0"
>
深度休眠状态(否)
</option>
<option
value=
"1
048576
"
>
深度休眠状态(是)
</option></select></li>
<option
value=
"1"
>
深度休眠状态(是)
</option></select></li>
<li
style=
"width:180px;"
><select
style=
"width:170px;"
id=
"sleepStatus"
class=
"form-control"
>
<li
style=
"width:180px;"
><select
style=
"width:170px;"
id=
"sleepStatus"
class=
"form-control"
>
<option
value=
"0"
>
休眠状态(否)
</option>
<option
value=
"0"
>
休眠状态(否)
</option>
<option
value=
"2
097152
"
>
休眠状态(是)
</option></select></li>
<option
value=
"2"
>
休眠状态(是)
</option></select></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"div_ext_30"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
无线通信网络信号强度:
</label><input
id=
"extra_30"
type=
"text"
class=
"form-control"
value=
"33"
></li>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
无线通信网络信号强度:
</label><input
id=
"extra_30"
type=
"text"
class=
"form-control"
value=
"33"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"div_ext_31"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
GNSS定位卫星数:
</label><input
id=
"extra_31"
type=
"text"
class=
"form-control"
value=
"2"
></li>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
GNSS定位卫星数:
</label><input
id=
"extra_31"
type=
"text"
class=
"form-control"
value=
"2"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;padding-left:10px;padding-right:10px;"
>
<div
id=
"div_ext_EA"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;padding-left:10px;padding-right:10px;"
>
<label>
基础数据项列表:
</label><br>
<label>
基础数据项列表:
</label><br>
<div
style=
"width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;background:skyblue;"
>
<div
style=
"width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;background:skyblue;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0001"
/>
扩展状态标志位
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0001"
onclick=
"baseInfoSelect(this)"
/>
扩展状态标志位
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0002"
/>
扩展报警标志位
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0002"
onclick=
"baseInfoSelect(this)"
/>
扩展报警标志位
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0003"
/>
行 驶 总 里 程
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0003"
onclick=
"baseInfoSelect(this)"
/>
行 驶 总 里 程
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0004"
/>
行 驶 总 油 耗
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0004"
onclick=
"baseInfoSelect(this)"
/>
行 驶 总 油 耗
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0005"
/>
总 运 行 时 长
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0005"
onclick=
"baseInfoSelect(this)"
/>
总 运 行 时 长
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0006"
/>
总 熄 火 时 长
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0006"
onclick=
"baseInfoSelect(this)"
/>
总 熄 火 时 长
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0007"
/>
总 怠 速 时 长
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0007"
onclick=
"baseInfoSelect(this)"
/>
总 怠 速 时 长
</label>
</li>
<li
style=
"width:180px;"
><label
style=
"width:170px"
><input
type=
"checkbox"
id=
"0010"
/>
此刻1秒内的加速度数据
</label>
</li>
<li
style=
"width:180px;"
><label
style=
"width:170px"
><input
type=
"checkbox"
id=
"0010"
onclick=
"baseInfoSelect(this)"
/>
此刻1秒内的加速度数据
</label>
</li>
<li
style=
"width:140px;"
><label
style=
"width:130px"
><input
type=
"checkbox"
id=
"0011"
/>
车辆安防状态信息
</label>
</li>
<li
style=
"width:140px;"
><label
style=
"width:130px"
><input
type=
"checkbox"
id=
"0011"
onclick=
"baseInfoSelect(this)"
/>
车辆安防状态信息
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0012"
/>
车辆电瓶电压
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"0012"
onclick=
"baseInfoSelect(this)"
/>
车辆电瓶电压
</label>
</li>
<li
style=
"width:140px;"
><label
style=
"width:130px"
><input
type=
"checkbox"
id=
"0013"
/>
终端内置电池电压
</label>
</li>
<li
style=
"width:140px;"
><label
style=
"width:130px"
><input
type=
"checkbox"
id=
"0013"
onclick=
"baseInfoSelect(this)"
/>
终端内置电池电压
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"001D"
/>
GPS 定位标志
</label>
</li>
<li
style=
"width:130px;"
><label
style=
"width:120px"
><input
type=
"checkbox"
id=
"001D"
onclick=
"baseInfoSelect(this)"
/>
GPS 定位标志
</label>
</li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0001"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
扩展状态标志位:
</label><select
style=
"width:150px;"
id=
"dataId_0001"
class=
"form-control"
>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
扩展状态标志位:
</label><select
style=
"width:150px;"
id=
"dataId_0001"
class=
"form-control"
>
<option
value=
"0"
>
撤防上报
</option>
<option
value=
"0"
>
撤防上报
</option>
<option
value=
"1"
>
设防上报
</option></select></li></li>
<option
value=
"1"
>
设防上报
</option></select></li></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0002"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<label>
扩展报警标志位:
</label><br>
<label>
扩展报警标志位:
</label><br>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li
style=
"width:150px;"
><select
style=
"width:140px;"
id=
"waterTemperatureAlarm"
class=
"form-control"
>
<li
style=
"width:150px;"
><select
style=
"width:140px;"
id=
"waterTemperatureAlarm"
class=
"form-control"
>
...
@@ -340,7 +340,7 @@
...
@@ -340,7 +340,7 @@
<option
value=
"1048576"
>
RTC 模块故障报警(是)
</option></select></li>
<option
value=
"1048576"
>
RTC 模块故障报警(是)
</option></select></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0003"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<label>
行驶总里程:
</label><br>
<label>
行驶总里程:
</label><br>
<li
style=
"width:600px;"
><label>
统计算法:
</label><select
style=
"width:180px;"
id=
"caculateType"
class=
"form-control"
>
<li
style=
"width:600px;"
><label>
统计算法:
</label><select
style=
"width:180px;"
id=
"caculateType"
class=
"form-control"
>
...
@@ -361,7 +361,7 @@
...
@@ -361,7 +361,7 @@
</li>
</li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0004"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<label>
行驶总油耗:
</label><br>
<label>
行驶总油耗:
</label><br>
<li
style=
"width:600px;"
><label>
统计算法:
</label><select
style=
"width:150px;"
id=
"caculateType_2"
class=
"form-control"
>
<li
style=
"width:600px;"
><label>
统计算法:
</label><select
style=
"width:150px;"
id=
"caculateType_2"
class=
"form-control"
>
...
@@ -377,29 +377,29 @@
...
@@ -377,29 +377,29 @@
</li>
</li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0005"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label>
总运行时长:
</label><input
id=
"dataId_0005"
type=
"text"
class=
"form-control"
value=
"360000"
></li>
<li><label>
总运行时长:
</label><input
id=
"dataId_0005"
type=
"text"
class=
"form-control"
value=
"360000"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0006"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label>
总熄火时长:
</label><input
id=
"dataId_0006"
type=
"text"
class=
"form-control"
value=
"72000"
></li>
<li><label>
总熄火时长:
</label><input
id=
"dataId_0006"
type=
"text"
class=
"form-control"
value=
"72000"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0007"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label>
总怠速时长:
</label><input
id=
"dataId_0007"
type=
"text"
class=
"form-control"
value=
"480000"
></li>
<li><label>
总怠速时长:
</label><input
id=
"dataId_0007"
type=
"text"
class=
"form-control"
value=
"480000"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0010"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<label>
此刻 1 秒内的加速度数据:
</label>
<label>
此刻 1 秒内的加速度数据:
</label>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
采集的点个数:
</label><input
id=
"pointCount"
type=
"text"
class=
"form-control"
value=
"4"
></li>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
采集的点个数:
</label><input
id=
"pointCount"
type=
"text"
class=
"form-control"
value=
"4"
></li>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
采集间隔(毫秒):
</label><input
id=
"collectIntercal"
type=
"text"
class=
"form-control"
value=
"4"
><label
style=
"width:50px;"
></label></li>
<li><label
style=
"word-break:break-all;font-size:10px;"
>
采集间隔(毫秒):
</label><input
id=
"collectIntercal"
type=
"text"
class=
"form-control"
value=
"4"
><label
style=
"width:50px;"
></label></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0011"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<label>
车辆安防状态信息:
</label>
<label>
车辆安防状态信息:
</label>
<div
style=
"margin-left:20px;"
>
<div
style=
"margin-left:20px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
...
@@ -572,17 +572,17 @@
...
@@ -572,17 +572,17 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0012"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li
style=
"width:400px;"
><label
style=
"width:110px;"
>
车辆电瓶电压:
</label><input
id=
"dataId_0012"
type=
"text"
class=
"form-control"
value=
"36"
></li>
<li
style=
"width:400px;"
><label
style=
"width:110px;"
>
车辆电瓶电压:
</label><input
id=
"dataId_0012"
type=
"text"
class=
"form-control"
value=
"36"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_0013"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li
style=
"width:400px;"
><label
style=
"width:130px;"
>
终端内置电池电压:
</label><input
id=
"dataId_0013"
type=
"text"
class=
"form-control"
value=
"6"
></li>
<li
style=
"width:400px;"
><label
style=
"width:130px;"
>
终端内置电池电压:
</label><input
id=
"dataId_0013"
type=
"text"
class=
"form-control"
value=
"6"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"base_001D"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-radius:10px;padding:2px;margin-top:5px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li
style=
"width:400px;"
><label
style=
"width:110px;"
>
GPS定位标志:
</label><select
style=
"width:165px;"
id=
"dataId_001D"
class=
"form-control"
>
<li
style=
"width:400px;"
><label
style=
"width:110px;"
>
GPS定位标志:
</label><select
style=
"width:165px;"
id=
"dataId_001D"
class=
"form-control"
>
<option
value=
"00"
>
不定位
</option>
<option
value=
"00"
>
不定位
</option>
...
@@ -591,7 +591,7 @@
...
@@ -591,7 +591,7 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<div
id=
"div_ext_EB"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;"
>
<label>
轿车 OBD 数据流:
</label><br>
<label>
轿车 OBD 数据流:
</label><br>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<li><label>
发动机转速:
</label><input
id=
"engineSpeed"
type=
"text"
class=
"form-control"
value=
"3000"
></li>
<li><label>
发动机转速:
</label><input
id=
"engineSpeed"
type=
"text"
class=
"form-control"
value=
"3000"
></li>
...
@@ -626,7 +626,7 @@
...
@@ -626,7 +626,7 @@
<li><label>
续航里程:
</label><input
id=
"enduranceMileage"
type=
"text"
class=
"form-control"
value=
"505"
></li>
<li><label>
续航里程:
</label><input
id=
"enduranceMileage"
type=
"text"
class=
"form-control"
value=
"505"
></li>
</ul>
</ul>
</div>
</div>
<div
style=
"
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;padding-left:10px;padding-right:10px;"
>
<div
id=
"div_ext_FA"
style=
"display:none;
width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;margin-top:5px;padding-left:10px;padding-right:10px;"
>
<label>
报警事件:
</label><br>
<label>
报警事件:
</label><br>
<div
style=
"width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;background:skyblue;"
>
<div
style=
"width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;background:skyblue;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
<ul
class=
"protocol_content"
style=
"padding:0px;"
>
...
@@ -745,12 +745,16 @@ $("#sendMsgBtn").click(function(){
...
@@ -745,12 +745,16 @@ $("#sendMsgBtn").click(function(){
data
[
"
baseInfo
"
]
=
getBaseInfo
();
data
[
"
baseInfo
"
]
=
getBaseInfo
();
data
[
"
extraInfo
"
]
=
getExtraInfo
();
data
[
"
extraInfo
"
]
=
getExtraInfo
();
console
.
log
(
data
)
/**
var host = window.location.host;
var host = window.location.host;
$
(
"
#showFeedback
"
).
val
(
""
)
$("#showFeedback").val("")
;
$.ajax({
$.ajax({
url
:
"
http://
"
+
host
+
"
/messageTools/message_process/porcess
TerminalRegister
Msg
"
,
url:"http://" + host + "/messageTools/message_process/porcess
Location
Msg",
type:"post",
type:"post",
data
:
data
,
data:JSON.stringify(data),
contentType:"application/json",
dataType:"json",
dataType:"json",
success:function(data){
success:function(data){
if(data.status == 200){
if(data.status == 200){
...
@@ -759,13 +763,14 @@ $("#sendMsgBtn").click(function(){
...
@@ -759,13 +763,14 @@ $("#sendMsgBtn").click(function(){
theShow = theShow + "收到数据: " + data.result + "\n";
theShow = theShow + "收到数据: " + data.result + "\n";
theShow = theShow + "收到数据16进制: " + data.resultH + "\n";
theShow = theShow + "收到数据16进制: " + data.resultH + "\n";
theShow = theShow + "解析数据: " + JSON.stringify(data.parse) + "\n";
theShow = theShow + "解析数据: " + JSON.stringify(data.parse) + "\n";
$
(
"
#showFeedback
"
).
val
(
theShow
)
$("#showFeedback").val(theShow)
;
}else{
}else{
$
(
"
#showFeedback
"
).
val
(
data
.
message
)
$("#showFeedback").val(data.message)
;
alert(data.message);
alert(data.message);
}
}
}
}
});
});
*/
});
});
/*******************************************
/*******************************************
...
@@ -773,35 +778,35 @@ $("#sendMsgBtn").click(function(){
...
@@ -773,35 +778,35 @@ $("#sendMsgBtn").click(function(){
*******************************************/
*******************************************/
function
getBaseInfo
(){
function
getBaseInfo
(){
//报警标志信息
//报警标志信息
var
emergencyAlarm
=
parse
n
Int
(
$
(
"
#emergencyAlarm
"
).
val
());
var
emergencyAlarm
=
parseInt
(
$
(
"
#emergencyAlarm
"
).
val
());
var
overspeedAlarm
=
parse
nInt
(
$
(
"
#overspeedAlarm
"
)).
val
(
);
var
overspeedAlarm
=
parse
Int
(
$
(
"
#overspeedAlarm
"
).
val
()
);
var
fatigueDriving
=
parse
n
Int
(
$
(
"
#fatigueDriving
"
).
val
());
var
fatigueDriving
=
parseInt
(
$
(
"
#fatigueDriving
"
).
val
());
var
dangerAlarm
=
parse
n
Int
(
$
(
"
#dangerAlarm
"
).
val
());
var
dangerAlarm
=
parseInt
(
$
(
"
#dangerAlarm
"
).
val
());
var
GNSSTrouble
=
parse
n
Int
(
$
(
"
#GNSSTrouble
"
).
val
());
var
GNSSTrouble
=
parseInt
(
$
(
"
#GNSSTrouble
"
).
val
());
var
GNSSAntennaeLost
=
parse
n
Int
(
$
(
"
#GNSSAntennaeLost
"
).
val
());
var
GNSSAntennaeLost
=
parseInt
(
$
(
"
#GNSSAntennaeLost
"
).
val
());
var
GNSSAntennaeShortOut
=
parse
n
Int
(
$
(
"
#GNSSAntennaeShortOut
"
).
val
());
var
GNSSAntennaeShortOut
=
parseInt
(
$
(
"
#GNSSAntennaeShortOut
"
).
val
());
var
TerminalMainPowerLackVoltage
=
parse
n
Int
(
$
(
"
#TerminalMainPowerLackVoltage
"
).
val
());
var
TerminalMainPowerLackVoltage
=
parseInt
(
$
(
"
#TerminalMainPowerLackVoltage
"
).
val
());
var
TerminalMainPowerLostConnect
=
parse
n
Int
(
$
(
"
#TerminalMainPowerLostConnect
"
).
val
());
var
TerminalMainPowerLostConnect
=
parseInt
(
$
(
"
#TerminalMainPowerLostConnect
"
).
val
());
var
TerMinalLCDTrouble
=
parse
n
Int
(
$
(
"
#TerMinalLCDTrouble
"
).
val
());
var
TerMinalLCDTrouble
=
parseInt
(
$
(
"
#TerMinalLCDTrouble
"
).
val
());
var
TTSTrouble
=
parse
n
Int
(
$
(
"
#TTSTrouble
"
).
val
());
var
TTSTrouble
=
parseInt
(
$
(
"
#TTSTrouble
"
).
val
());
var
cameraTrouble
=
parse
n
Int
(
$
(
"
#cameraTrouble
"
).
val
());
var
cameraTrouble
=
parseInt
(
$
(
"
#cameraTrouble
"
).
val
());
var
ICTrouble
=
parse
n
Int
(
$
(
"
#ICTrouble
"
).
val
());
var
ICTrouble
=
parseInt
(
$
(
"
#ICTrouble
"
).
val
());
var
speedEarlyWarning
=
parse
n
Int
(
$
(
"
#speedEarlyWarning
"
).
val
());
var
speedEarlyWarning
=
parseInt
(
$
(
"
#speedEarlyWarning
"
).
val
());
var
fatigueDrivingearlyWarning
=
parse
n
Int
(
$
(
"
#fatigueDrivingearlyWarning
"
).
val
());
var
fatigueDrivingearlyWarning
=
parseInt
(
$
(
"
#fatigueDrivingearlyWarning
"
).
val
());
var
drivingOverTime
=
parse
n
Int
(
$
(
"
#drivingOverTime
"
).
val
());
var
drivingOverTime
=
parseInt
(
$
(
"
#drivingOverTime
"
).
val
());
var
stoppingOverTime
=
parse
n
Int
(
$
(
"
#stoppingOverTime
"
).
val
());
var
stoppingOverTime
=
parseInt
(
$
(
"
#stoppingOverTime
"
).
val
());
var
InOutArea
=
parse
n
Int
(
$
(
"
#InOutArea
"
).
val
());
var
InOutArea
=
parseInt
(
$
(
"
#InOutArea
"
).
val
());
var
InOutRouting
=
parse
n
Int
(
$
(
"
#InOutRouting
"
).
val
());
var
InOutRouting
=
parseInt
(
$
(
"
#InOutRouting
"
).
val
());
var
drivingLongOrShort
=
parse
n
Int
(
$
(
"
#drivingLongOrShort
"
).
val
());
var
drivingLongOrShort
=
parseInt
(
$
(
"
#drivingLongOrShort
"
).
val
());
var
routingDivergeAlarm
=
parse
n
Int
(
$
(
"
#routingDivergeAlarm
"
).
val
());
var
routingDivergeAlarm
=
parseInt
(
$
(
"
#routingDivergeAlarm
"
).
val
());
var
VSSTrouble
=
parse
n
Int
(
$
(
"
#VSSTrouble
"
).
val
());
var
VSSTrouble
=
parseInt
(
$
(
"
#VSSTrouble
"
).
val
());
var
oilException
=
parse
n
Int
(
$
(
"
#oilException
"
).
val
());
var
oilException
=
parseInt
(
$
(
"
#oilException
"
).
val
());
var
carLost
=
parse
n
Int
(
$
(
"
#carLost
"
).
val
());
var
carLost
=
parseInt
(
$
(
"
#carLost
"
).
val
());
var
illegalFire
=
parse
n
Int
(
$
(
"
#illegalFire
"
).
val
());
var
illegalFire
=
parseInt
(
$
(
"
#illegalFire
"
).
val
());
var
illegalMoving
=
parse
n
Int
(
$
(
"
#illegalMoving
"
).
val
());
var
illegalMoving
=
parseInt
(
$
(
"
#illegalMoving
"
).
val
());
var
collisionAlarm
=
parse
n
Int
(
$
(
"
#collisionAlarm
"
).
val
());
var
collisionAlarm
=
parseInt
(
$
(
"
#collisionAlarm
"
).
val
());
var
rollOverAlarm
=
parse
n
Int
(
$
(
"
#rollOverAlarm
"
).
val
());
var
rollOverAlarm
=
parseInt
(
$
(
"
#rollOverAlarm
"
).
val
());
var
illegalOpenDoor
=
parse
n
Int
(
$
(
"
#illegalOpenDoor
"
).
val
());
var
illegalOpenDoor
=
parseInt
(
$
(
"
#illegalOpenDoor
"
).
val
());
var
alarmFlag
=
emergencyAlarm
+
overspeedAlarm
+
fatigueDriving
+
dangerAlarm
+
GNSSTrouble
var
alarmFlag
=
emergencyAlarm
+
overspeedAlarm
+
fatigueDriving
+
dangerAlarm
+
GNSSTrouble
alarmFlag
=
alarmFlag
+
GNSSAntennaeLost
+
GNSSAntennaeShortOut
+
TerminalMainPowerLackVoltage
+
TerminalMainPowerLostConnect
+
TerMinalLCDTrouble
alarmFlag
=
alarmFlag
+
GNSSAntennaeLost
+
GNSSAntennaeShortOut
+
TerminalMainPowerLackVoltage
+
TerminalMainPowerLostConnect
+
TerMinalLCDTrouble
alarmFlag
=
alarmFlag
+
TTSTrouble
+
cameraTrouble
+
ICTrouble
+
speedEarlyWarning
+
fatigueDrivingearlyWarning
alarmFlag
=
alarmFlag
+
TTSTrouble
+
cameraTrouble
+
ICTrouble
+
speedEarlyWarning
+
fatigueDrivingearlyWarning
...
@@ -810,36 +815,36 @@ function getBaseInfo(){
...
@@ -810,36 +815,36 @@ function getBaseInfo(){
alarmFlag
=
alarmFlag
+
illegalMoving
+
collisionAlarm
+
rollOverAlarm
+
illegalOpenDoor
alarmFlag
=
alarmFlag
+
illegalMoving
+
collisionAlarm
+
rollOverAlarm
+
illegalOpenDoor
//获取状态位
//获取状态位
var
ACCStatus
=
parse
n
Int
(
$
(
"
#ACCStatus
"
).
val
());
var
ACCStatus
=
parseInt
(
$
(
"
#ACCStatus
"
).
val
());
var
locationStatus
=
parse
n
Int
(
$
(
"
#locationStatus
"
).
val
())
var
locationStatus
=
parseInt
(
$
(
"
#locationStatus
"
).
val
())
var
latitudeStatus
=
parse
n
Int
(
$
(
"
#latitudeStatus
"
).
val
())
var
latitudeStatus
=
parseInt
(
$
(
"
#latitudeStatus
"
).
val
())
var
longitudeStatus
=
parse
n
Int
(
$
(
"
#longitudeStatus
"
).
val
())
var
longitudeStatus
=
parseInt
(
$
(
"
#longitudeStatus
"
).
val
())
var
runStatus
=
parse
n
Int
(
$
(
"
#runStatus
"
).
val
())
var
runStatus
=
parseInt
(
$
(
"
#runStatus
"
).
val
())
var
isLocationEncrypt
=
parse
n
Int
(
$
(
"
#isLocationEncrypt
"
).
val
())
var
isLocationEncrypt
=
parseInt
(
$
(
"
#isLocationEncrypt
"
).
val
())
var
isFull
=
parse
n
Int
(
$
(
"
#isFull
"
).
val
())
var
isFull
=
parseInt
(
$
(
"
#isFull
"
).
val
())
var
oilRouteStatus
=
parse
n
Int
(
$
(
"
#oilRouteStatus
"
).
val
())
var
oilRouteStatus
=
parseInt
(
$
(
"
#oilRouteStatus
"
).
val
())
var
powerStatus
=
parse
n
Int
(
$
(
"
#powerStatus
"
).
val
())
var
powerStatus
=
parseInt
(
$
(
"
#powerStatus
"
).
val
())
var
doorLockStatus
=
parse
n
Int
(
$
(
"
#ACCStatus
"
).
val
())
var
doorLockStatus
=
parseInt
(
$
(
"
#ACCStatus
"
).
val
())
var
frontDoor
=
parse
n
Int
(
$
(
"
#frontDoor
"
).
val
())
var
frontDoor
=
parseInt
(
$
(
"
#frontDoor
"
).
val
())
var
middleDoor
=
parse
n
Int
(
$
(
"
#middleDoor
"
).
val
())
var
middleDoor
=
parseInt
(
$
(
"
#middleDoor
"
).
val
())
var
backDoor
=
parse
n
Int
(
$
(
"
#backDoor
"
).
val
())
var
backDoor
=
parseInt
(
$
(
"
#backDoor
"
).
val
())
var
drivingDoor
=
parse
n
Int
(
$
(
"
#drivingDoor
"
).
val
())
var
drivingDoor
=
parseInt
(
$
(
"
#drivingDoor
"
).
val
())
var
otherDoor
=
parse
n
Int
(
$
(
"
#otherDoor
"
).
val
())
var
otherDoor
=
parseInt
(
$
(
"
#otherDoor
"
).
val
())
var
GPSStatus
=
parse
n
Int
(
$
(
"
#GPSStatus
"
).
val
())
var
GPSStatus
=
parseInt
(
$
(
"
#GPSStatus
"
).
val
())
var
beidouStatus
=
parse
n
Int
(
$
(
"
#beidouStatus
"
).
val
())
var
beidouStatus
=
parseInt
(
$
(
"
#beidouStatus
"
).
val
())
var
GLONSSStatus
=
parse
n
Int
(
$
(
"
#GLONSSStatus
"
).
val
())
var
GLONSSStatus
=
parseInt
(
$
(
"
#GLONSSStatus
"
).
val
())
var
GalileoStatus
=
parse
n
Int
(
$
(
"
#GalileoStatus
"
).
val
())
var
GalileoStatus
=
parseInt
(
$
(
"
#GalileoStatus
"
).
val
())
var
status
=
ACCStatus
+
locationStatus
+
latitudeStatus
+
longitudeStatus
+
runStatus
var
status
=
ACCStatus
+
locationStatus
+
latitudeStatus
+
longitudeStatus
+
runStatus
status
=
status
+
isLocationEncrypt
+
isFull
+
oilRouteStatus
+
powerStatus
+
doorLockStatus
status
=
status
+
isLocationEncrypt
+
isFull
+
oilRouteStatus
+
powerStatus
+
doorLockStatus
status
=
status
+
frontDoor
+
middleDoor
+
backDoor
+
drivingDoor
+
otherDoor
status
=
status
+
frontDoor
+
middleDoor
+
backDoor
+
drivingDoor
+
otherDoor
status
=
status
+
GPSStatus
+
beidouStatus
+
GLONSSStatus
+
GalileoStatus
status
=
status
+
GPSStatus
+
beidouStatus
+
GLONSSStatus
+
GalileoStatus
var
latitude
=
parsenIn
t
(
$
(
"
#latitude
"
).
val
());
var
latitude
=
parseFloa
t
(
$
(
"
#latitude
"
).
val
());
var
longtitude
=
parse
nIn
t
(
$
(
"
#longtitude
"
).
val
());
var
longtitude
=
parse
Floa
t
(
$
(
"
#longtitude
"
).
val
());
var
elevation
=
parsenInt
(
$
(
"
#elevation
"
).
val
()
);
var
elevation
=
$
(
"
#elevation
"
).
val
(
);
var
speed
=
parsenInt
(
$
(
"
#speed
"
).
val
()
);
var
speed
=
$
(
"
#speed
"
).
val
(
);
var
directionAngle
=
parsenInt
(
$
(
"
#directionAngle
"
).
val
()
);
var
directionAngle
=
$
(
"
#directionAngle
"
).
val
(
);
var
infoTime
=
parsenInt
(
$
(
"
#infoTime
"
).
val
()
);
var
infoTime
=
$
(
"
#infoTime
"
).
val
(
);
var
data
=
{};
var
data
=
{};
data
[
"
alarmFlag
"
]
=
alarmFlag
;
data
[
"
alarmFlag
"
]
=
alarmFlag
;
...
@@ -857,11 +862,229 @@ function getBaseInfo(){
...
@@ -857,11 +862,229 @@ function getBaseInfo(){
获取地理位置附加信息数据
获取地理位置附加信息数据
*******************************************/
*******************************************/
function
getExtraInfo
(){
function
getExtraInfo
(){
var
extraInfo
=
{}
if
(
$
(
"
#01
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
01
"
]
=
getExtra_01
();
}
if
(
$
(
"
#02
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
02
"
]
=
getExtra_02
();
}
if
(
$
(
"
#11
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
11
"
]
=
getExtra_11
();
}
if
(
$
(
"
#12
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
12
"
]
=
getExtra_12
();
}
if
(
$
(
"
#13
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
13
"
]
=
getExtra_13
();
}
if
(
$
(
"
#2A
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
2A
"
]
=
getExtra_2A
();
}
if
(
$
(
"
#30
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
30
"
]
=
getExtra_30
();
}
if
(
$
(
"
#31
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
31
"
]
=
getExtra_31
();
}
if
(
$
(
"
#EA
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
EA
"
]
=
getExtra_EA
();
}
if
(
$
(
"
#EB
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
EB
"
]
=
getExtra_EB
();
}
if
(
$
(
"
#FA
"
).
is
(
'
:checked
'
)){
extraInfo
[
"
FA
"
]
=
getExtra_FA
();
}
return
extraInfo
;
}
//获取附加信息01
function
getExtra_01
(){
var
data
=
{};
var
extra_01
=
$
(
"
#extra_01
"
).
val
();
data
[
"
extra_01
"
]
=
extra_01
;
return
data
;
}
//获取附加信息02
function
getExtra_02
(){
var
data
=
{};
var
extra_02
=
$
(
"
#extra_02
"
).
val
();
data
[
"
extra_02
"
]
=
extra_02
;
return
data
;
}
//获取附加信息11
function
getExtra_11
(){
var
data
=
{};
var
locationType_OverSpeed
=
$
(
"
#extra_11
"
).
val
();
var
areaId_OverSpeed
=
$
(
"
#areaId_1
"
).
val
();
data
[
"
locationType_OverSpeed
"
]
=
locationType_OverSpeed
;
data
[
"
areaId_OverSpeed
"
]
=
areaId_OverSpeed
;
return
data
;
}
//获取附加信息12
function
getExtra_12
(){
var
data
=
{};
var
locationType_inOut
=
$
(
"
#extra_12
"
).
val
();
var
areaId_inOut
=
$
(
"
#areaId_2
"
).
val
();
var
direction
=
$
(
"
#direction
"
).
val
();
data
[
"
locationType_inOut
"
]
=
locationType_inOut
;
data
[
"
areaId_inOut
"
]
=
areaId_inOut
;
data
[
"
direction
"
]
=
direction
;
return
data
;
}
//获取附加信息13
function
getExtra_13
(){
var
data
=
{};
var
areaId_road
=
$
(
"
#areaId_3
"
).
val
();
var
drivingTime
=
$
(
"
#drivingTime
"
).
val
();
var
result
=
$
(
"
#result
"
).
val
();
data
[
"
areaId_road
"
]
=
areaId_road
;
data
[
"
drivingTime
"
]
=
drivingTime
;
data
[
"
result
"
]
=
result
;
return
data
;
}
//获取附加信息2A
function
getExtra_2A
(){
var
data
=
{};
var
deepSleepStatus
=
$
(
"
#deepSleepStatus
"
).
val
();
var
sleepStatus
=
$
(
"
#sleepStatus
"
).
val
();
data
[
"
deepSleepStatus
"
]
=
deepSleepStatus
;
data
[
"
sleepStatus
"
]
=
sleepStatus
;
return
data
;
}
//获取附加信息30
function
getExtra_30
(){
var
data
=
{};
var
extra_30
=
$
(
"
#extra_30
"
).
val
();
data
[
"
extra_30
"
]
=
extra_30
;
return
data
;
}
//获取附加信息31
function
getExtra_31
(){
var
data
=
{};
var
extra_31
=
$
(
"
#extra_31
"
).
val
();
data
[
"
extra_31
"
]
=
extra_31
;
return
data
;
}
//获取附加信息EA
function
getExtra_EA
(){
var
data
=
{};
if
(
$
(
"
#0001
"
).
is
(
'
:checked
'
)){
data
[
"
0001
"
]
=
getbaseInfo_0001
()
}
if
(
$
(
"
#0002
"
).
is
(
'
:checked
'
)){
data
[
"
0002
"
]
=
getbaseInfo_0002
()
}
if
(
$
(
"
#0003
"
).
is
(
'
:checked
'
)){
data
[
"
0003
"
]
=
getbaseInfo_0003
()
}
if
(
$
(
"
#0004
"
).
is
(
'
:checked
'
)){
data
[
"
0004
"
]
=
getbaseInfo_0004
()
}
if
(
$
(
"
#0005
"
).
is
(
'
:checked
'
)){
data
[
"
0005
"
]
=
getbaseInfo_0005
()
}
if
(
$
(
"
#0006
"
).
is
(
'
:checked
'
)){
data
[
"
0006
"
]
=
getbaseInfo_0006
()
}
if
(
$
(
"
#0007
"
).
is
(
'
:checked
'
)){
data
[
"
0007
"
]
=
getbaseInfo_0007
()
}
if
(
$
(
"
#0010
"
).
is
(
'
:checked
'
)){
data
[
"
0010
"
]
=
getbaseInfo_0010
()
}
if
(
$
(
"
#0011
"
).
is
(
'
:checked
'
)){
data
[
"
0011
"
]
=
getbaseInfo_0011
()
}
if
(
$
(
"
#0012
"
).
is
(
'
:checked
'
)){
data
[
"
0012
"
]
=
getbaseInfo_0012
()
}
if
(
$
(
"
#0013
"
).
is
(
'
:checked
'
)){
data
[
"
0013
"
]
=
getbaseInfo_0013
()
}
if
(
$
(
"
#001D
"
).
is
(
'
:checked
'
)){
data
[
"
001D
"
]
=
getbaseInfo_001D
()
}
return
data
;
}
//获取附加信息基础数据项0001
function
getbaseInfo_0001
(){
data
=
{}
data
[
"
dataId_0001
"
]
=
$
(
"
#dataId_0001
"
).
val
();
return
data
;
}
//获取附加信息基础数据项0002
function
getbaseInfo_0002
(){
data
=
{}
var
waterTemperatureAlarm
=
parseInt
(
$
(
"
#waterTemperatureAlarm
"
).
val
());
var
idlingOverlongAlarm
=
parseInt
(
$
(
"
#idlingOverlongAlarm
"
).
val
());
var
rapidlyAccelerateAlarm
=
parseInt
(
$
(
"
#rapidlyAccelerateAlarm
"
).
val
());
var
sharpSlowsownAlarm
=
parseInt
(
$
(
"
#sharpSlowsownAlarm
"
).
val
());
var
sharpCurve
=
parseInt
(
$
(
"
#sharpCurve
"
).
val
());
var
insertAlarm
=
parseInt
(
$
(
"
#insertAlarm
"
).
val
());
var
oilExpenseNotSupportAlarm
=
parseInt
(
$
(
"
#oilExpenseNotSupportAlarm
"
).
val
());
var
OBDNotSupportAlarm
=
parseInt
(
$
(
"
#OBDNotSupportAlarm
"
).
val
());
var
buslineNotSleepAlarm
=
parseInt
(
$
(
"
#buslineNotSleepAlarm
"
).
val
());
var
illegalOpenDoor
=
parseInt
(
$
(
"
#illegalOpenDoor_2
"
).
val
());
var
FLASHTroubleAlarm
=
parseInt
(
$
(
"
#FLASHTroubleAlarm
"
).
val
());
var
CANTroubleAlarm
=
parseInt
(
$
(
"
#CANTroubleAlarm
"
).
val
());
var
D3SensorTroubleAlarm
=
parseInt
(
$
(
"
#D3SensorTroubleAlarm
"
).
val
());
var
RTCTroubleAlarm
=
parseInt
(
$
(
"
#RTCTroubleAlarm
"
).
val
());
var
dataId_0002
=
waterTemperatureAlarm
+
idlingOverlongAlarm
+
rapidlyAccelerateAlarm
+
sharpSlowsownAlarm
+
sharpCurve
dataId_0002
=
dataId_0002
+
insertAlarm
+
oilExpenseNotSupportAlarm
+
OBDNotSupportAlarm
+
buslineNotSleepAlarm
+
illegalOpenDoor
dataId_0002
=
dataId_0002
+
FLASHTroubleAlarm
+
CANTroubleAlarm
+
D3SensorTroubleAlarm
+
RTCTroubleAlarm
data
[
"
dataId_0002
"
]
=
dataId_0002
;
return
data
;
}
//获取附加信息基础数据项0003
function
getbaseInfo_0003
(){
data
=
{}
data
[
"
caculateType
"
]
=
$
(
"
#caculateType
"
).
val
();
data
[
"
totalMileage
"
]
=
$
(
"
#totalMileage
"
).
val
();
return
data
;
}
//获取附加信息基础数据项0004
function
getbaseInfo_0004
(){
data
=
{}
data
[
"
caculateType
"
]
=
$
(
"
#caculateType_2
"
).
val
();
data
[
"
totalOil
"
]
=
$
(
"
#totalOil
"
).
val
();
return
data
;
}
//获取附加信息基础数据项0005
function
getbaseInfo_0005
(){
data
=
{}
data
[
"
dataId_0005
"
]
=
$
(
"
#dataId_0005
"
).
val
();
return
data
;
}
//获取附加信息基础数据项0006
function
getbaseInfo_0006
(){
data
=
{}
data
[
"
dataId_0006
"
]
=
$
(
"
#dataId_0006
"
).
val
();
return
data
;
}
//获取附加信息基础数据项0007
function
getbaseInfo_0007
(){
data
=
{}
data
[
"
dataId_0007
"
]
=
$
(
"
#dataId_0007
"
).
val
();
return
data
;
}
//获取附加信息基础数据项0010
function
getbaseInfo_0010
(){
data
=
{}
data
[
"
pointCount
"
]
=
$
(
"
#pointCount
"
).
val
();
data
[
"
collectIntercal
"
]
=
$
(
"
#collectIntercal
"
).
val
();
return
data
;
}
//获取附加信息基础数据项0011
function
getbaseInfo_0010
(){
data
=
{}
data
[
"
pointCount
"
]
=
$
(
"
#pointCount
"
).
val
();
data
[
"
collectIntercal
"
]
=
$
(
"
#collectIntercal
"
).
val
();
return
data
;
}
}
function
hasSubPkg
(){
function
hasSubPkg
(){
value
=
$
(
"
#subPkg
"
).
val
()
va
r
va
lue
=
$
(
"
#subPkg
"
).
val
()
if
(
value
==
"
8192
"
){
if
(
value
==
"
8192
"
){
$
(
"
#subPkg_label
"
).
css
(
"
color
"
,
"
black
"
)
$
(
"
#subPkg_label
"
).
css
(
"
color
"
,
"
black
"
)
$
(
"
#pkgCounts
"
).
removeAttr
(
"
disabled
"
)
$
(
"
#pkgCounts
"
).
removeAttr
(
"
disabled
"
)
...
@@ -871,5 +1094,120 @@ function hasSubPkg(){
...
@@ -871,5 +1094,120 @@ function hasSubPkg(){
}
}
}
}
//设置当前时间到时间输入框
(
function
(){
var
curTime
=
getCurTime
();
$
(
"
#infoTime
"
).
val
(
curTime
);
})();
//附加信息的选择与取消选择
function
extraSelect
(
e
){
if
(
$
(
e
).
is
(
'
:checked
'
)){
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
01
"
){
$
(
"
#div_ext_01
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
02
"
){
$
(
"
#div_ext_02
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
11
"
){
$
(
"
#div_ext_11
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
12
"
){
$
(
"
#div_ext_12
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
13
"
){
$
(
"
#div_ext_13
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
2A
"
){
$
(
"
#div_ext_2A
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
30
"
){
$
(
"
#div_ext_30
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
31
"
){
$
(
"
#div_ext_31
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
EA
"
){
$
(
"
#div_ext_EA
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
EB
"
){
$
(
"
#div_ext_EB
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
FA
"
){
$
(
"
#div_ext_FA
"
).
css
(
"
display
"
,
"
block
"
)
}
}
else
{
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
01
"
){
$
(
"
#div_ext_01
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
02
"
){
$
(
"
#div_ext_02
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
11
"
){
$
(
"
#div_ext_11
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
12
"
){
$
(
"
#div_ext_12
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
13
"
){
$
(
"
#div_ext_13
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
2A
"
){
$
(
"
#div_ext_2A
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
30
"
){
$
(
"
#div_ext_30
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
31
"
){
$
(
"
#div_ext_31
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
EA
"
){
$
(
"
#div_ext_EA
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
EB
"
){
$
(
"
#div_ext_EB
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
FA
"
){
$
(
"
#div_ext_FA
"
).
css
(
"
display
"
,
"
none
"
)
}
}
}
//基础数据项的选择与取消选择
function
baseInfoSelect
(
e
){
if
(
$
(
e
).
is
(
'
:checked
'
)){
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0001
"
){
$
(
"
#base_0001
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0002
"
){
$
(
"
#base_0002
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0003
"
){
$
(
"
#base_0003
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0004
"
){
$
(
"
#base_0004
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0005
"
){
$
(
"
#base_0005
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0006
"
){
$
(
"
#base_0006
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0007
"
){
$
(
"
#base_0007
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0010
"
){
$
(
"
#base_0010
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0011
"
){
$
(
"
#base_0011
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0012
"
){
$
(
"
#base_0012
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0013
"
){
$
(
"
#base_0013
"
).
css
(
"
display
"
,
"
block
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
001D
"
){
$
(
"
#base_001D
"
).
css
(
"
display
"
,
"
block
"
)
}
}
else
{
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0001
"
){
$
(
"
#base_0001
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0002
"
){
$
(
"
#base_0002
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0003
"
){
$
(
"
#base_0003
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0004
"
){
$
(
"
#base_0004
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0005
"
){
$
(
"
#base_0005
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0006
"
){
$
(
"
#base_0006
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0007
"
){
$
(
"
#base_0007
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0010
"
){
$
(
"
#base_0010
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0011
"
){
$
(
"
#base_0011
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0012
"
){
$
(
"
#base_0012
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
0013
"
){
$
(
"
#base_0013
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
001D
"
){
$
(
"
#base_001D
"
).
css
(
"
display
"
,
"
none
"
)
}
}
}
</script>
</script>
{% endblock %}
{% endblock %}
\ No newline at end of file
views/messageTools/message_process.py
View file @
03819733
...
@@ -4,6 +4,7 @@ from flask import Blueprint ,Response,request
...
@@ -4,6 +4,7 @@ from flask import Blueprint ,Response,request
from
configparser
import
ConfigParser
from
configparser
import
ConfigParser
from
lib.protocol.message.DataUpstreamTransport_msg
import
DataUpstreamTransport_msg
from
lib.protocol.message.DataUpstreamTransport_msg
import
DataUpstreamTransport_msg
from
lib.protocol.message.Location_msg
import
Location_msg
from
lib.protocol.message.TerminalHeartbeat_msg
import
TerminalHeartbeat_msg
from
lib.protocol.message.TerminalHeartbeat_msg
import
TerminalHeartbeat_msg
from
lib.protocol.message.TerminalRegister_msg
import
TerminalRegister_msg
from
lib.protocol.message.TerminalRegister_msg
import
TerminalRegister_msg
from
lib.protocol.message.TerminalVersionInfo_msg
import
TerminalVersionInfo_msg
from
lib.protocol.message.TerminalVersionInfo_msg
import
TerminalVersionInfo_msg
...
@@ -16,6 +17,8 @@ import json
...
@@ -16,6 +17,8 @@ import json
import
traceback
import
traceback
import
binascii
import
binascii
from
lib.util.jsonUtil
import
hasJsonDataIsNone
message_process
=
Blueprint
(
'message_process'
,
__name__
)
message_process
=
Blueprint
(
'message_process'
,
__name__
)
##########################################
##########################################
...
@@ -458,3 +461,60 @@ def porcessDataUpstreamTransportMsg_F4():
...
@@ -458,3 +461,60 @@ def porcessDataUpstreamTransportMsg_F4():
data
[
"status"
]
=
"4003"
data
[
"status"
]
=
"4003"
data
[
"message"
]
=
"Error: 处理失败!"
data
[
"message"
]
=
"Error: 处理失败!"
return
Response
(
json
.
dumps
(
data
),
mimetype
=
'application/json'
)
return
Response
(
json
.
dumps
(
data
),
mimetype
=
'application/json'
)
##########################################
# 【接口类型】地理位置上报消息
##########################################
@
message_process
.
route
(
"/porcessLocationMsg"
,
methods
=
[
'POST'
])
def
porcessLocationMsg
():
params
=
request
.
get_data
()
params
=
json
.
loads
(
params
.
decode
(
"utf-8"
))
# msgID = params["msgID"]
# phoneNum = params["phoneNum"]
# msgWaterCode = params["msgWaterCode"]
# encryptionType = params["encryptionType"]
# subPkg = params["subPkg"]
# pkgCounts = params["pkgCounts"]
# ########### 地理位置基础信息 #############
# baseInfo = params["baseInfo"]
# alarmFlag = baseInfo["alarmFlag"]
# status = baseInfo["status"]
# latitude = baseInfo["latitude"]
# longtitude = baseInfo["longtitude"]
# elevation = baseInfo["elevation"]
# speed = baseInfo["speed"]
# directionAngle = baseInfo["directionAngle"]
# infoTime = baseInfo["infoTime"]
# ########### 地理位置附加信息 #############
# extraInfo = params["extraInfo"]
data
=
{}
if
(
hasJsonDataIsNone
(
params
)):
data
[
"status"
]
=
"4003"
data
[
"message"
]
=
"Info: 请检查是否传入了空数据!"
return
Response
(
json
.
dumps
(
data
),
mimetype
=
'application/json'
)
else
:
try
:
conf_R
=
ConfigParser
()
conf_R
.
read
(
"config/messageTools/messageTools.conf"
)
cliSocket
=
ClientSocket
(
conf_R
.
get
(
"socket"
,
"host"
),
conf_R
.
getint
(
"socket"
,
"port"
))
cliSocket
.
connect
()
obj
=
Location_msg
()
msg
=
obj
.
generateMsg_GUI
(
params
)
cliSocket
.
send
(
msg
)
socRecv_1
=
cliSocket
.
receive
()
socRecv_2
=
str
(
socRecv_1
)
cliSocket
.
close
()
data
[
"status"
]
=
"200"
data
[
"message"
]
=
"Sucess: "
data
[
"original"
]
=
msg
data
[
"result"
]
=
socRecv_2
msgP
=
PlatformCommon_res
(
socRecv_1
)
data
[
"resultH"
]
=
msgP
.
getOriginalMsg
()
data
[
"parse"
]
=
json
.
loads
(
msgP
.
getMsg
())
except
BaseException
as
e
:
# 打印异常信息
traceback
.
print_exc
()
data
[
"status"
]
=
"4003"
data
[
"message"
]
=
"Error: 处理失败!"
return
Response
(
json
.
dumps
(
data
),
mimetype
=
'application/json'
)
\ No newline at end of file
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