ncc协议x

This commit is contained in:
xzb 2023-06-07 17:14:33 +08:00
parent 10446891eb
commit f63ff8c28a
3 changed files with 32 additions and 4 deletions

View File

@ -114,7 +114,7 @@ public enum MessageId {
/**
* 断点续传结束
*/
Resume_END_ACK(0x0026, null),
Resume_END_ACK(0x0026, ()->new ResumeEndAckResponse()),
/**
* 查询无结果消息
*/

View File

@ -29,7 +29,7 @@ public class ResumeDataResponse extends MessageResponse {
*/
private Short msgCnt;
/**
* 补传的消息消息格式内容和本接口协议定义的消息格式一致时间戳保持与实时发送时的一致
* 补传的消息(全部为响应类消息)消息格式内容和本接口协议定义的消息格式一致时间戳保持与实时发送时的一致
*/
private List<MessageResponse> messageData;
@ -41,8 +41,8 @@ public class ResumeDataResponse extends MessageResponse {
this.msgCnt = buf.readShort();
this.messageData = new ArrayList<>(this.msgCnt);
//
for(int i=0;i<this.msgCnt;i++){
final int _readIndex = buf.readerIndex();
for (int i = 0; i < this.msgCnt; i++) {
final int _readIndex = buf.readerIndex();
buf.skipBytes(8);
final MessageId messageId = MessageId.of(buf.readShort());
buf.readerIndex(_readIndex);

View File

@ -0,0 +1,28 @@
package club.joylink.xiannccda.ats.message.line3;
import club.joylink.xiannccda.ats.message.MessageResponse;
import io.netty.buffer.ByteBuf;
/**
* 2.9.3.4 断点续传结束消息
*/
public class ResumeEndAckResponse extends MessageResponse {
/**
* 线路号(2)
*/
private Short lineId;
/**
* 开始时间(7)
*/
private byte[] beginTime = new byte[7];
/**
* 结束时间(7)
*/
private byte[] endTime = new byte[7];
@Override
public void decode2(ByteBuf buf) throws Exception {
this.lineId = buf.readShort();
buf.readBytes(this.beginTime);
buf.readBytes(this.endTime);
}
}