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
48049a07
Commit
48049a07
authored
Apr 24, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复了模拟器版本上报bug
parent
cded76cf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
4 deletions
+30
-4
lib/socket/service/MessageSimulaterService.py
lib/socket/service/MessageSimulaterService.py
+1
-1
templates/messageTools/message/M_simulater_page.html
templates/messageTools/message/M_simulater_page.html
+14
-1
templates/messageTools/message/heartBeat_msg_page.html
templates/messageTools/message/heartBeat_msg_page.html
+1
-1
templates/protocolTools/report/M_carSimulater_page.html
templates/protocolTools/report/M_carSimulater_page.html
+14
-1
No files found.
lib/socket/service/MessageSimulaterService.py
View file @
48049a07
...
...
@@ -98,7 +98,7 @@ class MessageSimulaterService():
verObj
=
TerminalVersionInfo_msg
()
time
.
sleep
(
0.5
)
msg
=
verObj
.
generateMsg_GUI
(
msgID
=
"0205"
,
phoneNum
=
int
(
self
.
data
[
"phoneNum"
]),
msgWaterCode
=
self
.
sn
,
encryptionType
=
0
,
subPkg
=
0
,
\
softwareVersion
=
self
.
data
[
"version"
][
"softwareVersion"
],
softwareVersionDate
=
self
.
data
[
"version"
][
"softwareVersionDate"
],
CPUId
=
self
.
data
[
"version"
][
"
softwareVersionDate
"
],
\
softwareVersion
=
self
.
data
[
"version"
][
"softwareVersion"
],
softwareVersionDate
=
self
.
data
[
"version"
][
"softwareVersionDate"
],
CPUId
=
self
.
data
[
"version"
][
"
CPUId
"
],
\
GMSType
=
self
.
data
[
"version"
][
"GMSType"
],
GMS_IMEI
=
self
.
data
[
"version"
][
"GMS_IMEI"
],
SIM_IMSI
=
self
.
data
[
"version"
][
"SIM_IMSI"
],
\
SIM_ICCID
=
self
.
data
[
"version"
][
"SIM_ICCID"
],
carType
=
int
(
self
.
data
[
"version"
][
"carType"
]),
VIN
=
self
.
data
[
"version"
][
"VIN"
],
\
totalMileage
=
int
(
self
.
data
[
"version"
][
"totalMileage"
]),
totalOilExpend
=
int
(
self
.
data
[
"version"
][
"totalOilExpend"
]),
\
...
...
templates/messageTools/message/M_simulater_page.html
View file @
48049a07
...
...
@@ -117,6 +117,7 @@
<button
id=
"unConnectAll_B"
type=
"button"
class=
"btn btn-danger"
onclick=
"reset()"
>
复位
</button>
<button
id=
"clear_B"
type=
"button"
class=
"btn btn-warning"
onclick=
"clearlog()"
>
清空日志
</button>
<span
style=
"margin-left:20px;"
><label>
当前状态:
</label><input
id=
"curStatus"
value=
"断网"
disabled=
"disabled"
class=
"form-control"
style=
"font-weight: bold;width:85px;color:red;border-width: 1px; border-style: solid; border-color: darkgray; border-radius: 10px;"
></span>
<span
style=
"width:80px;padding-left:10px;"
><label
style=
"width:70px"
><input
type=
"checkbox"
id=
"ignition"
onclick=
"isLogShow(this)"
/>
隐藏日志
</label>
</span>
</div>
<div
style=
"width:100%;padding-bottom:60px;border-bottom: 1px solid #eee;"
>
<h3>
日志:
</h3>
...
...
@@ -331,6 +332,7 @@ function isShowLoginArea(e){
client
=
"
0
"
ws
=
null
;
i
=
1
;
showLog
=
true
;
//设置日志是否显示
(
function
(){
ws
=
null
;
i
=
1
;
...
...
@@ -357,7 +359,9 @@ function startWebSocket(){
text
=
text
+
"
[
"
+
curTime
+
"
]
"
+
received_msg
[
"
msg
"
]
+
"
\n
"
;
$
(
'
#showFeedback
'
).
scrollTop
(
$
(
'
#showFeedback
'
)[
0
].
scrollHeight
);
}
$
(
"
#showFeedback
"
).
val
(
text
)
if
(
showLog
){
$
(
"
#showFeedback
"
).
val
(
text
);
}
};
ws
.
onclose
=
function
(){
alert
(
"
连接已关闭...
"
);
// 关闭 websocket
...
...
@@ -454,5 +458,14 @@ $("#searchCarData").click(function(){
}
});
});
//设置隐藏或显示日志
function
isLogShow
(
e
){
if
(
$
(
e
).
is
(
'
:checked
'
)){
showLog
=
false
;
}
else
{
showLog
=
true
;
}
}
</script>
{% endblock %}
\ No newline at end of file
templates/messageTools/message/heartBeat_msg_page.html
View file @
48049a07
...
...
@@ -34,7 +34,7 @@
<ul
class=
"nav nav-pills"
style=
"font-size:14px;"
>
<li
role=
"presentation"
><a
id=
"terminalHeartBeat_msg"
{%
if
arg.path[2]=
="heartBeat_msg_page"
%}
class=
"link-tab"
{%
endif
%}
onclick=
"messageManTab(this)"
>
心跳消息
</b></a></li>
<li
role=
"presentation"
><a
id=
"terminalRegister_msg"
{%
if
arg.path[2]=
="terminalRegister_msg_page"
%}
class=
"link-tab"
{%
endif
%}
onclick=
"messageManTab(this)"
>
终端注册
</b></a></li>
<li
role=
"presentation"
><a
id=
"terminalVersionInfoUpload_msg"
{%
if
arg.path[2]=
="terminalVersionInfoUpload_msg_page"
%}
class=
"link-tab"
{%
endif
%}
onclick=
"messageManTab(this)"
>
终端版本信息
主动
上报
</b></a></li>
<li
role=
"presentation"
><a
id=
"terminalVersionInfoUpload_msg"
{%
if
arg.path[2]=
="terminalVersionInfoUpload_msg_page"
%}
class=
"link-tab"
{%
endif
%}
onclick=
"messageManTab(this)"
>
终端版本信息上报
</b></a></li>
<li
role=
"presentation"
><a
id=
"dataUpstreamTransport_msg"
{%
if
arg.path[2]=
="dataUpstreamTransport_msg_page"
or
arg.path[2]=
="dataUpstreamTransport_msg_f2_page"
or
arg.path[2]=
="dataUpstreamTransport_msg_f3_page"
or
arg.path[2]=
="dataUpstreamTransport_msg_f4_page"
%}
class=
"link-tab"
{%
endif
%}
onclick=
"messageManTab(this)"
>
数据上行透传
</b></a></li>
<li
role=
"presentation"
><a
id=
"location_msg"
{%
if
arg.path[2]=
="location_msg_page"
%}
class=
"link-tab"
{%
endif
%}
onclick=
"messageManTab(this)"
>
位置信息汇报
</b></a></li>
<!-- <li role="presentation"><a id="style_index2" {% if arg.path[2]=="2" %} class="link-tab" {% endif %} onclick="messageManTab(this)">其他报文</b></a></li>-->
...
...
templates/protocolTools/report/M_carSimulater_page.html
View file @
48049a07
...
...
@@ -107,6 +107,7 @@
<button
id=
"unConnectAll_B"
type=
"button"
class=
"btn btn-danger"
onclick=
"reset()"
>
复位
</button>
<button
id=
"clear_B"
type=
"button"
class=
"btn btn-warning"
onclick=
"clearlog()"
>
清空日志
</button>
<span
style=
"margin-left:20px;"
><label>
当前状态:
</label><input
id=
"curStatus"
value=
"断网"
disabled=
"disabled"
class=
"form-control"
style=
"font-weight: bold;width:85px;color:red;border-width: 1px; border-style: solid; border-color: darkgray; border-radius: 10px;"
></span>
<span
style=
"width:80px;padding-left:10px;"
><label
style=
"width:70px"
><input
type=
"checkbox"
id=
"ignition"
onclick=
"isLogShow(this)"
/>
隐藏日志
</label>
</span>
</div>
<div
style=
"width:100%;padding-bottom:60px;border-bottom: 1px solid #eee;"
>
<h3>
日志:
</h3>
...
...
@@ -300,6 +301,7 @@ function isShowLoginArea(e){
client
=
"
0
"
ws
=
null
;
i
=
1
;
showLog
=
true
;
//设置日志是否显示
(
function
(){
ws
=
null
;
i
=
1
;
...
...
@@ -326,7 +328,9 @@ function WebSocketTest(){
text
=
text
+
"
[
"
+
curTime
+
"
]
"
+
received_msg
[
"
msg
"
]
+
"
\n
"
;
$
(
'
#showFeedback
'
).
scrollTop
(
$
(
'
#showFeedback
'
)[
0
].
scrollHeight
);
}
$
(
"
#showFeedback
"
).
val
(
text
)
if
(
showLog
){
$
(
"
#showFeedback
"
).
val
(
text
);
}
};
ws
.
onclose
=
function
(){
alert
(
"
连接已关闭...
"
);
// 关闭 websocket
...
...
@@ -423,6 +427,15 @@ $("#searchCarData").click(function(){
}
});
});
//设置隐藏或显示日志
function
isLogShow
(
e
){
if
(
$
(
e
).
is
(
'
:checked
'
)){
showLog
=
false
;
}
else
{
showLog
=
true
;
}
}
</script>
{% endblock %}
</div>
...
...
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