拆分列车信息
This commit is contained in:
parent
df92af2318
commit
148f2c38f5
@ -7,6 +7,8 @@ import club.joylink.xiannccda.ats.message.line3.MessageCons;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import club.joylink.xiannccda.ats.message.line3.rep.DeviceStatusBitmapResponse.DeviceTypeEntity;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.NccWindow;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.protobuf.GeneratedMessageV3;
|
||||
import com.google.protobuf.GeneratedMessageV3.Builder;
|
||||
@ -18,16 +20,24 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import lombok.Setter;
|
||||
|
||||
/** 2.7.9列车信息全体消息 */
|
||||
/**
|
||||
* 2.7.9列车信息全体消息
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class TrainIndicationInitResponse extends MessageResponse {
|
||||
|
||||
/** 线路号(2) */
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
||||
private Short lineId;
|
||||
/** 列车数量(2) */
|
||||
/**
|
||||
* 列车数量(2)
|
||||
*/
|
||||
private Short trainCnt;
|
||||
/** 列车列表 */
|
||||
/**
|
||||
* 列车列表
|
||||
*/
|
||||
private List<TrainCell> trains;
|
||||
|
||||
@Override
|
||||
@ -44,7 +54,7 @@ public class TrainIndicationInitResponse extends MessageResponse {
|
||||
public List<Builder> generateProto() throws Exception {
|
||||
List<GeneratedMessageV3.Builder> msgBuildList = Lists.newArrayList();
|
||||
for (TrainCell trainCell : this.trains) {
|
||||
DeviceStatusProto.Train.Builder builder = DeviceStatusProto.Train.newBuilder();
|
||||
TrainInfo.Builder builder = TrainInfo.newBuilder();
|
||||
builder.setLineId(lineId);
|
||||
if (trainCell.getRtuId() != null) {
|
||||
builder.setRtuId(trainCell.getRtuId());
|
||||
@ -52,14 +62,17 @@ public class TrainIndicationInitResponse extends MessageResponse {
|
||||
builder.setTrainIndex(trainCell.getTrainIndex());
|
||||
builder.setTrainId(trainCell.getTrainId());
|
||||
builder.setGroupId(trainCell.getGroupId());
|
||||
|
||||
if (trainCell.getNccWindow() != null) {
|
||||
builder.setNccWindow(trainCell.getNccWindow());
|
||||
}
|
||||
if (trainCell.getNccWindowOffset() != null) {
|
||||
builder.setNccWindowOffset(trainCell.getNccWindowOffset());
|
||||
NccWindow.Builder window = NccWindow.newBuilder();
|
||||
window.setNccWindow(trainCell.getNccWindow());
|
||||
window.setNccWinOffset(trainCell.getNccWindowOffset());
|
||||
builder.setWindow(window);
|
||||
|
||||
}
|
||||
|
||||
if (trainCell.getDevType() != null) {
|
||||
builder.setDevType(trainCell.getDevType().getVal());
|
||||
builder.setDevType(DeviceStatusProto.DeviceType.forNumber(trainCell.getDevType().getVal()));
|
||||
}
|
||||
builder.setDevName(trainCell.getDevName());
|
||||
if (trainCell.getDestinationId() != null) {
|
||||
@ -94,43 +107,81 @@ public class TrainIndicationInitResponse extends MessageResponse {
|
||||
@Setter
|
||||
public static class TrainCell {
|
||||
|
||||
/** 集中站站号(2) */
|
||||
/**
|
||||
* 集中站站号(2)
|
||||
*/
|
||||
private Short rtuId;
|
||||
/** NCC车次窗编号(2) */
|
||||
/**
|
||||
* NCC车次窗编号(2)
|
||||
*/
|
||||
private Short nccWindow;
|
||||
/** 列车在车次窗中的位置(1) */
|
||||
/**
|
||||
* 列车在车次窗中的位置(1)
|
||||
*/
|
||||
private Byte nccWindowOffset;
|
||||
/** 列车所在的设备的类型(2) */
|
||||
/**
|
||||
* 列车所在的设备的类型(2)
|
||||
*/
|
||||
private DeviceType devType;
|
||||
/** 列车所在的设备的名称(24) */
|
||||
/**
|
||||
* 列车所在的设备的名称(24)
|
||||
*/
|
||||
private String devName;
|
||||
/** 列车标示号,全线唯一(若无法提供,缺省值为0)(10) */
|
||||
/**
|
||||
* 列车标示号,全线唯一(若无法提供,缺省值为0)(10)
|
||||
*/
|
||||
private String trainIndex;
|
||||
/** 列车编组号(9) */
|
||||
/**
|
||||
* 列车编组号(9)
|
||||
*/
|
||||
private String groupId;
|
||||
/** 表号(9) */
|
||||
/**
|
||||
* 表号(9)
|
||||
*/
|
||||
private String trainId;
|
||||
/** 车次号(12) */
|
||||
/**
|
||||
* 车次号(12)
|
||||
*/
|
||||
private String globalId;
|
||||
/** 目的地号(4) */
|
||||
/**
|
||||
* 目的地号(4)
|
||||
*/
|
||||
private Integer destinationId;
|
||||
/** 编组数量(1) */
|
||||
/**
|
||||
* 编组数量(1)
|
||||
*/
|
||||
private byte rollingStock;
|
||||
/** 司机号(13) */
|
||||
/**
|
||||
* 司机号(13)
|
||||
*/
|
||||
private String driverId;
|
||||
/** 根据实际报点和计划的偏离时间(单位:秒,-215- +215 ,正数表示列车晚点秒数,负数表示列车早点秒数)(4) */
|
||||
/**
|
||||
* 根据实际报点和计划的偏离时间(单位:秒,-215- +215 ,正数表示列车晚点秒数,负数表示列车早点秒数)(4)
|
||||
*/
|
||||
private Integer otpTime;
|
||||
/** 列车状态,见附录6.3.14列车状态定义(4) */
|
||||
/**
|
||||
* 列车状态,见附录6.3.14列车状态定义(4)
|
||||
*/
|
||||
private Integer mode;
|
||||
/** 列车到点(7) */
|
||||
/**
|
||||
* 列车到点(7)
|
||||
*/
|
||||
private LocalDateTime arriveTime;
|
||||
/** 列车发点(7) */
|
||||
/**
|
||||
* 列车发点(7)
|
||||
*/
|
||||
private LocalDateTime departTime;
|
||||
/** 满载率(百分比,例如50,表示满载率为50%)(4) */
|
||||
/**
|
||||
* 满载率(百分比,例如50,表示满载率为50%)(4)
|
||||
*/
|
||||
private Integer rate;
|
||||
/** 速度(KM/H)(1) */
|
||||
/**
|
||||
* 速度(KM/H)(1)
|
||||
*/
|
||||
private byte speed;
|
||||
/** 预留(2) */
|
||||
/**
|
||||
* 预留(2)
|
||||
*/
|
||||
private byte[] reserve = new byte[2];
|
||||
|
||||
private TrainCell decode(final ByteBuf buf) {
|
||||
|
@ -5,10 +5,17 @@ import club.joylink.xiannccda.ats.message.line3.DateTimeUtil;
|
||||
import club.joylink.xiannccda.ats.message.line3.MessageCons;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceStatus;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.NccWindow;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.protobuf.GeneratedMessageV3.Builder;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneOffset;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
@ -23,7 +30,9 @@ public class TrainIndicationUpdateResponse extends MessageResponse {
|
||||
*/
|
||||
private Short lineId;
|
||||
/**
|
||||
* 车次号变化状态(2) 0x01:增加<br> 0x02:更新<br> true-更新,false-增加
|
||||
* 车次号变化状态(2) 0x01:增加<br> 0x02:更新
|
||||
* <br>
|
||||
* true-更新,false-增加
|
||||
*/
|
||||
private Boolean type;
|
||||
/**
|
||||
@ -114,6 +123,40 @@ public class TrainIndicationUpdateResponse extends MessageResponse {
|
||||
return trainMode.is(mode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Builder> generateProto() throws Exception {
|
||||
TrainProto.TrainInfo.Builder train = TrainInfo.newBuilder();
|
||||
|
||||
train.setLineId(this.lineId);
|
||||
train.setType(this.type);
|
||||
train.setRtuId(this.rtuId);
|
||||
NccWindow.Builder window = NccWindow.newBuilder();
|
||||
window.setNccWindow(this.nccWindow);
|
||||
window.setNccWinOffset(this.nccWindowOffset);
|
||||
train.setWindow(window);
|
||||
|
||||
train.setDevType(DeviceStatusProto.DeviceType.forNumber(this.devType.getVal()));
|
||||
train.setDevName(this.devName);
|
||||
|
||||
train.setTrainIndex(this.trainIndex);
|
||||
train.setRollingStock(this.getRollingStock());
|
||||
train.setOtpTime(this.optTime);
|
||||
train.setArriveTime(this.arriveTime.toEpochSecond(ZoneOffset.ofHours(8)) * 1000);
|
||||
train.setDepartTime(this.departTime.toEpochSecond(ZoneOffset.ofHours(8)) * 1000);
|
||||
train.setMode(this.mode);
|
||||
train.setSpeed(this.speed);
|
||||
train.setRate(this.rate);
|
||||
train.setRouteId(this.routeId);
|
||||
train.setDriverId(this.driverId);
|
||||
train.setDestinationId(this.destinationId);
|
||||
train.setGroupId(this.groupId);
|
||||
train.setGlobalId(this.globalId);
|
||||
train.setTrainId(this.trainId);
|
||||
|
||||
return Lists.newArrayList(train);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void decode2(ByteBuf buf) throws Exception {
|
||||
short devType;
|
||||
|
@ -5,6 +5,8 @@ import club.joylink.xiannccda.ats.message.line3.DateTimeUtil;
|
||||
import club.joylink.xiannccda.ats.message.line3.MessageCons;
|
||||
import club.joylink.xiannccda.ats.message.line3.rep.TrainIndicationInitResponse.TrainCell;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.TrainRecord;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.protobuf.GeneratedMessageV3;
|
||||
import com.google.protobuf.GeneratedMessageV3.Builder;
|
||||
@ -15,52 +17,68 @@ import lombok.Getter;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Setter;
|
||||
|
||||
/** 2.7.8列车报点消息 */
|
||||
/**
|
||||
* 2.7.8列车报点消息
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class TrainRecordResponse extends MessageResponse {
|
||||
|
||||
/** 线路号(2) */
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
||||
private Short lineId;
|
||||
/** 表号(9) */
|
||||
/**
|
||||
* 表号(9)
|
||||
*/
|
||||
private String trainId;
|
||||
/** 车次号(12) */
|
||||
/**
|
||||
* 车次号(12)
|
||||
*/
|
||||
private String globalId;
|
||||
/** 局部序列号(4) */
|
||||
/**
|
||||
* 局部序列号(4)
|
||||
*/
|
||||
private Integer localSubId;
|
||||
/** 车组号(9) */
|
||||
/**
|
||||
* 车组号(9)
|
||||
*/
|
||||
private String groupId;
|
||||
/** 目的地(4) */
|
||||
/**
|
||||
* 目的地(4)
|
||||
*/
|
||||
private Integer destinationId;
|
||||
/**
|
||||
* 列车类型(2) 0x01:计划车<br>
|
||||
* 0x02:头码车<br>
|
||||
* 0x03:M0车<br>
|
||||
* 0x04:MM车<br>
|
||||
* 列车类型(2) 0x01:计划车<br> 0x02:头码车<br> 0x03:M0车<br> 0x04:MM车<br>
|
||||
*/
|
||||
private TrainTypeEnum trainType;
|
||||
/**
|
||||
* 运行方向(1) 0x01:下行 <br>
|
||||
* 0x02:上行<br>
|
||||
* 0x00:无方向<br>
|
||||
* 运行方向(1) 0x01:下行 <br> 0x02:上行<br> 0x00:无方向<br>
|
||||
*/
|
||||
private DirectionEnum direction;
|
||||
/** 站号(2) */
|
||||
/**
|
||||
* 站号(2)
|
||||
*/
|
||||
private Short stationId;
|
||||
/** 站台编号(2) */
|
||||
/**
|
||||
* 站台编号(2)
|
||||
*/
|
||||
private Short sideId;
|
||||
/** 轨道名称(小区段名称)(20) */
|
||||
/**
|
||||
* 轨道名称(小区段名称)(20)
|
||||
*/
|
||||
private String trackName;
|
||||
/**
|
||||
* 到发点类型(2)<br>
|
||||
* 0x01H:到达<br>
|
||||
* 0x02H:出发<br>
|
||||
* true-到达,false-出发
|
||||
* 到发点类型(2)<br> 0x01H:到达<br> 0x02H:出发<br> true-到达,false-出发
|
||||
*/
|
||||
private Boolean recordType;
|
||||
/** 到发时间(7) */
|
||||
/**
|
||||
* 到发时间(7)
|
||||
*/
|
||||
private LocalDateTime recordTime;
|
||||
/** 预留(4) */
|
||||
/**
|
||||
* 预留(4)
|
||||
*/
|
||||
private byte[] reserve = new byte[4];
|
||||
|
||||
@Override
|
||||
@ -111,7 +129,7 @@ public class TrainRecordResponse extends MessageResponse {
|
||||
@Override
|
||||
public List<Builder> generateProto() throws Exception {
|
||||
List<GeneratedMessageV3.Builder> msgBuildList = Lists.newArrayList();
|
||||
DeviceStatusProto.Train.Builder builder = DeviceStatusProto.Train.newBuilder();
|
||||
TrainRecord.Builder builder = TrainRecord.newBuilder();
|
||||
builder.setLineId(this.getLineId());
|
||||
builder.setTrainId(this.getTrainId());
|
||||
builder.setGlobalId(this.getGlobalId());
|
||||
@ -120,7 +138,7 @@ public class TrainRecordResponse extends MessageResponse {
|
||||
builder.setTrainType(this.getTrainType().type);
|
||||
}
|
||||
if (this.getDirection() != null) {
|
||||
builder.setDirection(this.getDirection().value);
|
||||
builder.setDir(this.getDirection().value);
|
||||
}
|
||||
if (this.getStationId() != null) {
|
||||
builder.setStationId(this.getStationId());
|
||||
@ -140,9 +158,7 @@ public class TrainRecordResponse extends MessageResponse {
|
||||
}
|
||||
|
||||
/**
|
||||
* 运行方向(1) 0x01:下行 <br>
|
||||
* 0x02:上行<br>
|
||||
* 0x00:无方向<br>
|
||||
* 运行方向(1) 0x01:下行 <br> 0x02:上行<br> 0x00:无方向<br>
|
||||
*/
|
||||
public static enum DirectionEnum {
|
||||
Down(0x01),
|
||||
@ -166,10 +182,7 @@ public class TrainRecordResponse extends MessageResponse {
|
||||
}
|
||||
|
||||
/**
|
||||
* 列车类型(2) 0x01:计划车<br>
|
||||
* 0x02:头码车<br>
|
||||
* 0x03:M0车<br>
|
||||
* 0x04:MM车<br>
|
||||
* 列车类型(2) 0x01:计划车<br> 0x02:头码车<br> 0x03:M0车<br> 0x04:MM车<br>
|
||||
*/
|
||||
public static enum TrainTypeEnum {
|
||||
PlannedTrain(0x01),
|
||||
|
File diff suppressed because it is too large
Load Diff
8680
src/main/java/club/joylink/xiannccda/dto/protos/TrainProto.java
Normal file
8680
src/main/java/club/joylink/xiannccda/dto/protos/TrainProto.java
Normal file
File diff suppressed because it is too large
Load Diff
@ -595,24 +595,24 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train>
|
||||
java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo>
|
||||
getTrainList();
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train getTrain(int index);
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo getTrain(int index);
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
int getTrainCount();
|
||||
/**
|
||||
@ -620,18 +620,18 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
java.util.List<? extends club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>
|
||||
java.util.List<? extends club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>
|
||||
getTrainOrBuilderList();
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder getTrainOrBuilder(
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder getTrainOrBuilder(
|
||||
int index);
|
||||
}
|
||||
/**
|
||||
@ -1478,16 +1478,16 @@ public final class WsMessageProto {
|
||||
|
||||
public static final int TRAIN_FIELD_NUMBER = 14;
|
||||
@SuppressWarnings("serial")
|
||||
private java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> train_;
|
||||
private java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> train_;
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> getTrainList() {
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> getTrainList() {
|
||||
return train_;
|
||||
}
|
||||
/**
|
||||
@ -1495,10 +1495,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<? extends club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>
|
||||
public java.util.List<? extends club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>
|
||||
getTrainOrBuilderList() {
|
||||
return train_;
|
||||
}
|
||||
@ -1507,7 +1507,7 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getTrainCount() {
|
||||
@ -1518,10 +1518,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train getTrain(int index) {
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo getTrain(int index) {
|
||||
return train_.get(index);
|
||||
}
|
||||
/**
|
||||
@ -1529,10 +1529,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder getTrainOrBuilder(
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder getTrainOrBuilder(
|
||||
int index) {
|
||||
return train_.get(index);
|
||||
}
|
||||
@ -2734,9 +2734,9 @@ public final class WsMessageProto {
|
||||
break;
|
||||
} // case 106
|
||||
case 114: {
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train m =
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo m =
|
||||
input.readMessage(
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.parser(),
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.parser(),
|
||||
extensionRegistry);
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
@ -6819,26 +6819,26 @@ public final class WsMessageProto {
|
||||
return netWorkBuilder_;
|
||||
}
|
||||
|
||||
private java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> train_ =
|
||||
private java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> train_ =
|
||||
java.util.Collections.emptyList();
|
||||
private void ensureTrainIsMutable() {
|
||||
if (!((bitField0_ & 0x00002000) != 0)) {
|
||||
train_ = new java.util.ArrayList<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train>(train_);
|
||||
train_ = new java.util.ArrayList<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo>(train_);
|
||||
bitField0_ |= 0x00002000;
|
||||
}
|
||||
}
|
||||
|
||||
private com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder, club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder> trainBuilder_;
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder> trainBuilder_;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> getTrainList() {
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> getTrainList() {
|
||||
if (trainBuilder_ == null) {
|
||||
return java.util.Collections.unmodifiableList(train_);
|
||||
} else {
|
||||
@ -6850,7 +6850,7 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public int getTrainCount() {
|
||||
if (trainBuilder_ == null) {
|
||||
@ -6864,9 +6864,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train getTrain(int index) {
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo getTrain(int index) {
|
||||
if (trainBuilder_ == null) {
|
||||
return train_.get(index);
|
||||
} else {
|
||||
@ -6878,10 +6878,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public Builder setTrain(
|
||||
int index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train value) {
|
||||
int index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo value) {
|
||||
if (trainBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
@ -6899,10 +6899,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public Builder setTrain(
|
||||
int index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder builderForValue) {
|
||||
int index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder builderForValue) {
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
train_.set(index, builderForValue.build());
|
||||
@ -6917,9 +6917,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public Builder addTrain(club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train value) {
|
||||
public Builder addTrain(club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo value) {
|
||||
if (trainBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
@ -6937,10 +6937,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public Builder addTrain(
|
||||
int index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train value) {
|
||||
int index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo value) {
|
||||
if (trainBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
@ -6958,10 +6958,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public Builder addTrain(
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder builderForValue) {
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder builderForValue) {
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
train_.add(builderForValue.build());
|
||||
@ -6976,10 +6976,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public Builder addTrain(
|
||||
int index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder builderForValue) {
|
||||
int index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder builderForValue) {
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
train_.add(index, builderForValue.build());
|
||||
@ -6994,10 +6994,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public Builder addAllTrain(
|
||||
java.lang.Iterable<? extends club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> values) {
|
||||
java.lang.Iterable<? extends club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> values) {
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
@ -7013,7 +7013,7 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public Builder clearTrain() {
|
||||
if (trainBuilder_ == null) {
|
||||
@ -7030,7 +7030,7 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public Builder removeTrain(int index) {
|
||||
if (trainBuilder_ == null) {
|
||||
@ -7047,9 +7047,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder getTrainBuilder(
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder getTrainBuilder(
|
||||
int index) {
|
||||
return getTrainFieldBuilder().getBuilder(index);
|
||||
}
|
||||
@ -7058,9 +7058,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder getTrainOrBuilder(
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder getTrainOrBuilder(
|
||||
int index) {
|
||||
if (trainBuilder_ == null) {
|
||||
return train_.get(index); } else {
|
||||
@ -7072,9 +7072,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public java.util.List<? extends club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>
|
||||
public java.util.List<? extends club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>
|
||||
getTrainOrBuilderList() {
|
||||
if (trainBuilder_ != null) {
|
||||
return trainBuilder_.getMessageOrBuilderList();
|
||||
@ -7087,41 +7087,41 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder addTrainBuilder() {
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder addTrainBuilder() {
|
||||
return getTrainFieldBuilder().addBuilder(
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.getDefaultInstance());
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.getDefaultInstance());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder addTrainBuilder(
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder addTrainBuilder(
|
||||
int index) {
|
||||
return getTrainFieldBuilder().addBuilder(
|
||||
index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.getDefaultInstance());
|
||||
index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.getDefaultInstance());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 14;</code>
|
||||
* <code>repeated .train.TrainInfo train = 14;</code>
|
||||
*/
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder>
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder>
|
||||
getTrainBuilderList() {
|
||||
return getTrainFieldBuilder().getBuilderList();
|
||||
}
|
||||
private com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder, club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>
|
||||
getTrainFieldBuilder() {
|
||||
if (trainBuilder_ == null) {
|
||||
trainBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder, club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>(
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>(
|
||||
train_,
|
||||
((bitField0_ & 0x00002000) != 0),
|
||||
getParentForChildren(),
|
||||
@ -7247,24 +7247,24 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train>
|
||||
java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo>
|
||||
getTrainList();
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train getTrain(int index);
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo getTrain(int index);
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
int getTrainCount();
|
||||
/**
|
||||
@ -7272,18 +7272,18 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
java.util.List<? extends club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>
|
||||
java.util.List<? extends club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>
|
||||
getTrainOrBuilderList();
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder getTrainOrBuilder(
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder getTrainOrBuilder(
|
||||
int index);
|
||||
}
|
||||
/**
|
||||
@ -7390,16 +7390,16 @@ public final class WsMessageProto {
|
||||
|
||||
public static final int TRAIN_FIELD_NUMBER = 2;
|
||||
@SuppressWarnings("serial")
|
||||
private java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> train_;
|
||||
private java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> train_;
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> getTrainList() {
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> getTrainList() {
|
||||
return train_;
|
||||
}
|
||||
/**
|
||||
@ -7407,10 +7407,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public java.util.List<? extends club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>
|
||||
public java.util.List<? extends club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>
|
||||
getTrainOrBuilderList() {
|
||||
return train_;
|
||||
}
|
||||
@ -7419,7 +7419,7 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public int getTrainCount() {
|
||||
@ -7430,10 +7430,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train getTrain(int index) {
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo getTrain(int index) {
|
||||
return train_.get(index);
|
||||
}
|
||||
/**
|
||||
@ -7441,10 +7441,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
@java.lang.Override
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder getTrainOrBuilder(
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder getTrainOrBuilder(
|
||||
int index) {
|
||||
return train_.get(index);
|
||||
}
|
||||
@ -7834,9 +7834,9 @@ public final class WsMessageProto {
|
||||
break;
|
||||
} // case 10
|
||||
case 18: {
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train m =
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo m =
|
||||
input.readMessage(
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.parser(),
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.parser(),
|
||||
extensionRegistry);
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
@ -8175,26 +8175,26 @@ public final class WsMessageProto {
|
||||
return diagramBuilder_;
|
||||
}
|
||||
|
||||
private java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> train_ =
|
||||
private java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> train_ =
|
||||
java.util.Collections.emptyList();
|
||||
private void ensureTrainIsMutable() {
|
||||
if (!((bitField0_ & 0x00000002) != 0)) {
|
||||
train_ = new java.util.ArrayList<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train>(train_);
|
||||
train_ = new java.util.ArrayList<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo>(train_);
|
||||
bitField0_ |= 0x00000002;
|
||||
}
|
||||
}
|
||||
|
||||
private com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder, club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder> trainBuilder_;
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder> trainBuilder_;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> getTrainList() {
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> getTrainList() {
|
||||
if (trainBuilder_ == null) {
|
||||
return java.util.Collections.unmodifiableList(train_);
|
||||
} else {
|
||||
@ -8206,7 +8206,7 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public int getTrainCount() {
|
||||
if (trainBuilder_ == null) {
|
||||
@ -8220,9 +8220,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train getTrain(int index) {
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo getTrain(int index) {
|
||||
if (trainBuilder_ == null) {
|
||||
return train_.get(index);
|
||||
} else {
|
||||
@ -8234,10 +8234,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public Builder setTrain(
|
||||
int index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train value) {
|
||||
int index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo value) {
|
||||
if (trainBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
@ -8255,10 +8255,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public Builder setTrain(
|
||||
int index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder builderForValue) {
|
||||
int index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder builderForValue) {
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
train_.set(index, builderForValue.build());
|
||||
@ -8273,9 +8273,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public Builder addTrain(club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train value) {
|
||||
public Builder addTrain(club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo value) {
|
||||
if (trainBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
@ -8293,10 +8293,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public Builder addTrain(
|
||||
int index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train value) {
|
||||
int index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo value) {
|
||||
if (trainBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
@ -8314,10 +8314,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public Builder addTrain(
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder builderForValue) {
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder builderForValue) {
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
train_.add(builderForValue.build());
|
||||
@ -8332,10 +8332,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public Builder addTrain(
|
||||
int index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder builderForValue) {
|
||||
int index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder builderForValue) {
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
train_.add(index, builderForValue.build());
|
||||
@ -8350,10 +8350,10 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public Builder addAllTrain(
|
||||
java.lang.Iterable<? extends club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train> values) {
|
||||
java.lang.Iterable<? extends club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo> values) {
|
||||
if (trainBuilder_ == null) {
|
||||
ensureTrainIsMutable();
|
||||
com.google.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
@ -8369,7 +8369,7 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public Builder clearTrain() {
|
||||
if (trainBuilder_ == null) {
|
||||
@ -8386,7 +8386,7 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public Builder removeTrain(int index) {
|
||||
if (trainBuilder_ == null) {
|
||||
@ -8403,9 +8403,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder getTrainBuilder(
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder getTrainBuilder(
|
||||
int index) {
|
||||
return getTrainFieldBuilder().getBuilder(index);
|
||||
}
|
||||
@ -8414,9 +8414,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder getTrainOrBuilder(
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder getTrainOrBuilder(
|
||||
int index) {
|
||||
if (trainBuilder_ == null) {
|
||||
return train_.get(index); } else {
|
||||
@ -8428,9 +8428,9 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public java.util.List<? extends club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>
|
||||
public java.util.List<? extends club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>
|
||||
getTrainOrBuilderList() {
|
||||
if (trainBuilder_ != null) {
|
||||
return trainBuilder_.getMessageOrBuilderList();
|
||||
@ -8443,41 +8443,41 @@ public final class WsMessageProto {
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder addTrainBuilder() {
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder addTrainBuilder() {
|
||||
return getTrainFieldBuilder().addBuilder(
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.getDefaultInstance());
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.getDefaultInstance());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder addTrainBuilder(
|
||||
public club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder addTrainBuilder(
|
||||
int index) {
|
||||
return getTrainFieldBuilder().addBuilder(
|
||||
index, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.getDefaultInstance());
|
||||
index, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.getDefaultInstance());
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
*列车信息
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated .state.Train train = 2;</code>
|
||||
* <code>repeated .train.TrainInfo train = 2;</code>
|
||||
*/
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder>
|
||||
public java.util.List<club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder>
|
||||
getTrainBuilderList() {
|
||||
return getTrainFieldBuilder().getBuilderList();
|
||||
}
|
||||
private com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder, club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>
|
||||
getTrainFieldBuilder() {
|
||||
if (trainBuilder_ == null) {
|
||||
trainBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train, club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train.Builder, club.joylink.xiannccda.dto.protos.DeviceStatusProto.TrainOrBuilder>(
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo.Builder, club.joylink.xiannccda.dto.protos.TrainProto.TrainInfoOrBuilder>(
|
||||
train_,
|
||||
((bitField0_ & 0x00000002) != 0),
|
||||
getParentForChildren(),
|
||||
@ -8570,28 +8570,30 @@ public final class WsMessageProto {
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n\020ws_message.proto\022\005state\032\023device_status" +
|
||||
".proto\032\037LineNetTrainOffsetDiagram.proto\"" +
|
||||
"\332\003\n\rWsLineMessage\022\027\n\003rtu\030\001 \003(\0132\n.state.R" +
|
||||
"tu\022\037\n\007station\030\002 \003(\0132\016.state.Station\022\035\n\006s" +
|
||||
"ignal\030\003 \003(\0132\r.state.Signal\022\033\n\005entry\030\004 \003(" +
|
||||
"\0132\014.state.Entry\022\035\n\006switch\030\005 \003(\0132\r.state." +
|
||||
"Switch\022\033\n\005track\030\006 \003(\0132\014.state.Track\022!\n\010p" +
|
||||
"latform\030\007 \003(\0132\017.state.Platform\022\033\n\005scada\030" +
|
||||
"\010 \003(\0132\014.state.Scada\022-\n\016waterProofDoor\030\t " +
|
||||
"\003(\0132\025.state.WaterProofDoor\022!\n\010workArea\030\n" +
|
||||
" \003(\0132\017.state.WorkArea\022\031\n\004gama\030\013 \003(\0132\013.st" +
|
||||
"ate.Gama\022#\n\ttrainMode\030\014 \003(\0132\020.state.Trai" +
|
||||
"nMode\022(\n\007netWork\030\r \003(\0132\027.state.OccNccFep" +
|
||||
"Network\022\033\n\005train\030\016 \003(\0132\014.state.Train\"d\n\020" +
|
||||
"WsLineNetMessage\0223\n\007diagram\030\001 \003(\0132\".diag" +
|
||||
"ram.LineNetTrainOffsetDiagram\022\033\n\005train\030\002" +
|
||||
" \003(\0132\014.state.TrainB3\n!club.joylink.xiann" +
|
||||
"ccda.dto.protosB\016WsMessageProtob\006proto3"
|
||||
".proto\032\013train.proto\032\037LineNetTrainOffsetD" +
|
||||
"iagram.proto\"\336\003\n\rWsLineMessage\022\027\n\003rtu\030\001 " +
|
||||
"\003(\0132\n.state.Rtu\022\037\n\007station\030\002 \003(\0132\016.state" +
|
||||
".Station\022\035\n\006signal\030\003 \003(\0132\r.state.Signal\022" +
|
||||
"\033\n\005entry\030\004 \003(\0132\014.state.Entry\022\035\n\006switch\030\005" +
|
||||
" \003(\0132\r.state.Switch\022\033\n\005track\030\006 \003(\0132\014.sta" +
|
||||
"te.Track\022!\n\010platform\030\007 \003(\0132\017.state.Platf" +
|
||||
"orm\022\033\n\005scada\030\010 \003(\0132\014.state.Scada\022-\n\016wate" +
|
||||
"rProofDoor\030\t \003(\0132\025.state.WaterProofDoor\022" +
|
||||
"!\n\010workArea\030\n \003(\0132\017.state.WorkArea\022\031\n\004ga" +
|
||||
"ma\030\013 \003(\0132\013.state.Gama\022#\n\ttrainMode\030\014 \003(\013" +
|
||||
"2\020.state.TrainMode\022(\n\007netWork\030\r \003(\0132\027.st" +
|
||||
"ate.OccNccFepNetwork\022\037\n\005train\030\016 \003(\0132\020.tr" +
|
||||
"ain.TrainInfo\"h\n\020WsLineNetMessage\0223\n\007dia" +
|
||||
"gram\030\001 \003(\0132\".diagram.LineNetTrainOffsetD" +
|
||||
"iagram\022\037\n\005train\030\002 \003(\0132\020.train.TrainInfoB" +
|
||||
"3\n!club.joylink.xiannccda.dto.protosB\016Ws" +
|
||||
"MessageProtob\006proto3"
|
||||
};
|
||||
descriptor = com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.getDescriptor(),
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.getDescriptor(),
|
||||
club.joylink.xiannccda.dto.protos.LineNetTrainOffsetDiagramProto.getDescriptor(),
|
||||
});
|
||||
internal_static_state_WsLineMessage_descriptor =
|
||||
@ -8607,6 +8609,7 @@ public final class WsMessageProto {
|
||||
internal_static_state_WsLineNetMessage_descriptor,
|
||||
new java.lang.String[] { "Diagram", "Train", });
|
||||
club.joylink.xiannccda.dto.protos.DeviceStatusProto.getDescriptor();
|
||||
club.joylink.xiannccda.dto.protos.TrainProto.getDescriptor();
|
||||
club.joylink.xiannccda.dto.protos.LineNetTrainOffsetDiagramProto.getDescriptor();
|
||||
}
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
package club.joylink.xiannccda.service;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.collect.DeviceStatusDataRepository;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto;
|
||||
import club.joylink.xiannccda.dto.protos.TrainProto.TrainInfo;
|
||||
import club.joylink.xiannccda.ws.IMessageServer;
|
||||
import club.joylink.xiannccda.ws.LineNetMessageServer;
|
||||
import club.joylink.xiannccda.ws.WsMessageServerManager;
|
||||
import com.google.protobuf.GeneratedMessageV3.Builder;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto.Train;
|
||||
import club.joylink.xiannccda.ats.message.line3.device.DeviceType;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -19,7 +20,9 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/** 线路设备信息更新 */
|
||||
/**
|
||||
* 线路设备信息更新
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class LineDeviceStatusService {
|
||||
@ -119,22 +122,22 @@ public class LineDeviceStatusService {
|
||||
|
||||
private void refreshTestData() {
|
||||
Map<String, Integer> offsetMap = new HashMap<>(trainList.size()); // 列车到达位置
|
||||
Map<String, Train.Builder> trainInfoMap = new HashMap<>(trainList.size()); // 列车信息集合
|
||||
Map<String, TrainInfo.Builder> trainInfoMap = new HashMap<>(trainList.size()); // 列车信息集合
|
||||
for (int i = 0, len = trainList.size(); i < len; i++) {
|
||||
String code = trainList.get(i);
|
||||
Train.Builder builder = Train.newBuilder(); // 列车信息
|
||||
TrainInfo.Builder builder = TrainInfo.newBuilder(); // 列车信息
|
||||
builder.setLineId(3);
|
||||
builder.setTrainIndex(code);
|
||||
builder.setGroupId(code);
|
||||
builder.setDevType(DeviceType.DEVICE_TYPE_TRACK.getVal());
|
||||
builder.setDevType(DeviceStatusProto.DeviceType.forNumber(DeviceType.DEVICE_TYPE_TRACK.getVal()));
|
||||
builder.setShow(true);
|
||||
int offset = (i / 2) * 4;
|
||||
if (i % 2 == 0) {
|
||||
builder.setDirection(0);
|
||||
// builder.setDirection(0);
|
||||
builder.setDevName(rightPathList.get(offset));
|
||||
builder.setDestinationId(rightPathList.size() - 1);
|
||||
} else {
|
||||
builder.setDirection(1);
|
||||
// builder.setDirection(1);
|
||||
builder.setDevName(leftPathList.get(offset));
|
||||
builder.setDestinationId(leftPathList.size() - 1);
|
||||
}
|
||||
@ -153,7 +156,7 @@ public class LineDeviceStatusService {
|
||||
if (!codeList.contains(k)) {
|
||||
return;
|
||||
}
|
||||
List<String> path = v.getDirection() % 2 == 0 ? rightPathList : leftPathList;
|
||||
/*List<String> path = v.getDirection() % 2 == 0 ? rightPathList : leftPathList;
|
||||
// 如果已经到达目的地
|
||||
if (offsetMap.get(k) == v.getDestinationId()) {
|
||||
v.setShow(false); // 到达终点隐藏
|
||||
@ -163,7 +166,7 @@ public class LineDeviceStatusService {
|
||||
v.setDevName(path.get(offsetMap.get(k))); // 更新到下一个位置
|
||||
v.setDestinationId(path.size() - 1);
|
||||
offsetMap.put(k, offsetMap.get(k) + 1);
|
||||
}
|
||||
}*/
|
||||
builders.add(v.clone());
|
||||
});
|
||||
DeviceStatusDataRepository.addDeviceStatusDataList(dataKey, builders);
|
||||
|
@ -1,11 +1,9 @@
|
||||
package club.joylink.xiannccda.ws;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.collect.DeviceStatusDataRepository;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto.Rtu;
|
||||
import club.joylink.xiannccda.dto.protos.DeviceStatusProto.Signal;
|
||||
import club.joylink.xiannccda.dto.protos.WsMessageProto.WsLineMessage;
|
||||
import club.joylink.xiannccda.dto.protos.WsMessageProto.WsLineMessage.Builder;
|
||||
import club.joylink.xiannccda.exception.BusinessExceptionAssertEnum;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -87,7 +87,7 @@ public class GenertateProtoBufUtil {
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
GenertateProtoBufUtil gu = new GenertateProtoBufUtil(System.getProperty("user.dir"), true);
|
||||
GenertateProtoBufUtil gu = new GenertateProtoBufUtil(System.getProperty("user.dir"), false);
|
||||
gu.execCommand();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user