AlarmDSMVo.java
6.52 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
package com.bsth.message.entity;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.util.ArrayList;
import java.util.List;
@JsonIgnoreProperties(ignoreUnknown = true)
public class AlarmDSMVo implements AlarmVo {
private String clientId;
/**
* 车辆编码(内部编码)
*/
private String vehicleCode;
/**
* 设备号
*/
private String deviceId;
/**
* 车牌号
*/
private String vehiclePlate;
/**
* 报警ID
*/
private String alarmId;
/**
* 报警/事件类型
* 0x01:疲劳驾驶报警
* 0x02:接打电话报警
* 0x03:抽烟报警
* 0x04:分神驾驶报警
* 0x05:驾驶员异常报警
* 0x06~0x0F:用户自定义
* 0x10:自动抓拍事件
* 0x11:驾驶员变更事件
* 0x12~0x1F:用户自定义
*/
private int type;
/**
* 报警级别
* 0x01 一级报警
* 0x02 二级报警
*/
private int level;
/**
* 疲劳程度
*/
private int fatigueDegree;
/**
* 预留
*/
private int reserves;
/**
* 车速
*/
private int speed;
/**
* 高程
*/
private int altitude;
/**
* 纬度
*/
private int latitude;
/**
* 经度
*/
private int longitude;
/**
* 警报开始时间
*/
private long alarmTimeBegin;
/**
* 警报结束时间
*/
private long alarmTimeEnd;
/**
* 车辆状态
*/
private int statusBit;
/**
* 附件path
*/
private List<String> paths = new ArrayList<>();
private String lineCode;
/**
* 限速值(0.01km/h)
*/
private int speedLimit;
/**
* 超速速度峰值(0.01km/h)
*/
private int speedPeak;
/**
* 超速持续时长(S)
*/
private int duration;
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getVehicleCode() {
return vehicleCode;
}
public void setVehicleCode(String vehicleCode) {
this.vehicleCode = vehicleCode;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getVehiclePlate() {
return vehiclePlate;
}
public void setVehiclePlate(String vehiclePlate) {
this.vehiclePlate = vehiclePlate;
}
public List<String> getPaths() {
return paths;
}
public void setPaths(List<String> paths) {
this.paths = paths;
}
public String getAlarmId() {
return alarmId;
}
public void setAlarmId(String alarmId) {
this.alarmId = alarmId;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getLevel() {
return level;
}
public void setLevel(int level) {
this.level = level;
}
public int getFatigueDegree() {
return fatigueDegree;
}
public void setFatigueDegree(int fatigueDegree) {
this.fatigueDegree = fatigueDegree;
}
public int getReserves() {
return reserves;
}
public void setReserves(int reserves) {
this.reserves = reserves;
}
public int getSpeed() {
return speed;
}
public void setSpeed(int speed) {
this.speed = speed;
}
public int getAltitude() {
return altitude;
}
public void setAltitude(int altitude) {
this.altitude = altitude;
}
public int getLatitude() {
return latitude;
}
public void setLatitude(int latitude) {
this.latitude = latitude;
}
public int getLongitude() {
return longitude;
}
public void setLongitude(int longitude) {
this.longitude = longitude;
}
public long getAlarmTimeBegin() {
return alarmTimeBegin;
}
public void setAlarmTimeBegin(long alarmTimeBegin) {
this.alarmTimeBegin = alarmTimeBegin;
}
public long getAlarmTimeEnd() {
return alarmTimeEnd;
}
public void setAlarmTimeEnd(long alarmTimeEnd) {
this.alarmTimeEnd = alarmTimeEnd;
}
public int getStatusBit() {
return statusBit;
}
public void setStatusBit(int statusBit) {
this.statusBit = statusBit;
}
public String getAlarmType() {
return "dsm";
}
public String getLineCode() {
return lineCode;
}
@Override
public void setLineCode(String lineCode) {
this.lineCode = lineCode;
}
public int getSpeedLimit() {
return speedLimit;
}
public void setSpeedLimit(int speedLimit) {
this.speedLimit = speedLimit;
}
public int getSpeedPeak() {
return speedPeak;
}
public void setSpeedPeak(int speedPeak) {
this.speedPeak = speedPeak;
}
public int getDuration() {
return duration;
}
public void setDuration(int duration) {
this.duration = duration;
}
public String getAttach() {
return String.format("峰值(km/h):%d[%d],持续(s):%d", speedPeak / 100, speedLimit/ 100, duration);
}
@Override
public int hashCode() {
return String.format("%s_%d_%d", this.clientId, this.alarmTimeBegin, this.type).hashCode();
}
@Override
public boolean equals(Object obj) {
AlarmDSMVo other = (AlarmDSMVo) obj;
return this.clientId.equals(other.getClientId()) && this.alarmTimeBegin == other.getAlarmTimeBegin() && this.type == other.getType();
}
@Override
public String toString() {
return "AlarmDSMVo{" +
"clientId='" + clientId + '\'' +
", vehicleCode='" + vehicleCode + '\'' +
", deviceId='" + deviceId + '\'' +
", vehiclePlate='" + vehiclePlate + '\'' +
", alarmId='" + alarmId + '\'' +
", type=" + type +
", level=" + level +
", fatigueDegree=" + fatigueDegree +
", reserves=" + reserves +
", speed=" + speed +
", altitude=" + altitude +
", latitude=" + latitude +
", longitude=" + longitude +
", alarmTimeBegin=" + alarmTimeBegin +
", alarmTimeEnd=" + alarmTimeEnd +
", statusBit=" + statusBit +
", paths=" + paths +
'}';
}
}