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
f8bf25bc
Commit
f8bf25bc
authored
May 07, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成了M500模拟器设防、撤防、抵挡高速、高档低速、剩余油量异常事件发送
parent
683cb800
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
331 additions
and
45 deletions
+331
-45
lib/protocol/message/MessageBase.py
lib/protocol/message/MessageBase.py
+1
-0
lib/protocol/message/TerminalCommonMsgRes_msg.py
lib/protocol/message/TerminalCommonMsgRes_msg.py
+11
-6
lib/socket/service/MessageSimulaterDataService.py
lib/socket/service/MessageSimulaterDataService.py
+2
-2
lib/socket/service/MessageSimulaterService.py
lib/socket/service/MessageSimulaterService.py
+12
-22
templates/protocolTools/report/M_carSimulater_page.html
templates/protocolTools/report/M_carSimulater_page.html
+70
-15
views/protocolTools/M_carSimulater_process.py
views/protocolTools/M_carSimulater_process.py
+235
-0
No files found.
lib/protocol/message/MessageBase.py
View file @
f8bf25bc
...
@@ -327,6 +327,7 @@ if __name__ == "__main__":
...
@@ -327,6 +327,7 @@ if __name__ == "__main__":
# print(MessageBase().generateMsg())
# print(MessageBase().generateMsg())
print
(
MessageBase
()
.
GBKString2Hex
(
"渝B23CX"
))
print
(
MessageBase
()
.
GBKString2Hex
(
"渝B23CX"
))
print
(
MessageBase
()
.
hex2GBKString
(
"d3e54232334358"
))
print
(
MessageBase
()
.
hex2GBKString
(
"d3e54232334358"
))
print
(
MessageBase
()
.
hex2GBKString
(
"4c323030414230313032303030312c737a6c696e6779692e716963702e7669702c383838392c537a4c696e6759692c7a373254713246742c4c3230304142303130322e303030312e42494e2c2f2c"
))
# print(MessageBase().int2BCD(123456789012345,10))
# print(MessageBase().int2BCD(123456789012345,10))
# print(MessageBase().getRandomNum(3000,5000,[2,4,6,8,10,12],4))
# print(MessageBase().getRandomNum(3000,5000,[2,4,6,8,10,12],4))
# print(MessageBase().getRandomStr(10))
# print(MessageBase().getRandomStr(10))
...
...
lib/protocol/message/TerminalCommonMsgRes_msg.py
View file @
f8bf25bc
...
@@ -7,8 +7,12 @@ from lib.protocol.message.MessageBase import MessageBase
...
@@ -7,8 +7,12 @@ from lib.protocol.message.MessageBase import MessageBase
class
TerminalCommonMsgRes_msg
(
MessageBase
):
class
TerminalCommonMsgRes_msg
(
MessageBase
):
def
__init__
(
self
):
def
__init__
(
self
,
resId
=
"0002"
,
phoneNum
=
13146201119
,
resWaterCode
=
"0001"
,
sn
=
1
):
super
()
.
__init__
()
#不执行该方法,无法使用父类里面定义的属性
super
()
.
__init__
()
#不执行该方法,无法使用父类里面定义的属性
self
.
resId
=
resId
self
.
phoneNum
=
phoneNum
self
.
resWaterCode
=
resWaterCode
self
.
sn
=
sn
pass
pass
#######################################################
#######################################################
...
@@ -30,8 +34,8 @@ class TerminalCommonMsgRes_msg(MessageBase):
...
@@ -30,8 +34,8 @@ class TerminalCommonMsgRes_msg(MessageBase):
# 获取消息体
# 获取消息体
#######################################################
#######################################################
def
getMsgBody
(
self
):
def
getMsgBody
(
self
):
resWaterCode
=
"0001"
#对应的平台消息的流水号
resWaterCode
=
self
.
resWaterCode
#对应的平台消息的流水号
msgId
=
"0001"
#消息id,对应的平台消息的 ID
msgId
=
self
.
resId
#消息id,对应的平台消息的 ID
reslult
=
self
.
int2hexStringByBytes
(
0
)
#0:成功/确认;1:失败;2:消息有误;3:不支持
reslult
=
self
.
int2hexStringByBytes
(
0
)
#0:成功/确认;1:失败;2:消息有误;3:不支持
data
=
""
data
=
""
msg
=
data
+
resWaterCode
+
msgId
+
reslult
msg
=
data
+
resWaterCode
+
msgId
+
reslult
...
@@ -41,10 +45,11 @@ class TerminalCommonMsgRes_msg(MessageBase):
...
@@ -41,10 +45,11 @@ class TerminalCommonMsgRes_msg(MessageBase):
# 获取消息头
# 获取消息头
#######################################################
#######################################################
def
getMsgHeader
(
self
):
def
getMsgHeader
(
self
):
msgID
=
self
.
int2hexStringByBytes
(
102
,
2
)
#消息id
# msgID = self.int2hexStringByBytes(102,2) #消息id
msgID
=
"0001"
#消息id
msgBodyProperty
=
self
.
getMsgBodyProperty
(
int
(
len
(
self
.
getMsgBody
())
/
2
))
#消息体属性
msgBodyProperty
=
self
.
getMsgBodyProperty
(
int
(
len
(
self
.
getMsgBody
())
/
2
))
#消息体属性
phoneNum
=
self
.
int2BCD
(
13146201119
)
#终端手机号
phoneNum
=
self
.
int2BCD
(
int
(
self
.
phoneNum
))
#终端手机号
msgWaterCode
=
self
.
int2hexStringByBytes
(
1
,
2
)
#消息流水号
msgWaterCode
=
self
.
int2hexStringByBytes
(
self
.
sn
,
2
)
#消息流水号
subPkgContent
=
""
#消息包封装项
subPkgContent
=
""
#消息包封装项
data
=
msgID
+
msgBodyProperty
+
phoneNum
+
msgWaterCode
+
subPkgContent
data
=
msgID
+
msgBodyProperty
+
phoneNum
+
msgWaterCode
+
subPkgContent
return
data
return
data
...
...
lib/socket/service/MessageSimulaterDataService.py
View file @
f8bf25bc
...
@@ -89,7 +89,7 @@ class MessageSimulaterDataService():
...
@@ -89,7 +89,7 @@ class MessageSimulaterDataService():
self
.
data
[
"time"
][
"dateTime"
]
=
data
self
.
data
[
"time"
][
"dateTime"
]
=
data
self
.
writeToFile
(
self
.
path
+
self
.
fileName
,
self
.
data
)
self
.
writeToFile
(
self
.
path
+
self
.
fileName
,
self
.
data
)
#设今日日期
#设今日日期
def
setDat
a
2file
(
self
,
data
):
def
setDat
e
2file
(
self
,
data
):
self
.
data
[
"time"
][
"date"
]
=
data
self
.
data
[
"time"
][
"date"
]
=
data
self
.
writeToFile
(
self
.
path
+
self
.
fileName
,
self
.
data
)
self
.
writeToFile
(
self
.
path
+
self
.
fileName
,
self
.
data
)
#设今日时间
#设今日时间
...
@@ -131,7 +131,7 @@ class MessageSimulaterDataService():
...
@@ -131,7 +131,7 @@ class MessageSimulaterDataService():
self
.
setTodayTodayTotalOil
(
0
)
self
.
setTodayTodayTotalOil
(
0
)
self
.
setTodayTodayTotalTime
(
0
)
self
.
setTodayTodayTotalTime
(
0
)
self
.
setDateTime2file
(
dateTimeM
)
self
.
setDateTime2file
(
dateTimeM
)
self
.
setDat
a
2file
(
dateM
)
self
.
setDat
e
2file
(
dateM
)
self
.
setTime2file
(
timeM
)
self
.
setTime2file
(
timeM
)
self
.
data
=
conJson
self
.
data
=
conJson
...
...
lib/socket/service/MessageSimulaterService.py
View file @
f8bf25bc
...
@@ -13,6 +13,7 @@ import traceback
...
@@ -13,6 +13,7 @@ import traceback
from
time
import
sleep
from
time
import
sleep
from
lib.protocol.message.Location_msg
import
Location_msg
from
lib.protocol.message.Location_msg
import
Location_msg
from
lib.protocol.message.TerminalCommonMsgRes_msg
import
TerminalCommonMsgRes_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
from
lib.socket.service.MessageSimulaterDataService
import
MessageSimulaterDataService
from
lib.socket.service.MessageSimulaterDataService
import
MessageSimulaterDataService
...
@@ -156,7 +157,7 @@ class MessageSimulaterService():
...
@@ -156,7 +157,7 @@ class MessageSimulaterService():
self
.
carDataObj
.
setTodayTodayTotalOil
(
0
)
self
.
carDataObj
.
setTodayTodayTotalOil
(
0
)
self
.
carDataObj
.
setTodayTodayTotalTime
(
0
)
self
.
carDataObj
.
setTodayTodayTotalTime
(
0
)
self
.
carDataObj
.
setDateTime2file
(
dateTimeM
)
self
.
carDataObj
.
setDateTime2file
(
dateTimeM
)
self
.
carDataObj
.
setDat
a
2file
(
dateM
)
self
.
carDataObj
.
setDat
e
2file
(
dateM
)
self
.
carDataObj
.
setTime2file
(
timeM
)
self
.
carDataObj
.
setTime2file
(
timeM
)
self
.
OBDdata
[
"extraInfo"
][
"01"
][
"extra_01"
]
=
conJson
[
"travelData"
][
"totalMilleage"
]
self
.
OBDdata
[
"extraInfo"
][
"01"
][
"extra_01"
]
=
conJson
[
"travelData"
][
"totalMilleage"
]
self
.
OBDdataOri
[
"extraInfo"
][
"01"
][
"extra_01"
]
=
conJson
[
"travelData"
][
"totalMilleage"
]
self
.
OBDdataOri
[
"extraInfo"
][
"01"
][
"extra_01"
]
=
conJson
[
"travelData"
][
"totalMilleage"
]
...
@@ -459,27 +460,16 @@ class MessageSimulaterService():
...
@@ -459,27 +460,16 @@ class MessageSimulaterService():
#收到 某些类型的消息后执行回复操作
#收到 某些类型的消息后执行回复操作
########################################################
########################################################
def
doResponse
(
self
,
msg
):
def
doResponse
(
self
,
msg
):
# TODO 收到 某些类型的消息后执行回复操作
msgFunId
=
self
.
getMsgFunId
(
msg
)
pass
resWaterCode
=
msg
[
22
:
26
]
# msgFunId = self.getMsgFunId(msg)
if
msgFunId
==
"8105"
:
# if msgFunId == "8205":
msg
=
TerminalCommonMsgRes_msg
(
resId
=
"8105"
,
phoneNum
=
self
.
carId
,
resWaterCode
=
resWaterCode
,
sn
=
self
.
sn
)
.
generateMsg
()
# msg = Common_response(resId="8205").generateCommonMsg()
self
.
sendMsg
(
msg
)
# self.sendMsg(msg)
self
.
sn
=
self
.
sn
+
1
# self.sn = self.sn + 1
type
=
self
.
getMsgFunId
(
msg
)
# type = self.getMsgFunId(msg)
self
.
websocket
.
send
(
type
+
">>>>终端控制消息应答:"
+
msg
)
# self.websocket.send(type + ">>>>设置GPSR通信参数应答:" + msg)
elif
msgFunId
==
"8206"
:
# elif msgFunId == "8206":
pass
# msg = Common_response(resId="8206").generateCommonMsg()
# self.sendMsg(msg)
# self.sn = self.sn + 1
# type = self.getMsgFunId(msg)
# self.websocket.send(type + ">>>>设置车辆OBD适配信息应答:" + msg)
# elif msgFunId == "8300":
# msg = Update_response().generateUpdateMsg()
# self.sendMsg(msg)
# self.sn = self.sn + 1
# type = self.getMsgFunId(msg)
# self.websocket.send(type + ">>>>升级_平台通知终端远程升级应答:" + msg)
#设置GPS轨迹
#设置GPS轨迹
...
...
templates/protocolTools/report/M_carSimulater_page.html
View file @
f8bf25bc
...
@@ -124,23 +124,28 @@
...
@@ -124,23 +124,28 @@
</h5>
</h5>
<div
id=
"event_area"
style=
"display:none;"
>
<div
id=
"event_area"
style=
"display:none;"
>
<div
style=
"margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;background:skyblue;"
>
<div
style=
"margin-top:10px;width:100%;border-width:1px;border-style:solid;border-color:darkgray;border-radius:10px;padding:2px;background:skyblue;"
>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"lowVoltage_check"
onclick=
"eventSelect(this)"
/>
汽车电瓶低电压报警
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"lowVoltage_check"
onclick=
"eventSelect(this)"
checked
/>
汽车电瓶低电压报警
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"powerOff_check"
onclick=
"eventSelect(this)"
/>
终端主电断电报警
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"powerOff_check"
onclick=
"eventSelect(this)"
checked
/>
终端主电断电报警
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"rapidlyAccelerateEvent_check"
onclick=
"eventSelect(this)"
/>
急加速
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"rapidlyAccelerateEvent_check"
onclick=
"eventSelect(this)"
checked
/>
急加速
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"sharpSlowdownEvent_check"
onclick=
"eventSelect(this)"
/>
急减速
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"sharpSlowdownEvent_check"
onclick=
"eventSelect(this)"
checked
/>
急减速
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"sharpTurnEvent_check"
onclick=
"eventSelect(this)"
/>
急转弯
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"sharpTurnEvent_check"
onclick=
"eventSelect(this)"
checked
/>
急转弯
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
0012"
onclick=
"eventSelect(this)"
/>
设防
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
setUpDefencesEvent_check"
onclick=
"eventSelect(this)"
checked
/>
设防
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
0013"
onclick=
"eventSelect(this)"
/>
撤防
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
setDownDefencesEvent_check"
onclick=
"eventSelect(this)"
checked
/>
撤防
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
0036"
onclick=
"eventSelect(this)"
/>
低档高速报警
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
lowGearHighSpeed_check"
onclick=
"eventSelect(this)"
checked
/>
低档高速报警
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
0037"
onclick=
"eventSelect(this)"
/>
高档低速报警
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
highGearLowSpeed_check"
onclick=
"eventSelect(this)"
checked
/>
高档低速报警
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
004A"
onclick=
"eventSelect(this)"
/>
剩余油量异常告警
</label>
<label
style=
"padding: 0px 10px;"
><input
type=
"checkbox"
id=
"
surplusOil_check"
onclick=
"eventSelect(this)"
checked
/>
剩余油量异常告警
</label>
</div>
</div>
<div
style=
"padding:10px;"
>
<div
style=
"padding:10px;"
>
<span
id=
"lowVoltage_button"
style=
"display:none;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendLowVoltageEvent(this)"
>
汽车电瓶低电压报警
</button></label></span>
<span
id=
"lowVoltage_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendLowVoltageEvent(this)"
>
汽车电瓶低电压报警
</button></label></span>
<span
id=
"powerOff_button"
style=
"display:none;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendPowerOffEvent(this)"
>
终端主电断电报警
</button></label></span>
<span
id=
"powerOff_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendPowerOffEvent(this)"
>
终端主电断电报警
</button></label></span>
<span
id=
"rapidlyAccelerateEvent_button"
style=
"display:none;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendRapidlyAccelerateEvent(this)"
>
急加速
</button></label></span>
<span
id=
"rapidlyAccelerateEvent_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendRapidlyAccelerateEvent(this)"
>
急加速
</button></label></span>
<span
id=
"sharpSlowdownEvent_button"
style=
"display:none;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendSharpSlowdownEvent(this)"
>
急减速
</button></label></span>
<span
id=
"sharpSlowdownEvent_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendSharpSlowdownEvent(this)"
>
急减速
</button></label></span>
<span
id=
"sharpTurnEvent_button"
style=
"display:none;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendSharpTurnEvent(this)"
>
急转弯
</button></label></span>
<span
id=
"sharpTurnEvent_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendSharpTurnEvent(this)"
>
急转弯
</button></label></span>
<span
id=
"setUpDefencesEvent_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendSetUpDefencesEvent(this)"
>
设防
</button></label></span>
<span
id=
"setDownDefencesEvent_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendSetDownDefencesEvent(this)"
>
撤防
</button></label></span>
<span
id=
"lowGearHighSpeed_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendLowGearHighSpeedEvent(this)"
>
低挡高速
</button></label></span>
<span
id=
"highGearLowSpeed_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendHighGearLowSpeedEvent(this)"
>
高档低速
</button></label></span>
<span
id=
"surplusOil_button"
style=
"display:inline;"
><button
type=
"button"
class=
"btn btn-primary"
onclick=
"sendSurplusOilAlarmEvent(this)"
>
剩余油量异常
</button></label></span>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -644,6 +649,16 @@ function eventSelect(e){
...
@@ -644,6 +649,16 @@ function eventSelect(e){
$
(
"
#sharpSlowdownEvent_button
"
).
css
(
"
display
"
,
"
inline
"
)
$
(
"
#sharpSlowdownEvent_button
"
).
css
(
"
display
"
,
"
inline
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
sharpTurnEvent_check
"
){
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
sharpTurnEvent_check
"
){
$
(
"
#sharpTurnEvent_button
"
).
css
(
"
display
"
,
"
inline
"
)
$
(
"
#sharpTurnEvent_button
"
).
css
(
"
display
"
,
"
inline
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
setUpDefencesEvent_check
"
){
$
(
"
#setUpDefencesEvent_button
"
).
css
(
"
display
"
,
"
inline
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
setDownDefencesEvent_check
"
){
$
(
"
#setDownDefencesEvent_button
"
).
css
(
"
display
"
,
"
inline
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
lowGearHighSpeed_check
"
){
$
(
"
#lowGearHighSpeed_button
"
).
css
(
"
display
"
,
"
inline
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
highGearLowSpeed_check
"
){
$
(
"
#highGearLowSpeed_button
"
).
css
(
"
display
"
,
"
inline
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
surplusOil_check
"
){
$
(
"
#surplusOil_button
"
).
css
(
"
display
"
,
"
inline
"
)
}
}
}
else
{
}
else
{
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
lowVoltage_check
"
){
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
lowVoltage_check
"
){
...
@@ -656,6 +671,16 @@ function eventSelect(e){
...
@@ -656,6 +671,16 @@ function eventSelect(e){
$
(
"
#sharpSlowdownEvent_button
"
).
css
(
"
display
"
,
"
none
"
)
$
(
"
#sharpSlowdownEvent_button
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
sharpTurnEvent_check
"
){
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
sharpTurnEvent_check
"
){
$
(
"
#sharpTurnEvent_button
"
).
css
(
"
display
"
,
"
none
"
)
$
(
"
#sharpTurnEvent_button
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
setUpDefencesEvent_check
"
){
$
(
"
#setUpDefencesEvent_button
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
setDownDefencesEvent_check
"
){
$
(
"
#setDownDefencesEvent_button
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
lowGearHighSpeed_check
"
){
$
(
"
#lowGearHighSpeed_button
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
highGearLowSpeed_check
"
){
$
(
"
#highGearLowSpeed_button
"
).
css
(
"
display
"
,
"
none
"
)
}
else
if
(
$
(
e
).
attr
(
"
id
"
)
==
"
surplusOil_check
"
){
$
(
"
#surplusOil_button
"
).
css
(
"
display
"
,
"
none
"
)
}
}
}
}
}
}
...
@@ -689,6 +714,36 @@ function sendSharpTurnEvent(){
...
@@ -689,6 +714,36 @@ function sendSharpTurnEvent(){
url
=
"
/protocolTools/M_carSimulater_process/sendSharpTurnEvent
"
;
url
=
"
/protocolTools/M_carSimulater_process/sendSharpTurnEvent
"
;
sendjson
(
data
,
url
);
sendjson
(
data
,
url
);
}
}
//发送设防事件消息
function
sendSetUpDefencesEvent
(){
var
data
=
getPageData
()
url
=
"
/protocolTools/M_carSimulater_process/sendSetUpDefencesEvent
"
;
sendjson
(
data
,
url
);
}
//发送撤防事件消息
function
sendSetDownDefencesEvent
(){
var
data
=
getPageData
()
url
=
"
/protocolTools/M_carSimulater_process/sendSetDownDefencesEvent
"
;
sendjson
(
data
,
url
);
}
//发送低档高速报警事件消息
function
sendLowGearHighSpeedEvent
(){
var
data
=
getPageData
()
url
=
"
/protocolTools/M_carSimulater_process/sendLowGearHighSpeedEvent
"
;
sendjson
(
data
,
url
);
}
//发送高档低速报警事件消息
function
sendHighGearLowSpeedEvent
(){
var
data
=
getPageData
()
url
=
"
/protocolTools/M_carSimulater_process/sendHighGearLowSpeedEvent
"
;
sendjson
(
data
,
url
);
}
//发送剩余油量异常告警事件消息
function
sendSurplusOilAlarmEvent
(){
var
data
=
getPageData
()
url
=
"
/protocolTools/M_carSimulater_process/sendSurplusOilAlarmEvent
"
;
sendjson
(
data
,
url
);
}
</script>
</script>
{% endblock %}
{% endblock %}
...
...
views/protocolTools/M_carSimulater_process.py
View file @
f8bf25bc
This diff is collapsed.
Click to expand it.
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