opt
This commit is contained in:
@@ -1,75 +0,0 @@
|
||||
package com.mogo.module.common.entity;
|
||||
|
||||
/**
|
||||
* 通过AI云下发的红绿灯状态
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class AITrafficLightEntity {
|
||||
private int type;
|
||||
|
||||
private double lat;
|
||||
private double lon;
|
||||
private long systemTime;
|
||||
/**红绿灯状态 1红 2绿 3黄*/
|
||||
private Integer lightStatus;//
|
||||
/**红绿灯剩余时间 读秒*/
|
||||
private Integer lightLeftTime;
|
||||
private double distance ;//距离
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public long getSystemTime() {
|
||||
return systemTime;
|
||||
}
|
||||
|
||||
public void setSystemTime(long systemTime) {
|
||||
this.systemTime = systemTime;
|
||||
}
|
||||
|
||||
public Integer getLightStatus() {
|
||||
return lightStatus;
|
||||
}
|
||||
|
||||
public void setLightStatus(Integer lightStatus) {
|
||||
this.lightStatus = lightStatus;
|
||||
}
|
||||
|
||||
public Integer getLightLeftTime() {
|
||||
return lightLeftTime;
|
||||
}
|
||||
|
||||
public void setLightLeftTime(Integer lightLeftTime) {
|
||||
this.lightLeftTime = lightLeftTime;
|
||||
}
|
||||
|
||||
public double getDistance() {
|
||||
return distance;
|
||||
}
|
||||
|
||||
public void setDistance(double distance) {
|
||||
this.distance = distance;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.mogo.module.common.entity;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
/**
|
||||
* 云端定位信息和自车定位信息
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class CloudLocationInfo implements Parcelable {
|
||||
private double lat;
|
||||
private double lon;
|
||||
private double heading;
|
||||
private long systemTime;
|
||||
private long satelliteTime;
|
||||
private double alt;
|
||||
private double speed;
|
||||
|
||||
public CloudLocationInfo(){
|
||||
}
|
||||
|
||||
protected CloudLocationInfo(Parcel in) {
|
||||
lat = in.readDouble();
|
||||
lon = in.readDouble();
|
||||
heading = in.readDouble();
|
||||
systemTime = in.readLong();
|
||||
satelliteTime = in.readLong();
|
||||
alt = in.readDouble();
|
||||
speed = in.readDouble();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeDouble(lat);
|
||||
dest.writeDouble(lon);
|
||||
dest.writeDouble(heading);
|
||||
dest.writeLong(systemTime);
|
||||
dest.writeLong(satelliteTime);
|
||||
dest.writeDouble(alt);
|
||||
dest.writeDouble(speed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<CloudLocationInfo> CREATOR = new Creator<CloudLocationInfo>() {
|
||||
@Override
|
||||
public CloudLocationInfo createFromParcel(Parcel in) {
|
||||
return new CloudLocationInfo(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudLocationInfo[] newArray(int size) {
|
||||
return new CloudLocationInfo[size];
|
||||
}
|
||||
};
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public double getLon() {
|
||||
return lon;
|
||||
}
|
||||
|
||||
public void setLon(double lon) {
|
||||
this.lon = lon;
|
||||
}
|
||||
|
||||
public double getHeading() {
|
||||
return heading;
|
||||
}
|
||||
|
||||
public void setHeading(double heading) {
|
||||
this.heading = heading;
|
||||
}
|
||||
|
||||
public long getSystemTime() {
|
||||
return systemTime;
|
||||
}
|
||||
|
||||
public void setSystemTime(long systemTime) {
|
||||
this.systemTime = systemTime;
|
||||
}
|
||||
|
||||
public long getSatelliteTime() {
|
||||
return satelliteTime;
|
||||
}
|
||||
|
||||
public void setSatelliteTime(long satelliteTime) {
|
||||
this.satelliteTime = satelliteTime;
|
||||
}
|
||||
|
||||
public double getAlt() {
|
||||
return alt;
|
||||
}
|
||||
|
||||
public void setAlt(double alt) {
|
||||
this.alt = alt;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CloudLocationInfo{" +
|
||||
"lat=" + lat +
|
||||
", lon=" + lon +
|
||||
", heading=" + heading +
|
||||
", systemTime=" + systemTime +
|
||||
", satelliteTime=" + satelliteTime +
|
||||
", alt=" + alt +
|
||||
", speed=" + speed +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.mogo.module.common.entity;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 云端道路数据
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class CloudRoadData implements Parcelable {
|
||||
/**物体类型*/
|
||||
private int type;
|
||||
|
||||
private double lat;
|
||||
private double lon;
|
||||
|
||||
private double speed;
|
||||
|
||||
private long systemTime;
|
||||
|
||||
/**红绿灯状态 1红 2绿 3黄*/
|
||||
private Integer lightStatus;//
|
||||
/**红绿灯剩余时间 读秒*/
|
||||
private Integer lightLeftTime;
|
||||
/**视频流直播地址*/
|
||||
private String rtmpUrl;//
|
||||
|
||||
private double distance ;//距离
|
||||
|
||||
public List<CloudLocationInfo> coordinates;
|
||||
|
||||
protected CloudRoadData(Parcel in) {
|
||||
type = in.readInt();
|
||||
lat = in.readDouble();
|
||||
lon = in.readDouble();
|
||||
speed = in.readDouble();
|
||||
systemTime = in.readLong();
|
||||
if (in.readByte() == 0) {
|
||||
lightStatus = null;
|
||||
} else {
|
||||
lightStatus = in.readInt();
|
||||
}
|
||||
if (in.readByte() == 0) {
|
||||
lightLeftTime = null;
|
||||
} else {
|
||||
lightLeftTime = in.readInt();
|
||||
}
|
||||
rtmpUrl = in.readString();
|
||||
distance = in.readDouble();
|
||||
coordinates = in.createTypedArrayList(CloudLocationInfo.CREATOR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeInt(type);
|
||||
dest.writeDouble(lat);
|
||||
dest.writeDouble(lon);
|
||||
dest.writeDouble(speed);
|
||||
dest.writeLong(systemTime);
|
||||
if (lightStatus == null) {
|
||||
dest.writeByte((byte) 0);
|
||||
} else {
|
||||
dest.writeByte((byte) 1);
|
||||
dest.writeInt(lightStatus);
|
||||
}
|
||||
if (lightLeftTime == null) {
|
||||
dest.writeByte((byte) 0);
|
||||
} else {
|
||||
dest.writeByte((byte) 1);
|
||||
dest.writeInt(lightLeftTime);
|
||||
}
|
||||
dest.writeString(rtmpUrl);
|
||||
dest.writeDouble(distance);
|
||||
dest.writeTypedList(coordinates);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public static final Creator<CloudRoadData> CREATOR = new Creator<CloudRoadData>() {
|
||||
@Override
|
||||
public CloudRoadData createFromParcel(Parcel in) {
|
||||
return new CloudRoadData(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CloudRoadData[] newArray(int size) {
|
||||
return new CloudRoadData[size];
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -3,6 +3,8 @@ package com.mogo.module.common.entity;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -12,30 +14,80 @@ public
|
||||
*/
|
||||
class MogoSnapshotSetData implements Parcelable {
|
||||
|
||||
private String msgId;
|
||||
|
||||
private Long time;
|
||||
|
||||
//过期时间
|
||||
private Long expire;
|
||||
|
||||
//总数据集合
|
||||
private List<CloudRoadData> allList;
|
||||
|
||||
//红绿灯
|
||||
private CloudRoadData trafficLight;
|
||||
|
||||
|
||||
protected MogoSnapshotSetData(Parcel in) {
|
||||
msgId = in.readString();
|
||||
if (in.readByte() == 0) {
|
||||
time = null;
|
||||
} else {
|
||||
time = in.readLong();
|
||||
}
|
||||
if (in.readByte() == 0) {
|
||||
expire = null;
|
||||
} else {
|
||||
expire = in.readLong();
|
||||
}
|
||||
allList = in.createTypedArrayList(CloudRoadData.CREATOR);
|
||||
trafficLight = in.readParcelable(CloudRoadData.class.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
dest.writeString(msgId);
|
||||
if (time == null) {
|
||||
dest.writeByte((byte) 0);
|
||||
} else {
|
||||
dest.writeByte((byte) 1);
|
||||
dest.writeLong(time);
|
||||
}
|
||||
if (expire == null) {
|
||||
dest.writeByte((byte) 0);
|
||||
} else {
|
||||
dest.writeByte((byte) 1);
|
||||
dest.writeLong(expire);
|
||||
}
|
||||
dest.writeTypedList(allList);
|
||||
dest.writeParcelable(trafficLight, flags);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel( Parcel dest, int flags ) {
|
||||
}
|
||||
|
||||
public MogoSnapshotSetData() {
|
||||
}
|
||||
|
||||
protected MogoSnapshotSetData( Parcel in ) {
|
||||
}
|
||||
|
||||
public static final Creator< MogoSnapshotSetData > CREATOR = new Creator< MogoSnapshotSetData >() {
|
||||
public static final Creator<MogoSnapshotSetData> CREATOR = new Creator<MogoSnapshotSetData>() {
|
||||
@Override
|
||||
public MogoSnapshotSetData createFromParcel( Parcel source ) {
|
||||
return new MogoSnapshotSetData( source );
|
||||
public MogoSnapshotSetData createFromParcel(Parcel in) {
|
||||
return new MogoSnapshotSetData(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MogoSnapshotSetData[] newArray( int size ) {
|
||||
public MogoSnapshotSetData[] newArray(int size) {
|
||||
return new MogoSnapshotSetData[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoSnapshotSetData{" +
|
||||
"msgId='" + msgId + '\'' +
|
||||
", time=" + time +
|
||||
", expire=" + expire +
|
||||
", allList=" + allList +
|
||||
", trafficLight=" + trafficLight +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user