From 62ef7c7f4df2d30bbb26fbf18fe828692606c729 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Thu, 14 Dec 2023 16:31:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E5=88=97=E8=BD=A6?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/device_state.proto | 147 +++++++++++++++++++++++++++++++++++++- 1 file changed, 146 insertions(+), 1 deletion(-) diff --git a/protos/device_state.proto b/protos/device_state.proto index 54951e3..cffe7bc 100644 --- a/protos/device_state.proto +++ b/protos/device_state.proto @@ -261,6 +261,147 @@ message TrainVobcState { int64 updateTime = 26; } +// 发给前端的列车状态 +message TrainMapState{ + //列车索引 + string id = 1; + //列车初始link运行方向 + bool up = 2; + // 列车初始速度 + float speed = 3; + //列车长度,1=1mm + int64 trainLength = 4; + //列车是否显示 + bool show = 5; + // 列车车头所在设备ID + uint32 headDeviceId = 6; + // 列车车头所在设备偏移量 + int64 headOffset = 7; + // 设备端口 + string devicePort = 8; + // 运行方向指向(区段:A-B,道岔:-> 岔心) + bool pointTo = 9; + // 运行上下行(公里标 上行:小 -> 大,下行:大 -> 小) + bool runDirection = 10; + // 列车车头方向 + bool headDirection = 11; + // 所在公里标 + int64 trainKilometer = 12; + // 控制响应延时 + int64 controlDelayTime = 13; + // 列车轮径 + int32 wheelDiameter = 14; +} + +// 动力学列车状态 +message TrainMapDynamicState { + //列车索引 + string id = 1; + // 生命信号 每个周期+1 + int32 heartbeat = 2; + //车头所在link的索引 + string headLinkId = 3; + //车头所在link内的偏移量,单位为mm + int64 headLinkOffset = 4; + //车尾所在link的索引 + string tailLinkId = 5; + //车尾所在link内的偏移量,单位为mm + int64 tailLinkOffset = 6; + //列车所占用的link的索引的列表 + //顺序为从车头到车尾 + repeated string occupiedLinkIndex = 7; + //列车所在位置坡度值,1=1‰ + int32 slope = 8; + //列车所在位置坡度走势,1=上坡true,0=下坡false + bool upslope = 9; + //列车当前运行方向,1 =上行true 0 =下行false + bool runningUp = 10; + //实际运行阻力(总)(N)totalResistance,1=1KN + float runningResistanceSum = 11; + //阻力1(空气阻力)(N)airResistance,1=1KN + float airResistance = 12; + //阻力2(坡道阻力)(N)slopeResistance,1=1KN + float rampResistance = 13; + //阻力3(曲线阻力)(N)curveResistance,1=1KN + float curveResistance = 14; + //列车运行速度(m/s)speed,1=1km/h + int32 speed = 15; + //头车速传1速度值(m/s)headSpeed1,1=1km/h + int32 headSensorSpeed1 = 16; + //头车速度2速度值(m/s)headSpeed2,1=1km/h + int32 headSensorSpeed2 = 17; + //尾车速传1速度值(m/s)tailSpeed1,1=1km/h + int32 tailSensorSpeed1 = 18; + //尾车速度2速度值(m/s)tailSpeed2,1=1km/h + int32 tailSensorSpeed2 = 19; + //头车雷达速度值(m/s)headRadarSpeed,1=1km/h + int32 headRadarSpeed = 20; + //尾车雷达速度值(m/s)tailRadarSpeed,1=1km/h + int32 tailRadarSpeed = 21; + // 通讯中断 + bool udpInterruption = 22; + // 加速 + float acceleration = 23; +} + +// vobc发过来的列车信息 +message TrainMapVobcState { + //列车索引 + string id = 1; + // 生命信号 每个周期+1 + int32 lifeSignal = 2; + // TC1激活状态 1=激活 + bool tc1Active = 3; + // TC2激活状态 1=激活 + bool tc2Active = 4; + // 列车方向向前 1=方向向前 + bool directionForward = 5; + // 列车方向向后 1=方向向后 + bool directionBackward = 6; + // 列车牵引状态 1=牵引 + bool tractionStatus = 7; + // 列车制动状态 1=制动 + bool brakingStatus = 8; + // 列车紧急制动状态 1=紧急制动 + bool emergencyBrakingStatus = 9; + // 列车折返状态(AR) 1=折返 + bool turnbackStatus = 10; + // 跳跃状态 1=跳跃 + bool jumpStatus = 11; + // ATO模式 1=ATO模式 + bool ato = 12; + // FAM模式 1=FAM模式 + bool fam = 13; + // CAM模式 1=CAM模式 + bool cam = 14; + // 牵引安全回路 1=牵引安全切除 + bool tractionSafetyCircuit = 15; + // 停放制动状态 1=停放施加 + bool parkingBrakeStatus = 16; + // 保持制动状态 1=保持制动施加 + bool maintainBrakeStatus = 17; + // 列车牵引力 100=1KN + int64 tractionForce = 18; + // 列车制动力 100=1KN + int64 brakeForce = 19; + //【列车载荷 100=1ton + int64 trainLoad = 20; + // 列车开左门指令 1=开门 + bool leftDoorOpenCommand = 21; + // 列车开右门指令 1=开门 + bool rightDoorOpenCommand = 22; + // 列车关左门指令 1=关门 + bool leftDoorCloseCommand = 23; + // 列车关右门指令 1=关门 + bool rightDoorCloseCommand = 24; + // 整列车门关好 1=门关好 + bool allDoorClose = 25; + // 通讯中断 + bool udpInterruption = 26; + // 更新时间 + int64 updateTime = 27; +} + // 继电器状态 message ReplyState { // 继电器索引 @@ -336,7 +477,7 @@ message VariationStatus{ //仿真运行时的所有设备的状态 message AllDevicesStatus{ // 所有列车状态 - repeated TrainState trainState = 1; + repeated TrainMapState trainState = 1; // 所有道岔状态 repeated SwitchState switchState = 2; // 所有类型区段状态 @@ -357,6 +498,10 @@ message AllDevicesStatus{ repeated KeyState KeyState = 10; // 站场图站台状态 repeated PlatformState platformState = 11; + // 所有列车的动力学状态 + repeated TrainMapDynamicState trainDynamicState = 12; + // 所有列车的半实物状态 + repeated TrainMapVobcState trainVobcState = 13; } //服务器端向前端推送的设备状态信息