HDao_mile1.ice
2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
module HDaoMile
{
/*==========================================================
* Mileage Statistics
*==========================================================*/
/******* common *********/
struct GpsPos
{
int gpsTime;
int lng;
int lat;
string addr;
};
/*--------------------
apType: also named as devType, its value defined as below:
2: OBD;
4: DDbox(DVD)
5: Tracker
6: rearMirror
7: car recorder
---------------------*/
/*--------------------
oprResult:
0: OK
1: reserved
other: operation failed
---------------------*/
/******** Start mileage statistics *************/
struct MileStatBeginRequest
{
long userID;
int apType;
int beginTime;
};
struct MileStatBeginResponse
{
int oprResult;
};
/******* End mileage statistics *********/
struct MileStatEndRequest
{
long userID;
int apType;
int beginTime;
int endTime;
bool bRetGpsTime;
};
struct MileStatEndResponse
{
int oprResult;
int mileage; /* unit: meter */
GpsPos beginPos;
GpsPos endPos;
float over80Percent; /* percentage of gpsPoints that are over speed ranging from 80km/h to 120km/h */
float over120Percent; /* percentage of gpsPoints that are over speed above 120km/h */
int maxSpeed; /* unit: km/h */
int gpsBgnTime; /* time of the first gps record of the journey. Maybe filled if bRetGpsTime is true */
int gpsEndTime; /* time of the last gps record of the journey. Maybe filled if bRetGpsTime is true */
};
/******* mileage statistics *********/
struct MileStatRequest
{
long userID;
int apType;
int beginTime;
int endTime;
};
struct MileStatResponse
{
int oprResult;
int mileage; /* unit: meter */
GpsPos beginPos;
GpsPos endPos;
float over80Percent; /* 超速gps点(80km/h-120km/h) 占行程的百分比 */
float over120Percent; /* 超速gps点(120km/h以上) 占行程的百分比 */
int maxSpeed; /* unit: km/h */
};
// service interface
interface DaoMileService
{
/* Mile Stat related */
bool beginUserMileStat(MileStatBeginRequest req, out MileStatBeginResponse res);
bool endUserMileStat(MileStatEndRequest req, out MileStatEndResponse res);
bool JourneyMileStat(MileStatRequest req, out MileStatResponse res);
};
};