非实时消息
This commit is contained in:
parent
f87c8f860e
commit
3f44f18645
@ -2,6 +2,7 @@ package club.joylink.xiannccda.ats.message;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
@ -109,14 +110,15 @@ public abstract class MessageData {
|
||||
this.second = (byte) localDateTime.getSecond();
|
||||
}
|
||||
|
||||
public void aa() {
|
||||
ByteBuf buf = Unpooled.buffer(7);
|
||||
buf.writeShort(this.year);
|
||||
buf.writeByte(this.month);
|
||||
buf.writeByte(this.day);
|
||||
buf.writeByte(this.hour);
|
||||
buf.writeByte(this.minute);
|
||||
buf.writeByte(this.second);
|
||||
public byte[] requestData() {
|
||||
ByteBuffer buf = ByteBuffer.allocate(7);
|
||||
buf.putShort(this.year);
|
||||
buf.put(this.month);
|
||||
buf.put(this.day);
|
||||
buf.put(this.hour);
|
||||
buf.put(this.minute);
|
||||
buf.put(this.second);
|
||||
return buf.array();
|
||||
}
|
||||
|
||||
public static DateTime parseNow() {
|
||||
|
@ -8,12 +8,18 @@ import club.joylink.xiannccda.ats.message.line3.TrainIndicationInitResponse;
|
||||
import club.joylink.xiannccda.ats.message.line3.TrainIndicationRemoveResponse;
|
||||
import club.joylink.xiannccda.ats.message.line3.TrainIndicationUpdateResponse;
|
||||
import club.joylink.xiannccda.ats.message.line3.TrainRecordResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.ActionReportResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.AlarmReportResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.DepotPlanResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.DeviceStatusBitmapResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.DeviceStatusChangeResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.HistoryScheduleResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.InusedScheduleResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.NetworkAliveStatusResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.SignalRouteStatusResponse;
|
||||
import club.joylink.xiannccda.ats.message.req.AlarmAckRequest;
|
||||
import club.joylink.xiannccda.ats.message.req.LoadDeviceStatusRequest;
|
||||
import club.joylink.xiannccda.ats.message.req.LoadHistoryTGDataRequest;
|
||||
|
||||
public enum MessageId {
|
||||
UNKNOWN(0x0000, null),
|
||||
@ -89,27 +95,27 @@ public enum MessageId {
|
||||
/**
|
||||
* 事件及告警信息请求
|
||||
*/
|
||||
ALARM_ASK(0x0018, null),
|
||||
ALARM_ASK(0x0018, () -> new AlarmAckRequest()),
|
||||
/**
|
||||
* 操作命令
|
||||
*/
|
||||
ACTION_REPORT(0x0019, null),
|
||||
ACTION_REPORT(0x0019, () -> new ActionReportResponse()),
|
||||
/**
|
||||
* 列车信息、系统事件
|
||||
*/
|
||||
ALARM_REPORT(0x0020, null),
|
||||
ALARM_REPORT(0x0020, () -> new AlarmReportResponse()),
|
||||
/**
|
||||
* 历史运行图申请
|
||||
*/
|
||||
LOAD_HISTORY_TG_DATA(0x0021, null),
|
||||
LOAD_HISTORY_TG_DATA(0x0021, () -> new LoadHistoryTGDataRequest()),
|
||||
/**
|
||||
* 计划列车运行图消息
|
||||
*/
|
||||
INUSED_SCHEDULE(0x0022, null),
|
||||
INUSED_SCHEDULE(0x0022, () -> new InusedScheduleResponse()),
|
||||
/**
|
||||
* 实际列车运行图消息
|
||||
*/
|
||||
HISTORY_SCHEDULE(0x0023, null),
|
||||
HISTORY_SCHEDULE(0x0023, () -> new HistoryScheduleResponse()),
|
||||
/**
|
||||
* 断电续传申请
|
||||
*/
|
||||
|
@ -0,0 +1,95 @@
|
||||
package club.joylink.xiannccda.ats.message.rep;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
/**
|
||||
* 2.8.10 操作命令消息
|
||||
*/
|
||||
/*
|
||||
发送条件:
|
||||
NCC FEP主动发起事件及告警信息查询,OCC FEP收到此消息后发送操作命令信息给NCC 。
|
||||
*/
|
||||
|
||||
public class ActionReportResponse extends MessageResponse {
|
||||
|
||||
/**
|
||||
* 线路号
|
||||
*/
|
||||
private Short lineId;
|
||||
/**
|
||||
* 查询标识号(2)
|
||||
*/
|
||||
private Short reportId;
|
||||
/**
|
||||
* 消息总数(2)
|
||||
*/
|
||||
private Short totalMessage;
|
||||
/**
|
||||
* 本消息的顺序号(2)
|
||||
*/
|
||||
private Short messageSequence;
|
||||
/**
|
||||
* 操作记录数量
|
||||
*/
|
||||
private Short count;
|
||||
/**
|
||||
* 单位类型(1) 0x01:车站 0x02:中心 0x00:未知
|
||||
*/
|
||||
private Byte actionSite;
|
||||
/**
|
||||
* 单位编码(2) 单位类型为中心时,单位编码为调度台ID,中心服务器为0 单位类型为车站时,单位编码为站码 当单位类型为未知时,此项无效
|
||||
*/
|
||||
private Short actionSiteid;
|
||||
/**
|
||||
* 被查询单位名称(20)
|
||||
*/
|
||||
private byte[] actionName = new byte[20];
|
||||
/**
|
||||
* 命令发送时的系统时间(7),以数字表示年、月、日、时、分、秒
|
||||
*/
|
||||
private DateTime actionTime;
|
||||
/**
|
||||
* 事件/告警对应的操作员名称(20)
|
||||
*/
|
||||
private byte[] actionUser = new byte[20];
|
||||
/**
|
||||
* 操作类型,详见附录“操作类型定义”(2)
|
||||
* <p>
|
||||
* 注:西安3号线的操作命令无操作类型(Action_type)区分,将按照统一的操作类型(Action_type)发送。
|
||||
*/
|
||||
private Short actionType;
|
||||
/**
|
||||
* 操作子类型,预留(2)
|
||||
*/
|
||||
private Short actionSubType;
|
||||
/**
|
||||
* 命令描述长度(2)
|
||||
*/
|
||||
private Short atctionLen;
|
||||
/**
|
||||
* 命令描述(N)
|
||||
*/
|
||||
private byte[] actionContent;
|
||||
|
||||
@Override
|
||||
public void decode2(ByteBuf buf) throws Exception {
|
||||
this.lineId = buf.readShort();
|
||||
this.reportId = buf.readShort();
|
||||
this.totalMessage = buf.readShort();
|
||||
this.messageSequence = buf.readShort();
|
||||
this.count = buf.readShort();
|
||||
this.actionSite = buf.readByte();
|
||||
this.actionSiteid = buf.readShort();
|
||||
|
||||
buf.readBytes(this.actionName);
|
||||
this.actionTime = new DateTime(buf);
|
||||
buf.readBytes(this.actionUser);
|
||||
this.actionType = buf.readShort();
|
||||
this.actionSubType = buf.readShort();
|
||||
this.atctionLen = buf.readShort();
|
||||
this.actionContent = new byte[this.atctionLen];
|
||||
buf.readBytes(this.actionContent);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
package club.joylink.xiannccda.ats.message.rep;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.MessageId;
|
||||
import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
/**
|
||||
* 2.8.11 列车信息、系统事件消息
|
||||
*/
|
||||
/*
|
||||
发送条件:
|
||||
NCC FEP主动发起事件及告警信息查询,OCC FEP收到此消息后发送列车信息、系统事件给NCC。
|
||||
*/
|
||||
|
||||
public class AlarmReportResponse extends MessageResponse {
|
||||
|
||||
public AlarmReportResponse() {
|
||||
this.setMsgId(MessageId.ALARM_REPORT);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
||||
private Short lineId;
|
||||
/**
|
||||
* 查询标识号(2)
|
||||
*/
|
||||
private Short reportId;
|
||||
/**
|
||||
* 消息总数(2)
|
||||
*/
|
||||
private Short totalMessage;
|
||||
/**
|
||||
* 本消息的顺序号(2)
|
||||
*/
|
||||
private Short messageSequence;
|
||||
/**
|
||||
* 报警记录数量(2)
|
||||
*/
|
||||
private Short count;
|
||||
/**
|
||||
* 单位类型(1) 0x01:车站 0x02:中心 0x00:未知
|
||||
*/
|
||||
private Byte alamrSite;
|
||||
/**
|
||||
* 单位编码(2) 单位类型为中心时,单位编码为调度台ID,中心服务器为0 单位类型为车站时,单位编码为站码 当单位类型为未知时,此项无效
|
||||
*/
|
||||
private Short alarmSiteid;
|
||||
/**
|
||||
* 报警单位名称(20)
|
||||
*/
|
||||
private byte[] alarmNname = new byte[20];
|
||||
/**
|
||||
* 报警发送时的系统时间,以数字表示年、月、日、时、分、秒(7)
|
||||
*/
|
||||
private DateTime alarmTime;
|
||||
/**
|
||||
* 报警类型,详见附录“报警类型定义”(2)
|
||||
* <p>
|
||||
* 注:西安3号线告警无报警类型(alarm _type)区分,将按照统一的报警类型发送本消息。
|
||||
*/
|
||||
private Short alarmType;
|
||||
/**
|
||||
* 报警子类型,预留(2)
|
||||
*/
|
||||
private Short alarmSubType;
|
||||
/**
|
||||
* 报警描述长度(2)
|
||||
*/
|
||||
private Short alarmLen;
|
||||
/**
|
||||
* 报警描述(N)
|
||||
*/
|
||||
private byte[] alarmContent;
|
||||
/**
|
||||
* 确认单位编码(2)
|
||||
*/
|
||||
private Short alarmAckSiteid;
|
||||
/**
|
||||
* 确认单位名称(32)
|
||||
*/
|
||||
private byte[] alarmAckSite = new byte[32];
|
||||
/**
|
||||
* 32 确认人员用户名称(32)
|
||||
*/
|
||||
private byte[] alarmAckName = new byte[32];
|
||||
/**
|
||||
* 确认时间
|
||||
*/
|
||||
private DateTime alarmAckTime;
|
||||
|
||||
@Override
|
||||
public void decode2(ByteBuf buf) throws Exception {
|
||||
this.lineId = buf.readShort();
|
||||
this.reportId = buf.readShort();
|
||||
this.totalMessage = buf.readShort();
|
||||
this.messageSequence = buf.readShort();
|
||||
this.count = buf.readShort();
|
||||
this.alamrSite = buf.readByte();
|
||||
this.alarmSiteid = buf.readShort();
|
||||
buf.readBytes(this.alarmNname);
|
||||
this.alarmTime = new DateTime(buf);
|
||||
this.alarmType = buf.readShort();
|
||||
this.alarmSubType = buf.readShort();
|
||||
this.alarmLen = buf.readShort();
|
||||
this.alarmContent = new byte[this.alarmLen];
|
||||
buf.readBytes(this.alarmContent);
|
||||
this.alarmAckSiteid = buf.readShort();
|
||||
buf.readBytes(this.alarmAckSite);
|
||||
buf.readBytes(alarmAckName);
|
||||
this.alarmAckTime = new DateTime(buf);
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package club.joylink.xiannccda.ats.message.rep;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.MessageId;
|
||||
import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
/**
|
||||
* 2.8.15 实际列车运行图消息
|
||||
*/
|
||||
/*
|
||||
发送条件:
|
||||
当OCC收到NCC的历史运行图申请消息时,OCC根据消息类型发送历史实际运行信息给NCC;
|
||||
当OCC收到NCC ATS信息请求消息时,发送当天实际列车运行信息给NCC。
|
||||
*/
|
||||
|
||||
|
||||
public class HistoryScheduleResponse extends MessageResponse {
|
||||
|
||||
public HistoryScheduleResponse() {
|
||||
this.setMsgId(MessageId.HISTORY_SCHEDULE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
||||
private Short lineId;
|
||||
/**
|
||||
* HISTORY_SCHEDULE日期(7)
|
||||
*/
|
||||
private DateTime date;
|
||||
/**
|
||||
* 0x0001: 计划列车运行信息消息开始标记
|
||||
* <p>
|
||||
* 0x0002: 计划列车运行信息消息数据标记
|
||||
* <p>
|
||||
* 0x0003:计划列车运行信息消息结束标记
|
||||
*/
|
||||
private Short subId;
|
||||
/**
|
||||
* 车组号(9)
|
||||
*/
|
||||
private byte[] groupId = new byte[9];
|
||||
/**
|
||||
* 记录数(2)
|
||||
*/
|
||||
private Short recCnt;
|
||||
/**
|
||||
* 站号(2)
|
||||
*/
|
||||
private Short stationId;
|
||||
/**
|
||||
* 站台号(2)
|
||||
*/
|
||||
private Short platformId;
|
||||
/**
|
||||
* 到站时间(7)
|
||||
*/
|
||||
private DateTime aTime;
|
||||
/**
|
||||
* 离站时间(7)
|
||||
*/
|
||||
private DateTime dTime;
|
||||
/**
|
||||
* 1表示下行,2表示上行,0表示未知
|
||||
*/
|
||||
private Short flag;
|
||||
/**
|
||||
* 表号(9)
|
||||
*/
|
||||
private byte[] serviceId;
|
||||
/**
|
||||
* 车次号12
|
||||
*/
|
||||
private byte[] globalId = new byte[12];
|
||||
/**
|
||||
* 目的地号(4)
|
||||
*/
|
||||
private byte[] destinationId;
|
||||
/**
|
||||
* 类型 1表示计划车,0表示非计划车。
|
||||
*/
|
||||
private Short type;
|
||||
/**
|
||||
* 局部序列号(4)
|
||||
*/
|
||||
private Integer localSubId;
|
||||
// 下一条记录,重复10~19
|
||||
|
||||
@Override
|
||||
public void decode2(ByteBuf buf) throws Exception {
|
||||
this.lineId = buf.readShort();
|
||||
this.date = new DateTime(buf);
|
||||
this.subId = buf.readShort();
|
||||
if (this.subId == ScheduleSubIdType.RUNING.val) {
|
||||
buf.readBytes(this.groupId);
|
||||
this.recCnt = buf.readShort();
|
||||
|
||||
this.stationId = buf.readShort();
|
||||
|
||||
this.platformId = buf.readShort();
|
||||
|
||||
this.aTime = new DateTime(buf);
|
||||
|
||||
this.dTime = new DateTime(buf);
|
||||
|
||||
this.flag = buf.readShort();
|
||||
|
||||
buf.readBytes(this.serviceId);
|
||||
|
||||
buf.readBytes(this.globalId);
|
||||
|
||||
buf.readBytes(this.destinationId);
|
||||
|
||||
this.type = buf.readShort();
|
||||
|
||||
this.localSubId = buf.readInt();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package club.joylink.xiannccda.ats.message.rep;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.MessageId;
|
||||
import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
/**
|
||||
* 2.8.14 计划列车运行图消息
|
||||
*/
|
||||
/*
|
||||
发送条件:
|
||||
当OCC端创建当天计划或当天计划进行了更新,OCC主动发送当天计划列车运行信息给NCC;
|
||||
当OCC收到NCC的历史运行图申请消息时,OCC根据消息类型发送历史计划运行信息给NCC;
|
||||
当OCC收到NCC ATS信息请求消息时,发送当天计划列车运行信息给NCC。
|
||||
*/
|
||||
|
||||
public class InusedScheduleResponse extends MessageResponse {
|
||||
|
||||
public InusedScheduleResponse() {
|
||||
this.setMsgId(MessageId.INUSED_SCHEDULE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
||||
private Short lineId;
|
||||
/**
|
||||
* INUSED_SCHEDULE日期(7)
|
||||
*/
|
||||
private DateTime date;
|
||||
/**
|
||||
* 0x0001: 计划列车运行信息消息开始标记
|
||||
* <p>
|
||||
* 0x0002: 计划列车运行信息消息数据标记
|
||||
* <p>
|
||||
* 0x0003:计划列车运行信息消息结束标记
|
||||
*/
|
||||
private Short subId;
|
||||
/**
|
||||
* 表号(9)
|
||||
*/
|
||||
private byte[] trainId = new byte[9];
|
||||
/**
|
||||
* 单程数(2)
|
||||
*/
|
||||
private Short tripCnt;
|
||||
/**
|
||||
* 车次号(12)
|
||||
*/
|
||||
private byte[] globalId = new byte[12];
|
||||
/**
|
||||
* 车组号(本字段预留)(9)
|
||||
*/
|
||||
private byte[] groupId;
|
||||
/**
|
||||
* 目的地号(4);
|
||||
*/
|
||||
private byte[] destinationId;
|
||||
/**
|
||||
* 记录数(本车次经过的站台数)(2)
|
||||
*/
|
||||
private Short recCnt;
|
||||
/**
|
||||
* 站号(2)
|
||||
*/
|
||||
private Short stationId;
|
||||
/**
|
||||
* 站台号(2)
|
||||
*/
|
||||
private Short platformId;
|
||||
/**
|
||||
* 到站时间(7)
|
||||
*/
|
||||
private DateTime aTime;
|
||||
/**
|
||||
* 离站时间
|
||||
*/
|
||||
private DateTime dTime;
|
||||
/**
|
||||
* 第4位为1,表示出库,第5位为1表示入库,第6位为1表示下行,为0表示上行。(首位为第0位)(2)
|
||||
*/
|
||||
private Short flag;
|
||||
|
||||
private byte[] flagBit;
|
||||
/**
|
||||
* 局部序列号(4)
|
||||
*/
|
||||
private Integer LocalSubId;
|
||||
// 下一条记录,重复14~19
|
||||
// 下一个单程,重复10~20重复
|
||||
|
||||
|
||||
@Override
|
||||
public void decode2(ByteBuf buf) throws Exception {
|
||||
this.lineId = buf.readShort();
|
||||
this.date = new DateTime(buf);
|
||||
this.subId = buf.readShort();
|
||||
if (this.subId == ScheduleSubIdType.RUNING.val) {
|
||||
buf.readBytes(this.trainId);
|
||||
this.tripCnt = buf.readShort();
|
||||
buf.readBytes(this.globalId);
|
||||
buf.readBytes(this.groupId);
|
||||
buf.readBytes(this.destinationId);
|
||||
this.recCnt = buf.readShort();
|
||||
this.stationId = buf.readShort();
|
||||
this.platformId = buf.readShort();
|
||||
this.aTime = new DateTime(buf);
|
||||
this.dTime = new DateTime(buf);
|
||||
this.flag = buf.readShort();
|
||||
|
||||
this.LocalSubId = buf.readInt();
|
||||
|
||||
String binaryResultStr = String.format("%8s", Integer.toBinaryString(this.flag))
|
||||
.replace(" ", "0");
|
||||
this.flagBit = binaryResultStr.getBytes();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package club.joylink.xiannccda.ats.message.rep;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.MessageId;
|
||||
import club.joylink.xiannccda.ats.message.MessageResponse;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
/**
|
||||
* 2.8.12 查询无结果消息
|
||||
*/
|
||||
/*
|
||||
2.8.12.1 应用场景
|
||||
NCC FEP主动发起查询请求,因某种原因(如:查询无结果,数据量太大、与信息源中断等)导致OCC FEP无法正常返回查询结果时,可使用此消息进行答复。
|
||||
对统计信息查询消息(REPORT_ASK)、事件及告警信息请求消息(ALARM_ACK),在特殊情况下OCC FEP均可使用此消息进行答复。
|
||||
*/
|
||||
|
||||
public class ReportNackResponse extends MessageResponse {
|
||||
|
||||
public ReportNackResponse() {
|
||||
this.setMsgId(MessageId.REPORT_NACK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
||||
private Short lineId;
|
||||
/**
|
||||
* 查询标识号(2)
|
||||
*/
|
||||
private Short reportId;
|
||||
/**
|
||||
* 异常码(4)
|
||||
* <p>
|
||||
* 0: 查询无结果
|
||||
* <p>
|
||||
* 1:查询结果超过10000条
|
||||
* <p>
|
||||
* 2:与信息源中断,详细原因可参考“content”字段内容描述
|
||||
* <p>
|
||||
* 3:查询异常,原因为“content”字段内容描述
|
||||
*/
|
||||
private Integer result;
|
||||
/**
|
||||
* 异常描述(50)
|
||||
*/
|
||||
private byte[] content = new byte[50];
|
||||
|
||||
@Override
|
||||
public void decode2(ByteBuf buf) throws Exception {
|
||||
this.lineId = buf.readShort();
|
||||
this.reportId = buf.readShort();
|
||||
this.result = buf.readInt();
|
||||
buf.readBytes(this.content);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package club.joylink.xiannccda.ats.message.rep;
|
||||
|
||||
public enum ScheduleSubIdType {
|
||||
BEGIN(0X0001),
|
||||
RUNING(0X0002),
|
||||
STOP(0X0003);
|
||||
|
||||
int val;
|
||||
|
||||
ScheduleSubIdType(int d) {
|
||||
this.val = d;
|
||||
}
|
||||
}
|
@ -32,6 +32,10 @@ public class AlarmAckRequest extends MessageRequest {
|
||||
private Short reportId;
|
||||
/**
|
||||
* 消息格式(2)
|
||||
* <p>
|
||||
* 01H:操作命令
|
||||
* <p>
|
||||
* 02H:列车信息、系统事件
|
||||
*/
|
||||
private Short msgType;
|
||||
/**
|
||||
@ -45,6 +49,10 @@ public class AlarmAckRequest extends MessageRequest {
|
||||
|
||||
@Override
|
||||
public void encode2(ByteBuf buf) {
|
||||
|
||||
buf.writeShort(this.lineId);
|
||||
buf.writeShort(this.reportId);
|
||||
buf.writeShort(this.msgType);
|
||||
buf.writeBytes(startTime.requestData());
|
||||
buf.writeBytes(endTime.requestData());
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,47 @@
|
||||
package club.joylink.xiannccda.ats.message.req;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.MessageId;
|
||||
import club.joylink.xiannccda.ats.message.MessageRequest;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
/**
|
||||
* 2.8.13 历史运行图申请消息
|
||||
*/
|
||||
/*
|
||||
2.8.13.1 应用场景
|
||||
定义:
|
||||
用于申请指定日期的历史计划和历史实际运行数据。
|
||||
发送条件:
|
||||
当NCC与OCC通信长时间中断引起某些日期的历史数据(非当天)缺损时,NCC FEP人工发起此消息给OCC FEP,由OCC FEP根据消息类型和申请时间发送历史计划和历史运行数据给NCC。
|
||||
|
||||
*/
|
||||
|
||||
public class LoadHistoryTGDataRequest extends MessageRequest {
|
||||
|
||||
public LoadHistoryTGDataRequest() {
|
||||
super(MessageId.LOAD_HISTORY_TG_DATA, 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
||||
private Short lineId;
|
||||
|
||||
/**
|
||||
* 日期(7)
|
||||
*/
|
||||
private DateTime date;
|
||||
/**
|
||||
* 申请类型(1) 0x01:计划图
|
||||
* <p>
|
||||
* 0x02:实际图
|
||||
*/
|
||||
private Byte tgType;
|
||||
|
||||
@Override
|
||||
public void encode2(ByteBuf buf) {
|
||||
buf.writeShort(this.lineId);
|
||||
buf.writeBytes(this.date.requestData());
|
||||
buf.writeByte(this.tgType);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user