2023-06-26 14:47:27 +08:00
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
|
|
package train; //模型的可变的状态数据
|
|
|
|
|
import "device_status.proto";
|
|
|
|
|
option java_package = "club.joylink.xiannccda.dto.protos";
|
|
|
|
|
option java_outer_classname = "TrainProto";
|
|
|
|
|
|
|
|
|
|
// 2.7.8 列车状态信息
|
|
|
|
|
message TrainInfo {
|
|
|
|
|
//线路id
|
|
|
|
|
int32 lineId = 1;
|
|
|
|
|
// 集中站站号
|
|
|
|
|
int32 rtuId = 2;
|
|
|
|
|
NccWindow window = 3;
|
|
|
|
|
// 所在设备类型
|
|
|
|
|
state.DeviceType devType = 4;
|
|
|
|
|
// 所在设备名称
|
|
|
|
|
string devName = 5;
|
|
|
|
|
// 列车标示号,全线唯一
|
|
|
|
|
string trainIndex = 6;
|
|
|
|
|
// 列车车组号
|
|
|
|
|
string groupId = 7;
|
|
|
|
|
// 列车表号
|
|
|
|
|
string trainId = 8;
|
|
|
|
|
// 列车车次号
|
|
|
|
|
string globalId = 9;
|
|
|
|
|
// 目的地ID
|
2023-07-17 17:30:32 +08:00
|
|
|
|
string destinationId = 10;
|
2023-06-26 14:47:27 +08:00
|
|
|
|
// 编组数量
|
|
|
|
|
int32 rollingStock = 11;
|
|
|
|
|
// 司机号
|
|
|
|
|
string driverId = 12;
|
|
|
|
|
// 计划偏离时间
|
|
|
|
|
int32 otpTime = 13;
|
|
|
|
|
// 列车状态
|
2023-06-26 15:32:25 +08:00
|
|
|
|
// int32 mode = 14;
|
|
|
|
|
state.TrainMode mode = 14;
|
2023-06-30 13:53:12 +08:00
|
|
|
|
// 到点 时间戳 精确到秒 10位长度
|
2023-06-26 14:47:27 +08:00
|
|
|
|
int64 arriveTime = 15;
|
2023-06-30 13:53:12 +08:00
|
|
|
|
// 发点 时间戳 精确到秒 10位长度
|
2023-06-26 14:47:27 +08:00
|
|
|
|
int64 departTime = 16;
|
|
|
|
|
// 速度
|
|
|
|
|
float speed = 17;
|
2023-06-28 09:52:11 +08:00
|
|
|
|
|
2023-06-26 14:47:27 +08:00
|
|
|
|
//车次号变化状态 true=添加;false = 更新
|
2023-06-28 09:52:11 +08:00
|
|
|
|
bool type = 18;
|
2023-06-26 14:47:27 +08:00
|
|
|
|
//运行路径号(若无法提供,缺省值为0)
|
2023-06-28 09:52:11 +08:00
|
|
|
|
int32 routeId = 19;
|
2023-06-26 14:47:27 +08:00
|
|
|
|
//满载率
|
2023-06-28 09:52:11 +08:00
|
|
|
|
int32 rate = 20;
|
|
|
|
|
TrainRemove remove = 21;
|
|
|
|
|
TrainBlock block = 22;
|
|
|
|
|
TrainRecord record = 23;
|
2023-08-04 11:01:35 +08:00
|
|
|
|
//消息时间戳
|
|
|
|
|
int64 timestamp = 24;
|
2023-06-26 14:47:27 +08:00
|
|
|
|
}
|
|
|
|
|
message NccWindow{
|
|
|
|
|
int32 nccWindow = 1;
|
|
|
|
|
int32 nccWinOffset = 2;
|
|
|
|
|
}
|
|
|
|
|
//列车删除消息
|
|
|
|
|
message TrainRemove{
|
|
|
|
|
// 线路号
|
|
|
|
|
int32 lineId = 1;
|
|
|
|
|
// 集中站站号
|
|
|
|
|
int32 rtuId = 2;
|
|
|
|
|
// NCC车次窗编号
|
|
|
|
|
// 列车在车次窗中的位置
|
|
|
|
|
NccWindow window = 3;
|
|
|
|
|
// 列车所在的设备的类型
|
|
|
|
|
state.DeviceType deviceType = 4;
|
|
|
|
|
// 列车所在的设备的名称
|
|
|
|
|
string devName = 5;
|
|
|
|
|
// 列车标示号,全线唯一(若无法提供,缺省值为0)
|
2023-06-26 15:32:25 +08:00
|
|
|
|
string trainIndex = 6;
|
2023-06-26 14:47:27 +08:00
|
|
|
|
// 列车编组号
|
|
|
|
|
string groupId = 7;
|
2023-08-04 11:01:35 +08:00
|
|
|
|
//消息时间戳
|
|
|
|
|
int64 timestamp = 8;
|
2023-06-26 14:47:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//2.7.13 列车阻塞消息
|
|
|
|
|
message TrainBlock{
|
|
|
|
|
// 线路号
|
|
|
|
|
int32 lineId = 1;
|
|
|
|
|
// 列车编组号
|
|
|
|
|
string groupId = 2;
|
|
|
|
|
// 表号
|
|
|
|
|
string trainId = 3;
|
|
|
|
|
// 方向
|
|
|
|
|
// 0:上行
|
|
|
|
|
// 1:下行
|
|
|
|
|
// 2:未知
|
|
|
|
|
int32 direction = 4;
|
|
|
|
|
// 列车所在区间左边车站的站号
|
|
|
|
|
int32 stationIDInUpSide = 5;
|
|
|
|
|
// 列车所在区间右边车站的站号
|
|
|
|
|
int32 stationIDInDownSide = 6;
|
|
|
|
|
// 集中站站号
|
|
|
|
|
int32 rtuId = 7;
|
|
|
|
|
// 列车所在的设备的类型
|
|
|
|
|
state.DeviceType deviceType = 8;
|
|
|
|
|
// 列车所在的设备的名称
|
|
|
|
|
string DevName = 9;
|
|
|
|
|
// 列车阻塞标记
|
|
|
|
|
// 1:列车阻塞
|
|
|
|
|
// 0:列车没有阻塞
|
|
|
|
|
int32 blockFlag = 10;
|
2023-08-04 11:01:35 +08:00
|
|
|
|
//消息时间戳
|
|
|
|
|
int64 timestamp = 11;
|
2023-06-26 14:47:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//列车报点消息
|
|
|
|
|
message TrainRecord{
|
|
|
|
|
/** 线路号(2) */
|
|
|
|
|
int32 lineId = 1;
|
|
|
|
|
/** 表号(9) */
|
|
|
|
|
string trainId = 2;
|
|
|
|
|
/** 车次号(12) */
|
|
|
|
|
string globalId = 3;
|
|
|
|
|
/** 局部序列号(4) */
|
|
|
|
|
int32 localSubId = 4;
|
|
|
|
|
/** 车组号(9) */
|
|
|
|
|
string groupId = 5;
|
|
|
|
|
/** 目的地(4) */
|
|
|
|
|
int32 destinationId = 6;
|
|
|
|
|
/**
|
|
|
|
|
* 列车类型(2) 1:计划车<br>
|
|
|
|
|
* 2:头码车<br>
|
|
|
|
|
* 3:M0车<br>
|
|
|
|
|
* 4:MM车<br>
|
|
|
|
|
*/
|
|
|
|
|
int32 trainType = 7;
|
|
|
|
|
/**
|
|
|
|
|
* 运行方向(1) 1:下行 <br>
|
|
|
|
|
* 2:上行<br>
|
|
|
|
|
* 0:无方向<br>
|
|
|
|
|
*/
|
|
|
|
|
int32 dir = 8;
|
|
|
|
|
/** 站号(2) */
|
|
|
|
|
int32 stationId = 9;
|
|
|
|
|
/** 站台编号(2) */
|
|
|
|
|
int32 sideId = 10;
|
|
|
|
|
/** 轨道名称(小区段名称)(20) */
|
|
|
|
|
string trackName = 11;
|
|
|
|
|
/**
|
|
|
|
|
* 到发点类型(2)<br>
|
|
|
|
|
* 0x01H:到达<br>
|
|
|
|
|
* 0x02H:出发<br>
|
|
|
|
|
* true-到达,false-出发
|
|
|
|
|
*/
|
|
|
|
|
bool recordType = 12;
|
2023-06-30 13:53:12 +08:00
|
|
|
|
/** 到发时间(7) 时间戳 精确到秒 10位长度 */
|
2023-06-26 14:47:27 +08:00
|
|
|
|
int64 recordTime = 13;
|
2023-08-04 11:01:35 +08:00
|
|
|
|
//消息时间戳
|
|
|
|
|
int64 timestamp = 14;
|
2023-06-26 14:47:27 +08:00
|
|
|
|
}
|
|
|
|
|
|