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";
|
2023-10-26 17:15:57 +08:00
|
|
|
|
option go_package = "./ts/protos/state";
|
2023-07-07 10:37:29 +08:00
|
|
|
|
|
|
|
|
|
//状态定义面向物理层即只定义物理状态,不定义逻辑层状态
|
|
|
|
|
|
|
|
|
|
//区段类型
|
|
|
|
|
enum SectionType{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
Any=0;
|
|
|
|
|
//计轴区段
|
|
|
|
|
Axle=1;
|
|
|
|
|
//逻辑区段
|
|
|
|
|
Logic=2;
|
|
|
|
|
//物理区段
|
|
|
|
|
Physic=3;
|
2023-07-07 10:37:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 17:20:29 +08:00
|
|
|
|
//相邻端点定义的link的状态
|
|
|
|
|
message LinkState{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//link索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
//link上的列车id列表
|
|
|
|
|
repeated string trainId = 2;
|
2023-07-07 17:20:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-07 10:37:29 +08:00
|
|
|
|
//区段状态
|
|
|
|
|
message SectionState{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//区段索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
//区段占用
|
|
|
|
|
//true-占用;false-出清
|
|
|
|
|
bool occupied = 3;
|
2023-11-01 11:10:54 +08:00
|
|
|
|
//计轴故障
|
|
|
|
|
bool axleFault = 4;
|
2023-07-07 10:37:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//道岔状态
|
|
|
|
|
message SwitchState{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//道岔索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
//道岔处于定位(表示)
|
|
|
|
|
bool normal = 2;
|
|
|
|
|
//道岔处于反位(表示)
|
|
|
|
|
bool reverse = 3;
|
|
|
|
|
//道岔处于定位(实际)
|
|
|
|
|
bool dw = 4;
|
|
|
|
|
//道岔处于反位(实际)
|
|
|
|
|
bool fw = 5;
|
2023-10-31 15:13:05 +08:00
|
|
|
|
// 是否强制(屏蔽联锁驱动)
|
|
|
|
|
bool force = 6;
|
|
|
|
|
// 是否有失表故障
|
|
|
|
|
bool sb = 7;
|
|
|
|
|
// 是否有定位失表故障
|
|
|
|
|
bool dwsb = 8;
|
|
|
|
|
// 是否有反位失表故障
|
|
|
|
|
bool fwsb = 9;
|
|
|
|
|
// 是否有挤岔故障
|
|
|
|
|
bool jc = 10;
|
|
|
|
|
// 定操驱动
|
|
|
|
|
bool qdc = 11;
|
|
|
|
|
// 反操驱动
|
|
|
|
|
bool qfc = 12;
|
|
|
|
|
// 允许操驱动
|
|
|
|
|
bool qyc = 13;
|
|
|
|
|
// 是否定操
|
|
|
|
|
bool dc = 14;
|
|
|
|
|
// 是否反操
|
|
|
|
|
bool fc = 15;
|
|
|
|
|
// 是否允许操作
|
|
|
|
|
bool yc = 16;
|
2023-07-07 10:37:29 +08:00
|
|
|
|
}
|
2023-07-18 10:57:07 +08:00
|
|
|
|
//信号机状态
|
|
|
|
|
message SignalState{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//信号机索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
//信号机的灯列表
|
2023-10-16 11:10:54 +08:00
|
|
|
|
Signal.Aspect aspect = 2;
|
2023-07-18 10:57:07 +08:00
|
|
|
|
}
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//信号机显示定义
|
2023-10-13 10:34:39 +08:00
|
|
|
|
message Signal {
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//信号机显示枚举
|
2023-10-13 10:34:39 +08:00
|
|
|
|
enum Aspect {
|
2023-10-17 09:23:38 +08:00
|
|
|
|
//无用值
|
|
|
|
|
Non = 0;
|
2023-10-13 10:34:39 +08:00
|
|
|
|
//物理灭灯
|
2023-10-17 09:23:38 +08:00
|
|
|
|
OFF = 1;
|
2023-10-13 10:34:39 +08:00
|
|
|
|
//绿灯亮
|
2023-10-17 09:23:38 +08:00
|
|
|
|
L = 2;
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//红
|
2023-10-17 09:23:38 +08:00
|
|
|
|
H = 3;
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//黄
|
2023-10-17 09:23:38 +08:00
|
|
|
|
U = 4;
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//红黄
|
2023-10-17 09:23:38 +08:00
|
|
|
|
HU= 5;
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//白
|
2023-10-17 09:23:38 +08:00
|
|
|
|
B=6;
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//蓝
|
2023-10-17 09:23:38 +08:00
|
|
|
|
A=7;
|
2023-10-13 15:53:32 +08:00
|
|
|
|
}
|
2023-10-13 10:18:30 +08:00
|
|
|
|
}
|
2023-10-13 10:34:39 +08:00
|
|
|
|
|
2023-07-20 17:19:58 +08:00
|
|
|
|
//站台状态
|
|
|
|
|
message PlatformState{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//站台索引
|
|
|
|
|
string id = 1;
|
2023-07-20 17:19:58 +08:00
|
|
|
|
}
|
|
|
|
|
//车站状态
|
|
|
|
|
message StationState{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//车站索引
|
|
|
|
|
string id = 1;
|
2023-07-20 17:19:58 +08:00
|
|
|
|
}
|
2023-07-07 10:37:29 +08:00
|
|
|
|
//列车状态
|
|
|
|
|
message TrainState{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//列车索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
//列车初始link运行方向
|
|
|
|
|
bool up = 2;
|
|
|
|
|
// 列车初始速度
|
|
|
|
|
float speed = 3;
|
|
|
|
|
//列车长度,1=1mm
|
|
|
|
|
int64 trainLength = 4;
|
|
|
|
|
//列车是否显示
|
|
|
|
|
bool show = 5;
|
|
|
|
|
// 列车车头所在设备ID
|
|
|
|
|
string headDeviceId = 6;
|
|
|
|
|
// 列车车头所在设备偏移量
|
|
|
|
|
int64 headOffset = 7;
|
|
|
|
|
// 设备端口
|
|
|
|
|
string devicePort = 8;
|
|
|
|
|
// 运行方向指向(区段:A-B,道岔:-> 岔心)
|
|
|
|
|
bool pointTo = 9;
|
|
|
|
|
// 运行上下行(公里标 上行:小 -> 大,下行:大 -> 小)
|
|
|
|
|
bool runDirection = 10;
|
|
|
|
|
// 列车车头方向
|
|
|
|
|
bool headDirection = 11;
|
|
|
|
|
// 动力学信息
|
|
|
|
|
TrainDynamicState dynamicState = 12;
|
|
|
|
|
// 半实物信息
|
|
|
|
|
TrainVobcState vobcState = 13;
|
|
|
|
|
// 所在公里标
|
|
|
|
|
int64 trainKilometer = 14;
|
2023-10-18 14:53:33 +08:00
|
|
|
|
// 控制响应延时
|
|
|
|
|
int64 controlDelayTime = 15;
|
2023-11-01 16:00:29 +08:00
|
|
|
|
// 列车车头所在设备UID
|
|
|
|
|
string headDeviceUId = 16;
|
2023-08-25 15:37:55 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 动力学列车状态
|
|
|
|
|
message TrainDynamicState {
|
|
|
|
|
// 生命信号 每个周期+1
|
|
|
|
|
int32 heartbeat = 1;
|
|
|
|
|
//车头所在link的索引
|
|
|
|
|
string headLinkId = 2;
|
|
|
|
|
//车头所在link内的偏移量,单位为mm
|
|
|
|
|
int64 headLinkOffset = 3;
|
|
|
|
|
//车尾所在link的索引
|
|
|
|
|
string tailLinkId = 4;
|
|
|
|
|
//车尾所在link内的偏移量,单位为mm
|
|
|
|
|
int64 tailLinkOffset = 5;
|
|
|
|
|
//列车所占用的link的索引的列表
|
|
|
|
|
//顺序为从车头到车尾
|
|
|
|
|
repeated string occupiedLinkIndex = 6;
|
|
|
|
|
//列车所在位置坡度值,1=1‰
|
|
|
|
|
int32 slope = 7;
|
|
|
|
|
//列车所在位置坡度走势,1=上坡true,0=下坡false
|
|
|
|
|
bool upslope = 8;
|
|
|
|
|
//列车当前运行方向,1 =上行true 0 =下行false
|
2023-10-13 15:53:32 +08:00
|
|
|
|
bool runningUp = 9;
|
2023-08-25 15:37:55 +08:00
|
|
|
|
//实际运行阻力(总)(N)totalResistance,1=1KN
|
|
|
|
|
float runningResistanceSum = 10;
|
|
|
|
|
//阻力1(空气阻力)(N)airResistance,1=1KN
|
2023-08-25 15:54:52 +08:00
|
|
|
|
float airResistance = 11;
|
2023-08-25 15:37:55 +08:00
|
|
|
|
//阻力2(坡道阻力)(N)slopeResistance,1=1KN
|
2023-08-25 15:54:52 +08:00
|
|
|
|
float rampResistance = 12;
|
2023-08-25 15:37:55 +08:00
|
|
|
|
//阻力3(曲线阻力)(N)curveResistance,1=1KN
|
2023-08-25 15:54:52 +08:00
|
|
|
|
float curveResistance = 13;
|
2023-08-25 15:37:55 +08:00
|
|
|
|
//列车运行速度(m/s)speed,1=1km/h
|
2023-09-05 15:06:51 +08:00
|
|
|
|
int32 speed = 14;
|
2023-08-25 15:57:57 +08:00
|
|
|
|
//头车速传1速度值(m/s)headSpeed1,1=1km/h
|
2023-10-13 15:53:32 +08:00
|
|
|
|
int32 headSensorSpeed1 = 15;
|
2023-08-25 15:57:57 +08:00
|
|
|
|
//头车速度2速度值(m/s)headSpeed2,1=1km/h
|
2023-09-05 15:06:51 +08:00
|
|
|
|
int32 headSensorSpeed2 = 16;
|
2023-08-25 15:57:57 +08:00
|
|
|
|
//尾车速传1速度值(m/s)tailSpeed1,1=1km/h
|
2023-09-05 15:06:51 +08:00
|
|
|
|
int32 tailSensorSpeed1 = 17;
|
2023-08-25 15:57:57 +08:00
|
|
|
|
//尾车速度2速度值(m/s)tailSpeed2,1=1km/h
|
2023-09-05 15:06:51 +08:00
|
|
|
|
int32 tailSensorSpeed2 = 18;
|
2023-08-25 15:37:55 +08:00
|
|
|
|
//头车雷达速度值(m/s)headRadarSpeed,1=1km/h
|
2023-09-05 15:06:51 +08:00
|
|
|
|
int32 headRadarSpeed = 19;
|
2023-08-25 15:37:55 +08:00
|
|
|
|
//尾车雷达速度值(m/s)tailRadarSpeed,1=1km/h
|
2023-09-05 15:06:51 +08:00
|
|
|
|
int32 tailRadarSpeed = 20;
|
2023-10-07 16:49:22 +08:00
|
|
|
|
// 通讯中断
|
2023-09-12 08:55:20 +08:00
|
|
|
|
bool udpInterruption = 21;
|
2023-10-07 16:49:22 +08:00
|
|
|
|
// 加速
|
|
|
|
|
float acceleration = 22;
|
2023-08-23 09:37:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// vobc发过来的列车信息
|
|
|
|
|
message TrainVobcState {
|
|
|
|
|
// 生命信号 每个周期+1
|
|
|
|
|
int32 lifeSignal = 1;
|
|
|
|
|
// TC1激活状态 1=激活
|
|
|
|
|
bool tc1Active = 2;
|
|
|
|
|
// TC2激活状态 1=激活
|
|
|
|
|
bool tc2Active = 3;
|
|
|
|
|
// 列车方向向前 1=方向向前
|
|
|
|
|
bool directionForward = 4;
|
|
|
|
|
// 列车方向向后 1=方向向后
|
|
|
|
|
bool directionBackward = 5;
|
|
|
|
|
// 列车牵引状态 1=牵引
|
|
|
|
|
bool tractionStatus = 6;
|
|
|
|
|
// 列车制动状态 1=制动
|
|
|
|
|
bool brakingStatus = 7;
|
|
|
|
|
// 列车紧急制动状态 1=紧急制动
|
|
|
|
|
bool emergencyBrakingStatus = 8;
|
|
|
|
|
// 列车折返状态(AR) 1=折返
|
|
|
|
|
bool turnbackStatus = 9;
|
|
|
|
|
// 跳跃状态 1=跳跃
|
|
|
|
|
bool jumpStatus = 10;
|
|
|
|
|
// ATO模式 1=ATO模式
|
|
|
|
|
bool ato = 11;
|
|
|
|
|
// FAM模式 1=FAM模式
|
2023-10-13 15:53:32 +08:00
|
|
|
|
bool fam = 12;
|
2023-08-23 09:37:58 +08:00
|
|
|
|
// CAM模式 1=CAM模式
|
2023-10-13 15:53:32 +08:00
|
|
|
|
bool cam = 13;
|
2023-08-23 09:37:58 +08:00
|
|
|
|
// 牵引安全回路 1=牵引安全切除
|
|
|
|
|
bool tractionSafetyCircuit = 14;
|
|
|
|
|
// 停放制动状态 1=停放施加
|
|
|
|
|
bool parkingBrakeStatus = 15;
|
|
|
|
|
// 保持制动状态 1=保持制动施加
|
|
|
|
|
bool maintainBrakeStatus = 16;
|
|
|
|
|
// 列车牵引力 100=1KN
|
|
|
|
|
int64 tractionForce = 17;
|
|
|
|
|
// 列车制动力 100=1KN
|
|
|
|
|
int64 brakeForce = 18;
|
|
|
|
|
//【列车载荷 100=1ton
|
|
|
|
|
int64 trainLoad = 19;
|
|
|
|
|
// 列车开左门指令 1=开门
|
|
|
|
|
bool leftDoorOpenCommand = 20;
|
|
|
|
|
// 列车开右门指令 1=开门
|
|
|
|
|
bool rightDoorOpenCommand = 21;
|
|
|
|
|
// 列车关左门指令 1=关门
|
|
|
|
|
bool leftDoorCloseCommand = 22;
|
|
|
|
|
// 列车关右门指令 1=关门
|
|
|
|
|
bool rightDoorCloseCommand = 23;
|
|
|
|
|
// 整列车门关好 1=门关好
|
|
|
|
|
bool allDoorClose = 24;
|
2023-10-07 16:49:22 +08:00
|
|
|
|
// 通讯中断
|
2023-09-12 08:55:20 +08:00
|
|
|
|
bool udpInterruption = 25;
|
2023-10-17 18:03:33 +08:00
|
|
|
|
// 更新时间
|
|
|
|
|
int64 updateTime = 26;
|
2023-07-07 10:37:29 +08:00
|
|
|
|
}
|
2023-07-11 16:06:34 +08:00
|
|
|
|
|
2023-09-27 17:04:13 +08:00
|
|
|
|
// 继电器状态
|
|
|
|
|
message ReplyState {
|
|
|
|
|
// 继电器索引
|
|
|
|
|
string id = 1;
|
|
|
|
|
// 继电器吸合状态
|
|
|
|
|
bool xh = 2;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-17 15:46:27 +08:00
|
|
|
|
// 按钮状态
|
|
|
|
|
message ButtonState {
|
|
|
|
|
string id = 1;
|
|
|
|
|
bool down = 2;
|
2023-10-19 16:08:09 +08:00
|
|
|
|
bool active = 3; // 带灯的按钮
|
2023-10-17 15:46:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 警铃状态
|
|
|
|
|
message AlarmState {
|
|
|
|
|
string id = 1;
|
|
|
|
|
bool active = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 灯状态
|
|
|
|
|
message LightState {
|
|
|
|
|
string id = 1;
|
2023-10-19 16:08:09 +08:00
|
|
|
|
bool active = 2;
|
2023-10-17 15:46:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-10-19 17:09:36 +08:00
|
|
|
|
// 屏蔽门状态
|
|
|
|
|
message PsdState {
|
|
|
|
|
string id = 1; //屏蔽门的id
|
2023-10-19 17:31:26 +08:00
|
|
|
|
repeated int32 openDoorCodes = 2; //开启的小门的编号
|
2023-10-19 17:09:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
2023-10-20 10:53:39 +08:00
|
|
|
|
// 钥匙状态
|
|
|
|
|
message KeyState {
|
|
|
|
|
string id = 1;
|
|
|
|
|
int32 gear = 2;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-17 15:46:27 +08:00
|
|
|
|
|
2023-07-11 16:11:49 +08:00
|
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
2023-07-11 16:06:34 +08:00
|
|
|
|
//仿真运行时状态变化量,当前时刻与上一时刻比较得到
|
|
|
|
|
message VariationStatus{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//新增或变化的列车的状态
|
|
|
|
|
repeated TrainState updatedTrain = 1;
|
|
|
|
|
//移除的列车的索引
|
|
|
|
|
repeated string removedTrainId = 2;
|
|
|
|
|
//状态发生变化的道岔
|
|
|
|
|
repeated SwitchState updatedSwitch = 3;
|
|
|
|
|
//状态发生变化的区段
|
|
|
|
|
repeated SectionState updatedSection = 4;
|
|
|
|
|
//状态发送变化的继电器
|
|
|
|
|
repeated ReplyState updatedReply = 5;
|
2023-07-11 16:06:34 +08:00
|
|
|
|
}
|
2023-07-11 16:11:49 +08:00
|
|
|
|
|
|
|
|
|
//仿真运行时的所有设备的状态
|
|
|
|
|
message AllDevicesStatus{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
// 所有列车状态
|
|
|
|
|
repeated TrainState trainState = 1;
|
|
|
|
|
// 所有道岔状态
|
|
|
|
|
repeated SwitchState switchState = 2;
|
|
|
|
|
// 所有类型区段状态
|
|
|
|
|
repeated SectionState sectionState = 3;
|
|
|
|
|
// 所有继电器状态
|
|
|
|
|
repeated ReplyState replyState = 4;
|
2023-10-13 15:18:12 +08:00
|
|
|
|
// 所有信号机状态
|
|
|
|
|
repeated SignalState signalState = 5;
|
2023-10-17 15:46:27 +08:00
|
|
|
|
// 按钮状态
|
|
|
|
|
repeated ButtonState buttonState = 6;
|
|
|
|
|
// 警铃状态
|
|
|
|
|
repeated AlarmState AlarmState = 7;
|
|
|
|
|
// 灯状态
|
|
|
|
|
repeated LightState LightState = 8;
|
2023-10-19 17:09:36 +08:00
|
|
|
|
// 屏蔽门状态
|
|
|
|
|
repeated PsdState psdState = 9;
|
2023-10-20 10:53:39 +08:00
|
|
|
|
// 钥匙状态
|
|
|
|
|
repeated KeyState KeyState = 10;
|
2023-07-11 16:11:49 +08:00
|
|
|
|
}
|
2023-07-13 18:13:43 +08:00
|
|
|
|
|
|
|
|
|
//服务器端向前端推送的设备状态信息
|
|
|
|
|
message PushedDevicesStatus{
|
2023-10-13 15:53:32 +08:00
|
|
|
|
//true-全量设备状态信息,此时allStatus有效;
|
|
|
|
|
//false - 增量设备状态消息,此时varStatus有效
|
|
|
|
|
bool all = 1;
|
|
|
|
|
//增量设备状态消息
|
|
|
|
|
VariationStatus varStatus = 2;
|
|
|
|
|
//全量设备状态信息
|
|
|
|
|
AllDevicesStatus allStatus = 3;
|
2023-07-13 18:13:43 +08:00
|
|
|
|
}
|
2023-08-30 10:26:35 +08:00
|
|
|
|
|
|
|
|
|
// 仿真信息状态
|
|
|
|
|
message SimulationStatus {
|
2023-10-27 09:24:16 +08:00
|
|
|
|
|
2023-10-27 14:02:43 +08:00
|
|
|
|
enum SimulationState {
|
|
|
|
|
PAUSE = 0;
|
|
|
|
|
START = 1;
|
|
|
|
|
ERROR = 2;
|
|
|
|
|
DESTROY = 3;
|
|
|
|
|
}
|
2023-08-30 10:26:35 +08:00
|
|
|
|
|
2023-10-27 14:02:43 +08:00
|
|
|
|
string simulationId = 1;
|
2023-08-30 10:30:38 +08:00
|
|
|
|
|
2023-10-27 14:02:43 +08:00
|
|
|
|
SimulationState state = 2;
|
2023-10-27 14:18:30 +08:00
|
|
|
|
|
|
|
|
|
string description = 3;
|
2023-08-30 10:26:35 +08:00
|
|
|
|
}
|