2023-07-07 10:37:29 +08:00
|
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
|
|
package state;
|
|
|
|
|
option java_package = "club.joylink.bjrtss.ats.verify.protos";
|
|
|
|
|
option java_outer_classname = "DeviceStateProto";
|
|
|
|
|
|
|
|
|
|
//状态定义面向物理层即只定义物理状态,不定义逻辑层状态
|
|
|
|
|
|
|
|
|
|
//区段类型
|
|
|
|
|
enum SectionType{
|
|
|
|
|
Any=0;
|
|
|
|
|
//计轴区段
|
|
|
|
|
Axle=1;
|
|
|
|
|
//逻辑区段
|
|
|
|
|
Logic=2;
|
|
|
|
|
//物理区段
|
|
|
|
|
Physic=3;
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 17:20:29 +08:00
|
|
|
|
//相邻端点定义的link的状态
|
|
|
|
|
message LinkState{
|
|
|
|
|
//link索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
//link上的列车id列表
|
|
|
|
|
repeated string trainId = 2;
|
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 10:37:29 +08:00
|
|
|
|
//区段状态
|
|
|
|
|
message SectionState{
|
|
|
|
|
//区段索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
//区段类型
|
|
|
|
|
SectionType type = 2;
|
|
|
|
|
//区段占用
|
|
|
|
|
//true-占用;false-出清
|
|
|
|
|
bool occupied = 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//道岔状态
|
|
|
|
|
message SwitchState{
|
|
|
|
|
//道岔索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
//道岔处于定位
|
|
|
|
|
bool normal = 2;
|
|
|
|
|
//道岔处于反位
|
|
|
|
|
bool reverse = 3;
|
|
|
|
|
}
|
2023-07-18 10:57:07 +08:00
|
|
|
|
//信号机状态
|
|
|
|
|
message SignalState{
|
|
|
|
|
//信号机索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
}
|
2023-07-20 17:19:58 +08:00
|
|
|
|
//站台状态
|
|
|
|
|
message PlatformState{
|
|
|
|
|
//站台索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
}
|
|
|
|
|
//车站状态
|
|
|
|
|
message StationState{
|
|
|
|
|
//车站索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
}
|
2023-07-07 10:37:29 +08:00
|
|
|
|
//列车状态
|
|
|
|
|
message TrainState{
|
|
|
|
|
//列车索引
|
2023-07-20 16:05:40 +08:00
|
|
|
|
string id = 1;
|
2023-07-18 09:40:15 +08:00
|
|
|
|
//列车运行方向
|
|
|
|
|
//true - 上行方向运行
|
|
|
|
|
//false - 下行方向运行
|
2023-07-20 16:05:40 +08:00
|
|
|
|
bool up = 2;
|
2023-07-07 10:37:29 +08:00
|
|
|
|
//车头所在link的索引
|
2023-07-20 16:05:40 +08:00
|
|
|
|
string headLinkId = 3;
|
2023-07-14 13:09:45 +08:00
|
|
|
|
//车头所在link内的偏移量,单位为mm
|
2023-07-20 16:05:40 +08:00
|
|
|
|
int64 headLinkOffset = 4;
|
2023-07-07 10:37:29 +08:00
|
|
|
|
//车尾所在link的索引
|
2023-07-20 16:05:40 +08:00
|
|
|
|
string tailLinkId = 5;
|
2023-07-14 13:09:45 +08:00
|
|
|
|
//车尾所在link内的偏移量,单位为mm
|
2023-07-20 16:05:40 +08:00
|
|
|
|
int64 tailLinkOffset = 6;
|
2023-07-07 10:37:29 +08:00
|
|
|
|
//列车所占用的link的索引的列表
|
|
|
|
|
//顺序为从车头到车尾
|
2023-07-18 09:40:15 +08:00
|
|
|
|
repeated string occupiedLinkIndex = 7;
|
2023-07-20 16:05:40 +08:00
|
|
|
|
//生命信号
|
|
|
|
|
int32 heartbeat = 8;
|
|
|
|
|
//列车所在位置坡度值,1=1‰
|
|
|
|
|
int32 slope = 9;
|
|
|
|
|
//列车所在位置坡度走势,1=上坡true,0=下坡false
|
|
|
|
|
bool upslope = 10;
|
|
|
|
|
//列车当前运行方向,1 =上行true 0 =下行false
|
|
|
|
|
bool runningUp = 11;
|
|
|
|
|
//实际运行阻力(总),1=1KN
|
|
|
|
|
int32 runningResistanceSum = 12;
|
|
|
|
|
//阻力1(空气阻力),1=1KN
|
|
|
|
|
int32 airResistance = 13;
|
|
|
|
|
//阻力2(坡道阻力),1=1KN
|
|
|
|
|
int32 rampResistance = 14;
|
|
|
|
|
//阻力3(曲线阻力),1=1KN
|
|
|
|
|
int32 curveResistance = 15;
|
|
|
|
|
//列车运行速度,1=1km/h
|
|
|
|
|
int32 speed = 16;
|
|
|
|
|
//头车速传1速度值,1=1km/h
|
|
|
|
|
int32 headSensorSpeed1 = 17;
|
|
|
|
|
//头车速传2速度值,1=1km/h
|
|
|
|
|
int32 headSensorSpeed2 = 18;
|
|
|
|
|
//尾车速传1速度值,1=1km/h
|
|
|
|
|
int32 tailSensorSpeed1 = 19;
|
|
|
|
|
//尾车速度2速度值,1=1km/h
|
|
|
|
|
int32 tailSensorSpeed2 = 20;
|
|
|
|
|
//头车雷达速度值,1=1km/h
|
|
|
|
|
int32 headRadarSpeed = 21;
|
|
|
|
|
//尾车雷达速度值,1=1km/h
|
|
|
|
|
int32 tailRadarSpeed = 22;
|
2023-07-25 11:02:51 +08:00
|
|
|
|
//列车长度,1=1mm
|
|
|
|
|
int64 trainLength = 23;
|
2023-07-07 10:37:29 +08:00
|
|
|
|
}
|
2023-07-11 16:06:34 +08:00
|
|
|
|
|
2023-07-11 16:11:49 +08:00
|
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2023-07-11 16:06:34 +08:00
|
|
|
|
//仿真运行时状态变化量,当前时刻与上一时刻比较得到
|
|
|
|
|
message VariationStatus{
|
|
|
|
|
//新增或变化的列车的状态
|
|
|
|
|
repeated TrainState updatedTrain = 1;
|
|
|
|
|
//移除的列车的索引
|
|
|
|
|
repeated string removedTrainId = 2;
|
|
|
|
|
//状态发生变化的道岔
|
|
|
|
|
repeated SwitchState updatedSwitch = 3;
|
|
|
|
|
//状态发生变化的区段
|
|
|
|
|
repeated SectionState updatedSection = 4;
|
|
|
|
|
}
|
2023-07-11 16:11:49 +08:00
|
|
|
|
|
|
|
|
|
//仿真运行时的所有设备的状态
|
|
|
|
|
message AllDevicesStatus{
|
|
|
|
|
//所有列车状态
|
|
|
|
|
repeated TrainState trainState = 1;
|
|
|
|
|
//所有道岔状态
|
|
|
|
|
repeated SwitchState switchState = 2;
|
|
|
|
|
//所有类型区段状态
|
|
|
|
|
repeated SectionState sectionState = 3;
|
|
|
|
|
}
|
2023-07-13 18:13:43 +08:00
|
|
|
|
|
|
|
|
|
//服务器端向前端推送的设备状态信息
|
|
|
|
|
message PushedDevicesStatus{
|
|
|
|
|
//true-全量设备状态信息,此时allStatus有效;
|
|
|
|
|
//false - 增量设备状态消息,此时varStatus有效
|
|
|
|
|
bool all = 1;
|
|
|
|
|
//增量设备状态消息
|
|
|
|
|
VariationStatus varStatus = 2;
|
|
|
|
|
//全量设备状态信息
|
|
|
|
|
AllDevicesStatus allStatus = 3;
|
|
|
|
|
}
|