From 84805cae38fb517b8a221d10c0ad62eb7c69667c Mon Sep 17 00:00:00 2001 From: fan Date: Wed, 19 Jul 2023 13:53:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/stationLayoutGraphics.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protos/stationLayoutGraphics.proto b/protos/stationLayoutGraphics.proto index 6ad0298..2f31fe1 100644 --- a/protos/stationLayoutGraphics.proto +++ b/protos/stationLayoutGraphics.proto @@ -156,7 +156,7 @@ message Turnout {//(后端不关注) } message KilometerSystem { - int64 kilometer = 1; //公里标cm + int64 kilometer = 1; //公里标mm string coordinateSystem = 2; //坐标系 } From 6800d67a23481d784e1385930446e8f0bec36117 Mon Sep 17 00:00:00 2001 From: Yuan Date: Thu, 20 Jul 2023 13:49:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=81=93=E5=B2=94=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/device_state.proto | 92 ++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 41 deletions(-) diff --git a/protos/device_state.proto b/protos/device_state.proto index 8382910..f3ec907 100644 --- a/protos/device_state.proto +++ b/protos/device_state.proto @@ -7,65 +7,75 @@ option java_outer_classname = "DeviceStateProto"; //状态定义面向物理层即只定义物理状态,不定义逻辑层状态 //区段类型 -enum SectionType{ - Any=0; +enum SectionType { + Any = 0; //计轴区段 - Axle=1; + Axle = 1; //逻辑区段 - Logic=2; + Logic = 2; //物理区段 - Physic=3; + Physic = 3; } //相邻端点定义的link的状态 -message LinkState{ - //link索引 - string id = 1; - //link上的列车id列表 - repeated string trainId = 2; +message LinkState { + // link索引 + string id = 1; + // link上的列车id列表 + repeated string trainId = 2; } //区段状态 -message SectionState{ +message SectionState { //区段索引 - string id = 1; + string id = 1; //区段类型 SectionType type = 2; //区段占用 - //true-占用;false-出清 - bool occupied = 3; + // true-占用;false-出清 + bool occupied = 3; } //道岔状态 -message SwitchState{ +message SwitchState { //道岔索引 - string id = 1; + string id = 1; //道岔处于定位 - bool normal = 2; + bool normal = 2; //道岔处于反位 - bool reverse = 3; + bool reverse = 3; } //信号机状态 -message SignalState{ +message SignalState { //信号机索引 - string id = 1; + string id = 1; +} +//站台状态 +message PlatformState { + //站台索引 + string id = 1; +} +//车站状态 +message StationState { + //车站索引 + string id = 1; } //列车状态 -message TrainState{ +message TrainState { //列车索引 - string id = 1; + string id = 1; //列车运行方向 - //true - 上行方向运行 - //false - 下行方向运行 - bool up = 2; + // true - 上行方向运行 + // false - 下行方向运行 + bool up = 2; //车头所在link的索引 - string headLinkId = 3; + string headLinkId = 3; //车头所在link内的偏移量,单位为mm - int64 headLinkOffset = 4; + int64 headLinkOffset = 4; //车尾所在link的索引 - string tailLinkId = 5; + string tailLinkId = 5; //车尾所在link内的偏移量,单位为mm - int64 tailLinkOffset = 6; + int64 tailLinkOffset = 6; //列车所占用的link的索引的列表 //顺序为从车头到车尾 repeated string occupiedLinkIndex = 7; @@ -74,21 +84,21 @@ message TrainState{ //////////////////////////////////////////////////////////////////////////// //仿真运行时状态变化量,当前时刻与上一时刻比较得到 -message VariationStatus{ +message VariationStatus { //新增或变化的列车的状态 - repeated TrainState updatedTrain = 1; + repeated TrainState updatedTrain = 1; //移除的列车的索引 - repeated string removedTrainId = 2; + repeated string removedTrainId = 2; //状态发生变化的道岔 - repeated SwitchState updatedSwitch = 3; + repeated SwitchState updatedSwitch = 3; //状态发生变化的区段 repeated SectionState updatedSection = 4; } //仿真运行时的所有设备的状态 -message AllDevicesStatus{ +message AllDevicesStatus { //所有列车状态 - repeated TrainState trainState = 1; + repeated TrainState trainState = 1; //所有道岔状态 repeated SwitchState switchState = 2; //所有类型区段状态 @@ -96,12 +106,12 @@ message AllDevicesStatus{ } //服务器端向前端推送的设备状态信息 -message PushedDevicesStatus{ - //true-全量设备状态信息,此时allStatus有效; - //false - 增量设备状态消息,此时varStatus有效 - bool all = 1; +message PushedDevicesStatus { + // true-全量设备状态信息,此时allStatus有效; + // false - 增量设备状态消息,此时varStatus有效 + bool all = 1; //增量设备状态消息 - VariationStatus varStatus = 2; + VariationStatus varStatus = 2; //全量设备状态信息 - AllDevicesStatus allStatus = 3; + AllDevicesStatus allStatus = 3; }