字段补齐,测试数据添加
This commit is contained in:
@@ -14,7 +14,9 @@ public class V2XWarningEntity implements Serializable {
|
||||
//目标物位置
|
||||
private double lat;
|
||||
private double lon;
|
||||
//距离
|
||||
//目标物颜色
|
||||
public String targetColor;
|
||||
//目标物距离
|
||||
private double distance;
|
||||
//预测碰撞点位置
|
||||
private double collisionLat;
|
||||
@@ -28,9 +30,30 @@ public class V2XWarningEntity implements Serializable {
|
||||
//停止线经纬度
|
||||
private double stopLineLat;
|
||||
private double stopLineLon;
|
||||
|
||||
//自车到停止线距离
|
||||
private double stopLineDistance;
|
||||
//道路唯一标识
|
||||
public String roadId;
|
||||
//车道唯一标识
|
||||
public String laneId;
|
||||
//识别物体唯一标识
|
||||
public String uuid;
|
||||
//红绿灯颜色
|
||||
public String color;
|
||||
//车ID 暂不使用
|
||||
public String carId;
|
||||
//预警文案
|
||||
private String tipContent;
|
||||
private String warningContent;
|
||||
//车头朝向
|
||||
public double heading;
|
||||
//系统时间 暂时没用
|
||||
public long systemTime;
|
||||
//定位卫星时间 暂时没用
|
||||
public long satelliteTime;
|
||||
//莫顿码 暂时没用
|
||||
public long mortonCode;
|
||||
|
||||
//自组字段
|
||||
//tts播报
|
||||
private String tts;
|
||||
//打点位置
|
||||
@@ -54,15 +77,15 @@ public class V2XWarningEntity implements Serializable {
|
||||
public void setTipContent(int type) {
|
||||
switch (type) {
|
||||
case 0:
|
||||
this.tipContent = "行人碰撞预警";
|
||||
this.warningContent = "行人碰撞预警";
|
||||
break;
|
||||
case 1:
|
||||
case 3:
|
||||
case 4:
|
||||
this.tipContent = "前车碰撞预警";
|
||||
this.warningContent = "前车碰撞预警";
|
||||
break;
|
||||
case 2:
|
||||
this.tipContent = "摩托车碰撞预警";
|
||||
this.warningContent = "摩托车碰撞预警";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -121,6 +144,10 @@ public class V2XWarningEntity implements Serializable {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public void setTts(String tts) {
|
||||
this.tts = tts;
|
||||
}
|
||||
|
||||
public void setSpeed(float speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
@@ -129,7 +156,6 @@ public class V2XWarningEntity implements Serializable {
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
@@ -150,7 +176,6 @@ public class V2XWarningEntity implements Serializable {
|
||||
return distance;
|
||||
}
|
||||
|
||||
|
||||
public double getAngle() {
|
||||
return angle;
|
||||
}
|
||||
@@ -163,13 +188,54 @@ public class V2XWarningEntity implements Serializable {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public String getTipContent() {
|
||||
if (this.tipContent == null) {
|
||||
public String getTargetColor() {
|
||||
return targetColor;
|
||||
}
|
||||
|
||||
public String getRoadId() {
|
||||
return roadId;
|
||||
}
|
||||
|
||||
public String getLaneId() {
|
||||
return laneId;
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public String getCarId() {
|
||||
return carId;
|
||||
}
|
||||
|
||||
public String getWarningContent() {
|
||||
if (this.warningContent == null) {
|
||||
setTipContent(type);
|
||||
}
|
||||
return tipContent;
|
||||
return warningContent;
|
||||
}
|
||||
|
||||
public double getHeading() {
|
||||
return heading;
|
||||
}
|
||||
|
||||
public long getSystemTime() {
|
||||
return systemTime;
|
||||
}
|
||||
|
||||
public long getSatelliteTime() {
|
||||
return satelliteTime;
|
||||
}
|
||||
|
||||
public long getMortonCode() {
|
||||
return mortonCode;
|
||||
}
|
||||
|
||||
|
||||
public String getTts() {
|
||||
if (tts == null) {
|
||||
setTts(type);
|
||||
@@ -177,22 +243,6 @@ public class V2XWarningEntity implements Serializable {
|
||||
return tts;
|
||||
}
|
||||
|
||||
public void setStopLineLat(double stopLineLat) {
|
||||
this.stopLineLat = stopLineLat;
|
||||
}
|
||||
|
||||
public void setStopLineLon(double stopLineLon) {
|
||||
this.stopLineLon = stopLineLon;
|
||||
}
|
||||
|
||||
public void setTipContent(String tipContent) {
|
||||
this.tipContent = tipContent;
|
||||
}
|
||||
|
||||
public void setTts(String tts) {
|
||||
this.tts = tts;
|
||||
}
|
||||
|
||||
public double getStopLineLat() {
|
||||
return stopLineLat;
|
||||
}
|
||||
@@ -215,9 +265,18 @@ public class V2XWarningEntity implements Serializable {
|
||||
", speed=" + speed +
|
||||
", stopLineLat=" + stopLineLat +
|
||||
", stopLineLon=" + stopLineLon +
|
||||
", tipContent='" + tipContent + '\'' +
|
||||
", roadId='" + roadId + '\'' +
|
||||
", laneId='" + laneId + '\'' +
|
||||
", uuid='" + uuid + '\'' +
|
||||
", color='" + color + '\'' +
|
||||
", carId='" + carId + '\'' +
|
||||
", warningContent='" + warningContent + '\'' +
|
||||
", tts='" + tts + '\'' +
|
||||
", location=" + location +
|
||||
", heading=" + heading +
|
||||
", systemTime=" + systemTime +
|
||||
", satelliteTime=" + satelliteTime +
|
||||
", mortonCode=" + mortonCode +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user