This commit is contained in:
tiger_zhou 2023-06-07 10:13:24 +08:00
commit b944a9a6cf
11 changed files with 37 additions and 17 deletions

View File

@ -54,7 +54,7 @@ public abstract class MessageData {
* @param buf
* @throws Exception
*/
abstract void decode2(ByteBuf buf) throws Exception;
public abstract void decode2(ByteBuf buf) throws Exception;
public void encode(ByteBuf buf) {
final int messageLength = this.length;
@ -70,7 +70,7 @@ public abstract class MessageData {
*
* @param buf
*/
abstract void encode2(ByteBuf buf);
public abstract void encode2(ByteBuf buf);
public int total() {
return this.length + 2;

View File

@ -5,6 +5,6 @@ import io.netty.buffer.ByteBuf;
public abstract class MessageResponse extends MessageData {
@Override
void encode2(ByteBuf buf) {
public void encode2(ByteBuf buf) {
}
}

View File

@ -14,4 +14,9 @@ public class HeartBeatMsg extends MessageData {
public void decode2(ByteBuf buf) throws Exception {
}
@Override
public void encode2(ByteBuf buf) {
}
}

View File

@ -1,12 +1,12 @@
package club.joylink.xiannccda.ats.message.line3;
import club.joylink.xiannccda.ats.message.MessageData;
import club.joylink.xiannccda.ats.message.MessageResponse;
import io.netty.buffer.ByteBuf;
/**
* 2.7.14 当天计划运行图参数消息
*/
public class InUsedScheduleParameterResponse extends MessageData {
public class InUsedScheduleParameterResponse extends MessageResponse {
/**
* 线路号(2)

View File

@ -1,9 +1,9 @@
package club.joylink.xiannccda.ats.message.line3;
import club.joylink.xiannccda.ats.message.MessageData;
import club.joylink.xiannccda.ats.message.MessageResponse;
import io.netty.buffer.ByteBuf;
public class MessageAlarmResponse extends MessageData {
public class MessageAlarmResponse extends MessageResponse {
/**
* 线路号(2)

View File

@ -0,0 +1,15 @@
package club.joylink.xiannccda.ats.message.line3;
import club.joylink.xiannccda.ats.message.MessageRequest;
import io.netty.buffer.ByteBuf;
/**
* 2.8.1 统计信息查询消息
*/
public class ReportAskRequest extends MessageRequest {
@Override
public void encode2(ByteBuf buf) {
}
}

View File

@ -1,6 +1,6 @@
package club.joylink.xiannccda.ats.message.line3;
import club.joylink.xiannccda.ats.message.MessageData;
import club.joylink.xiannccda.ats.message.MessageResponse;
import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
@ -9,7 +9,7 @@ import java.util.List;
/**
* 2.7.13 列车阻塞消息
*/
public class TrainBlockInfoResponse extends MessageData {
public class TrainBlockInfoResponse extends MessageResponse {
/**
* 线路号(2)

View File

@ -1,6 +1,6 @@
package club.joylink.xiannccda.ats.message.line3;
import club.joylink.xiannccda.ats.message.MessageData;
import club.joylink.xiannccda.ats.message.MessageResponse;
import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
@ -9,7 +9,7 @@ import java.util.List;
/**
* 2.7.9列车信息全体消息
*/
public class TrainIndicationInitResponse extends MessageData {
public class TrainIndicationInitResponse extends MessageResponse {
/**
* 线路号(2)

View File

@ -1,12 +1,12 @@
package club.joylink.xiannccda.ats.message.line3;
import club.joylink.xiannccda.ats.message.MessageData;
import club.joylink.xiannccda.ats.message.MessageResponse;
import io.netty.buffer.ByteBuf;
/**
* 2.7.11 列车信息删除消息
*/
public class TrainIndicationRemoveResponse extends MessageData {
public class TrainIndicationRemoveResponse extends MessageResponse {
/**
* 线路号(2)

View File

@ -1,12 +1,12 @@
package club.joylink.xiannccda.ats.message.line3;
import club.joylink.xiannccda.ats.message.MessageData;
import club.joylink.xiannccda.ats.message.MessageResponse;
import io.netty.buffer.ByteBuf;
/**
* 2.7.10 列车信息更新消息[增加/更新]
*/
public class TrainIndicationUpdateResponse extends MessageData {
public class TrainIndicationUpdateResponse extends MessageResponse {
/**
* 线路号(2)

View File

@ -1,12 +1,12 @@
package club.joylink.xiannccda.ats.message.line3;
import club.joylink.xiannccda.ats.message.MessageData;
import club.joylink.xiannccda.ats.message.MessageResponse;
import io.netty.buffer.ByteBuf;
/**
* 2.7.8列车报点消息
*/
public class TrainRecordResponse extends MessageData {
public class TrainRecordResponse extends MessageResponse {
/**
* 线路号(2)