From 2f5db03f59c88f881790a8a68f221080af21feaa Mon Sep 17 00:00:00 2001 From: Yuan Date: Fri, 13 Oct 2023 15:22:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ibp=E7=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/ibpGraphics.proto | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/protos/ibpGraphics.proto b/protos/ibpGraphics.proto index 7beb207..fa1fcca 100644 --- a/protos/ibpGraphics.proto +++ b/protos/ibpGraphics.proto @@ -12,6 +12,7 @@ message IBPGraphicStorage { repeated IBPText IBPTexts = 6; // UniqueIdType UniqueIdPrefix = 7; repeated IbpRelatedDevice ibpRelatedDevices = 8; + repeated IbpLight ibpLights = 9; } message IBPButton { @@ -54,6 +55,18 @@ message IbpArrow { repeated graphicData.Point points = 3; } +message IbpLight { + enum IbpLightColor { + white = 0; + red = 1; + green = 2; + blue = 3; + } + graphicData.CommonInfo common = 1; + IbpLightColor color = 2; + string code = 3; +} + // message UniqueIdType { // string city = 1; //城市 // string lineId = 2; //线路号 From 62c82bd0417746023b3485485fb5fee8c8268636 Mon Sep 17 00:00:00 2001 From: xzb <223@qq.com> Date: Fri, 13 Oct 2023 15:53:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=A1=E5=8F=B7=E6=9C=BA=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/device_state.proto | 206 ++++++++++++++++++++------------------ 1 file changed, 107 insertions(+), 99 deletions(-) diff --git a/protos/device_state.proto b/protos/device_state.proto index c028267..d2ed2ae 100644 --- a/protos/device_state.proto +++ b/protos/device_state.proto @@ -9,56 +9,57 @@ option go_package = "./ats/verify/protos/state"; //区段类型 enum SectionType{ - Any=0; - //计轴区段 - Axle=1; - //逻辑区段 - Logic=2; - //物理区段 - Physic=3; + Any=0; + //计轴区段 + Axle=1; + //逻辑区段 + Logic=2; + //物理区段 + Physic=3; } //相邻端点定义的link的状态 message LinkState{ - //link索引 - string id = 1; - //link上的列车id列表 - repeated string trainId = 2; + //link索引 + string id = 1; + //link上的列车id列表 + repeated string trainId = 2; } //区段状态 message SectionState{ - //区段索引 - string id = 1; - //区段类型 - SectionType type = 2; - //区段占用 - //true-占用;false-出清 - bool occupied = 3; + //区段索引 + string id = 1; + //区段类型 + SectionType type = 2; + //区段占用 + //true-占用;false-出清 + bool occupied = 3; } //道岔状态 message SwitchState{ - //道岔索引 - string id = 1; - //道岔处于定位(表示) - bool normal = 2; - //道岔处于反位(表示) - bool reverse = 3; - //道岔处于定位(实际) - bool dw = 4; - //道岔处于反位(实际) - bool fw = 5; + //道岔索引 + string id = 1; + //道岔处于定位(表示) + bool normal = 2; + //道岔处于反位(表示) + bool reverse = 3; + //道岔处于定位(实际) + bool dw = 4; + //道岔处于反位(实际) + bool fw = 5; } //信号机状态 message SignalState{ - //信号机索引 - string id = 1; - //信号机显示 - Signal.Aspect aspect = 2; + //信号机索引 + string id = 1; + //信号机的灯列表 + repeated Signal.Light light = 2; } -//信号机显示枚举定义 +//信号机显示定义 message Signal { + //信号机显示枚举 enum Aspect { //物理灭灯 OFF = 0; @@ -66,59 +67,66 @@ message Signal { ON = 1; //绿灯亮 L = 2; - //红灯亮 + //红 H = 3; - //黄灯亮 + //黄 U = 4; - //红灯且黄灯亮 + //红黄 HU= 5; - //白灯亮 + //白 B=6; - //蓝灯亮 + //蓝 A=7; } + //信号机中的灯 + message Light{ + //灯颜色(单色) + Aspect color = 1; + //true-显示信号,false-不显示信号 + bool display = 2; + } } //站台状态 message PlatformState{ - //站台索引 - string id = 1; + //站台索引 + string id = 1; } //车站状态 message StationState{ - //车站索引 - string id = 1; + //车站索引 + string id = 1; } //列车状态 message TrainState{ - //列车索引 - 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; + //列车索引 + 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; } // 动力学列车状态 @@ -141,7 +149,7 @@ message TrainDynamicState { //列车所在位置坡度走势,1=上坡true,0=下坡false bool upslope = 8; //列车当前运行方向,1 =上行true 0 =下行false - bool runningUp = 9; + bool runningUp = 9; //实际运行阻力(总)(N)totalResistance,1=1KN float runningResistanceSum = 10; //阻力1(空气阻力)(N)airResistance,1=1KN @@ -153,7 +161,7 @@ message TrainDynamicState { //列车运行速度(m/s)speed,1=1km/h int32 speed = 14; //头车速传1速度值(m/s)headSpeed1,1=1km/h - int32 headSensorSpeed1 = 15; + int32 headSensorSpeed1 = 15; //头车速度2速度值(m/s)headSpeed2,1=1km/h int32 headSensorSpeed2 = 16; //尾车速传1速度值(m/s)tailSpeed1,1=1km/h @@ -195,9 +203,9 @@ message TrainVobcState { // ATO模式 1=ATO模式 bool ato = 11; // FAM模式 1=FAM模式 - bool fam = 12; + bool fam = 12; // CAM模式 1=CAM模式 - bool cam = 13; + bool cam = 13; // 牵引安全回路 1=牵引安全切除 bool tractionSafetyCircuit = 14; // 停放制动状态 1=停放施加 @@ -236,41 +244,41 @@ message ReplyState { //仿真运行时状态变化量,当前时刻与上一时刻比较得到 message VariationStatus{ - //新增或变化的列车的状态 - repeated TrainState updatedTrain = 1; - //移除的列车的索引 - repeated string removedTrainId = 2; - //状态发生变化的道岔 - repeated SwitchState updatedSwitch = 3; - //状态发生变化的区段 - repeated SectionState updatedSection = 4; - //状态发送变化的继电器 - repeated ReplyState updatedReply = 5; + //新增或变化的列车的状态 + repeated TrainState updatedTrain = 1; + //移除的列车的索引 + repeated string removedTrainId = 2; + //状态发生变化的道岔 + repeated SwitchState updatedSwitch = 3; + //状态发生变化的区段 + repeated SectionState updatedSection = 4; + //状态发送变化的继电器 + repeated ReplyState updatedReply = 5; } //仿真运行时的所有设备的状态 message AllDevicesStatus{ - // 所有列车状态 - repeated TrainState trainState = 1; - // 所有道岔状态 - repeated SwitchState switchState = 2; - // 所有类型区段状态 - repeated SectionState sectionState = 3; - // 所有继电器状态 - repeated ReplyState replyState = 4; + // 所有列车状态 + repeated TrainState trainState = 1; + // 所有道岔状态 + repeated SwitchState switchState = 2; + // 所有类型区段状态 + repeated SectionState sectionState = 3; + // 所有继电器状态 + repeated ReplyState replyState = 4; // 所有信号机状态 repeated SignalState signalState = 5; } //服务器端向前端推送的设备状态信息 message PushedDevicesStatus{ - //true-全量设备状态信息,此时allStatus有效; - //false - 增量设备状态消息,此时varStatus有效 - bool all = 1; - //增量设备状态消息 - VariationStatus varStatus = 2; - //全量设备状态信息 - AllDevicesStatus allStatus = 3; + //true-全量设备状态信息,此时allStatus有效; + //false - 增量设备状态消息,此时varStatus有效 + bool all = 1; + //增量设备状态消息 + VariationStatus varStatus = 2; + //全量设备状态信息 + AllDevicesStatus allStatus = 3; } // 仿真信息状态