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
5faea552
Commit
5faea552
authored
May 14, 2020
by
liyuanhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
多人在线面板,日志打印,增加了ip和连接时间
parent
fc54f847
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
data/protocolTools/carData/M202003060520.json
data/protocolTools/carData/M202003060520.json
+1
-1
views/messageTools/M_simulater_process.py
views/messageTools/M_simulater_process.py
+6
-0
views/protocolTools/M_carSimulater_process.py
views/protocolTools/M_carSimulater_process.py
+6
-0
No files found.
data/protocolTools/carData/M202003060520.json
View file @
5faea552
{
"time"
:
{
"dateTime"
:
"2020-05-13 10:53:36"
,
"date"
:
"2020-05-13"
,
"time"
:
"10:53:36"
},
"curDayTravel"
:
{
"todayTotalMilleage"
:
24791
,
"todayTotalOil"
:
2386
,
"todayTotalTime"
:
1479
,
"theMilleage"
:
1698
,
"theOil"
:
158
,
"theTime"
:
88
},
"travelData"
:
{
"totalMilleage"
:
249738
,
"totalOil"
:
23752
,
"totalTime"
:
14743
},
"event"
:
{
"threeRapid"
:
{
"totalRapidlyAccelerate"
:
22
,
"totalSharpSlowdown"
:
19
,
"totalSharpTurn"
:
24
}}}
\ No newline at end of file
{
"time"
:
{
"dateTime"
:
"2020-05-14 01:29:40"
,
"date"
:
"2020-05-14"
,
"time"
:
"01:29:40"
},
"curDayTravel"
:
{
"todayTotalMilleage"
:
9487
,
"todayTotalOil"
:
757
,
"todayTotalTime"
:
582
,
"theMilleage"
:
528
,
"theOil"
:
48
,
"theTime"
:
32
},
"travelData"
:
{
"totalMilleage"
:
262817
,
"totalOil"
:
24827
,
"totalTime"
:
15522
},
"event"
:
{
"threeRapid"
:
{
"totalRapidlyAccelerate"
:
14
,
"totalSharpSlowdown"
:
13
,
"totalSharpTurn"
:
13
}}}
\ No newline at end of file
views/messageTools/M_simulater_process.py
View file @
5faea552
#coding:utf-8
import
os
import
time
from
time
import
sleep
from
flask
import
Blueprint
,
Response
,
request
,
send_from_directory
...
...
@@ -85,6 +86,11 @@ def porcessConnect():
service
.
setGpsLine
(
params
[
"gpsLine"
])
connect
[
"service"
]
=
connect
connects
[
sessionId
][
"service"
]
=
service
timeArray
=
time
.
localtime
(
int
(
time
.
time
()))
curTime
=
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
,
timeArray
)
connects
[
sessionId
][
"time"
]
=
curTime
ip
=
request
.
remote_addr
connects
[
sessionId
][
"ip"
]
=
ip
data
[
"status"
]
=
"200"
data
[
"message"
]
=
"创建连接成功!"
else
:
...
...
views/protocolTools/M_carSimulater_process.py
View file @
5faea552
#coding:utf-8
import
os
import
time
from
time
import
sleep
from
flask
import
Blueprint
,
Response
,
request
,
send_from_directory
...
...
@@ -89,6 +90,11 @@ def createConect():
service
.
addNewWebsocket
()
#创建一个新的websocket连接
connect
[
"service"
]
=
connect
connects
[
sessionId
][
"service"
]
=
service
timeArray
=
time
.
localtime
(
int
(
time
.
time
()))
curTime
=
time
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
,
timeArray
)
connects
[
sessionId
][
"time"
]
=
curTime
ip
=
request
.
remote_addr
connects
[
sessionId
][
"ip"
]
=
ip
data
[
"status"
]
=
"200"
data
[
"message"
]
=
"创建连接成功!"
else
:
...
...
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