实时消息2.7.2-2.7.7
This commit is contained in:
parent
51ecc2fed8
commit
fd1a1061af
@ -1,6 +1,12 @@
|
||||
package club.joylink.xiannccda.ats.message;
|
||||
|
||||
import club.joylink.xiannccda.ats.message.line3.HeartBeatMsg;
|
||||
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.NetworkAliveStatusResponse;
|
||||
import club.joylink.xiannccda.ats.message.rep.SignalRouteStatusResponse;
|
||||
import club.joylink.xiannccda.ats.message.req.LoadDeviceStatusRequest;
|
||||
|
||||
public enum MessageId {
|
||||
UNKNOWN(0x0000, null),
|
||||
@ -11,27 +17,27 @@ public enum MessageId {
|
||||
/**
|
||||
* 信息源网络状态 OCC->NCC
|
||||
*/
|
||||
NETWORK_ALIVE_STATUS(0x0002, null),
|
||||
NETWORK_ALIVE_STATUS(0x0002, () -> new NetworkAliveStatusResponse()),
|
||||
/**
|
||||
* 2.7.3 ATS信息请求消息 OCC<-NCC
|
||||
*/
|
||||
LOAD_DEVICE_STATUS(0x0003, null),
|
||||
LOAD_DEVICE_STATUS(0x0003, () -> new LoadDeviceStatusRequest()),
|
||||
/**
|
||||
* 2.7.4 设备状态全体消息
|
||||
*/
|
||||
DEVICE_STATUS_BITMAP(0x0004, null),
|
||||
DEVICE_STATUS_BITMAP(0x0004, () -> new DeviceStatusBitmapResponse()),
|
||||
/**
|
||||
* 2.7.5 设备状态变化消息
|
||||
*/
|
||||
DEVICE_STATUS_CHANGE(0x0005, null),
|
||||
DEVICE_STATUS_CHANGE(0x0005, () -> new DeviceStatusChangeResponse()),
|
||||
/**
|
||||
* 2.7.6 自动/人工信号模式消息
|
||||
*/
|
||||
SIGNAL_ROUTE_STATUS(0x0006, null),
|
||||
SIGNAL_ROUTE_STATUS(0x0006, () -> new SignalRouteStatusResponse()),
|
||||
/**
|
||||
* 2.7.7 出入库派班计划消息
|
||||
*/
|
||||
DEPOT_PLAN(0x0007, null);
|
||||
DEPOT_PLAN(0x0007, () -> new DepotPlanResponse());
|
||||
|
||||
int val;
|
||||
OccMessageCreate omc;
|
||||
|
@ -16,12 +16,16 @@ import io.netty.buffer.ByteBuf;
|
||||
当当天出入库派班计划发生变更时,OCC FEP发送此信息给NCC 。
|
||||
*/
|
||||
|
||||
public class DepotPlanRep extends MessageData {
|
||||
public class DepotPlanResponse extends MessageData {
|
||||
|
||||
public DepotPlanRep(MessageId msgId, int contentLength) {
|
||||
public DepotPlanResponse(MessageId msgId, int contentLength) {
|
||||
super(msgId, contentLength);
|
||||
}
|
||||
|
||||
public DepotPlanResponse() {
|
||||
super(MessageId.DEPOT_PLAN, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
@ -20,7 +20,7 @@ import io.netty.buffer.ByteBuf;
|
||||
当某些线路集中站本身定时向OCC服务器发送全体数据时,同时OCC FEP也会向NCC发全体数据。(这种情况下,周期发送设备状态全体消息的间隔建议不小于600秒)
|
||||
*/
|
||||
|
||||
public class DeviceStatusBitmapRep extends MessageData {
|
||||
public class DeviceStatusBitmapResponse extends MessageData {
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
@ -67,10 +67,15 @@ public class DeviceStatusBitmapRep extends MessageData {
|
||||
*/
|
||||
private Integer spare;
|
||||
|
||||
public DeviceStatusBitmapRep(MessageId msgId, int contentLength) {
|
||||
public DeviceStatusBitmapResponse(MessageId msgId, int contentLength) {
|
||||
super(msgId, contentLength);
|
||||
}
|
||||
|
||||
public DeviceStatusBitmapResponse() {
|
||||
// super(MessageId.DEVICE_STATUS_BITMAP, 8);
|
||||
super(MessageId.DEVICE_STATUS_BITMAP, 0);
|
||||
}
|
||||
|
||||
/*下一个设备,重复10~12
|
||||
下一个类型,重复8~13*/
|
||||
@Override
|
@ -3,7 +3,6 @@ package club.joylink.xiannccda.ats.message.rep;
|
||||
import club.joylink.xiannccda.ats.message.MessageData;
|
||||
import club.joylink.xiannccda.ats.message.MessageId;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.swagger.v3.oas.models.security.SecurityScheme.In;
|
||||
|
||||
/**
|
||||
* 2.7.5 设备状态变化消息
|
||||
@ -16,12 +15,16 @@ import io.swagger.v3.oas.models.security.SecurityScheme.In;
|
||||
当某个设备状态变化时,OCC发送该消息给NCC。集中站状态变化也作为设备状态变化发。
|
||||
*/
|
||||
|
||||
public class DeviceStatusChangeRep extends MessageData {
|
||||
public class DeviceStatusChangeResponse extends MessageData {
|
||||
|
||||
public DeviceStatusChangeRep(MessageId msgId, int contentLength) {
|
||||
public DeviceStatusChangeResponse(MessageId msgId, int contentLength) {
|
||||
super(msgId, contentLength);
|
||||
}
|
||||
|
||||
public DeviceStatusChangeResponse() {
|
||||
super(MessageId.DEVICE_STATUS_CHANGE, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
@ -9,7 +9,7 @@ import io.netty.buffer.ByteBuf;
|
||||
*/
|
||||
//本消息用于OCC FEP向NCC FEP报告其当前与OCC服务器的网络状态变化情况。
|
||||
// 当网络状态变化时发送此消息。当NCC FEP与OCC FEP初始建立通信时,OCC FEP也发送此消息
|
||||
public class NetworkAliveStatusRep extends MessageData {
|
||||
public class NetworkAliveStatusResponse extends MessageData {
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
@ -21,10 +21,14 @@ public class NetworkAliveStatusRep extends MessageData {
|
||||
*/
|
||||
private Byte status;
|
||||
|
||||
public NetworkAliveStatusRep(MessageId msgId, int contentLength) {
|
||||
public NetworkAliveStatusResponse(MessageId msgId, int contentLength) {
|
||||
super(msgId, contentLength);
|
||||
}
|
||||
|
||||
public NetworkAliveStatusResponse() {
|
||||
// super(MessageId.NETWORK_ALIVE_STATUS, 3);
|
||||
super(MessageId.NETWORK_ALIVE_STATUS, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decode2(ByteBuf buf) throws Exception {
|
@ -17,12 +17,16 @@ import io.netty.buffer.ByteBuf;
|
||||
当集中站的信号机人工/自动模式发生变化时,发送集中站的所有信号模式给NCC。
|
||||
*/
|
||||
|
||||
public class SignalRouteStatusRep extends MessageData {
|
||||
public class SignalRouteStatusResponse extends MessageData {
|
||||
|
||||
public SignalRouteStatusRep(MessageId msgId, int contentLength) {
|
||||
public SignalRouteStatusResponse(MessageId msgId, int contentLength) {
|
||||
super(msgId, contentLength);
|
||||
}
|
||||
|
||||
public SignalRouteStatusResponse() {
|
||||
super(MessageId.SIGNAL_ROUTE_STATUS, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
@ -20,22 +20,26 @@ import io.netty.buffer.ByteBuf;
|
||||
// (2)非实时通道回复如下消息
|
||||
// INUSED_SCHEDULE(当天计划运行图消息);
|
||||
// HISTORY_SCHEDULE(当天实际运行图消息)。
|
||||
public class LoadDeviceStatusReq extends MessageData {
|
||||
public class LoadDeviceStatusRequest extends MessageData {
|
||||
|
||||
/**
|
||||
* 线路号(2)
|
||||
*/
|
||||
private Short lineId;
|
||||
|
||||
public LoadDeviceStatusReq(MessageId msgId, int contentLength) {
|
||||
public LoadDeviceStatusRequest(MessageId msgId, int contentLength) {
|
||||
super(msgId, contentLength);
|
||||
}
|
||||
|
||||
public LoadDeviceStatusReq(Short lineId) {
|
||||
public LoadDeviceStatusRequest(Short lineId) {
|
||||
super(MessageId.LOAD_DEVICE_STATUS, 2);
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public LoadDeviceStatusRequest() {
|
||||
super(MessageId.LOAD_DEVICE_STATUS, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decode2(ByteBuf buf) throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user