diff --git a/src/main/java/club/joylink/xiannccda/ats/message/line3/TrainIndicationInitRsp.java b/src/main/java/club/joylink/xiannccda/ats/message/line3/TrainIndicationInitRsp.java new file mode 100644 index 0000000..e5ef831 --- /dev/null +++ b/src/main/java/club/joylink/xiannccda/ats/message/line3/TrainIndicationInitRsp.java @@ -0,0 +1,136 @@ +package club.joylink.xiannccda.ats.message.line3; + +import club.joylink.xiannccda.ats.message.MessageData; +import io.netty.buffer.ByteBuf; + +import java.util.ArrayList; +import java.util.List; + +/** + * 2.7.9列车信息全体消息 + */ +public class TrainIndicationInitRsp extends MessageData { + /** + * 线路号(2) + */ + private Short lineId; + /** + * 列车数量(2) + */ + private Short trainCnt; + /** + * 列车列表 + */ + private List trains; + + @Override + public void decode2(ByteBuf buf) throws Exception { + this.lineId = buf.readShort(); + this.trainCnt = buf.readShort(); + this.trains = new ArrayList<>(this.trainCnt); + for(int cnt = 0;cnt