From c7ee997a5efe4d07da79bbad667fec38c9da4da8 Mon Sep 17 00:00:00 2001 From: tiger_zhou Date: Thu, 18 Jan 2024 16:04:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E5=8A=9B=E5=AD=A6=E5=88=97=E8=BD=A6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/common_data.proto | 6 ++-- protos/device_state.proto | 46 ++++++++++++++++++++++++++++-- protos/stationLayoutGraphics.proto | 4 +-- 3 files changed, 48 insertions(+), 8 deletions(-) diff --git a/protos/common_data.proto b/protos/common_data.proto index b6edace..3d36950 100644 --- a/protos/common_data.proto +++ b/protos/common_data.proto @@ -30,7 +30,7 @@ message TrainDynamicConfig{ bool jump=9; //打滑(%) float slip=10; - //前溜/后溜(mm)(正数前溜,负数后溜) + //前溜/后溜(m/s)(正数前溜,负数后溜) int32 slide = 11; //过标/欠标(mm)(正数过标,负数欠标) int32 stopSign=12; @@ -44,8 +44,8 @@ message TrainEndsState{ bool speedSensorEnableB = 2; //雷达是否有效 bool radarEnable = 3; - //雷达测速数值 - float radarCheckSpeed = 4; + //雷达测速差值(米/秒) + float radarCheckSpeedDiff = 4; //雷达检测时间(秒) int32 radarCheckTime = 5; } diff --git a/protos/device_state.proto b/protos/device_state.proto index e5ca9cc..cccc1ae 100644 --- a/protos/device_state.proto +++ b/protos/device_state.proto @@ -396,13 +396,53 @@ message TrainMapState{ // 通讯中断 bool vobcInterruption = 61; //列车动力学配置 - common.TrainDynamicConfig trainDynamicConfig = 62; + TrainDynamicConfigMqtt trainDynamicConfig = 62; //列车A端 - common.TrainEndsState trainEndsA = 63; + TrainEndsStateMqtt trainEndsA = 63; //列车B端 - common.TrainEndsState trainEndsB = 64; + TrainEndsStateMqtt trainEndsB = 64; } +//动力学相关参数返回数据,因golang float类型数据序列化后丢失精度故使用string +//此类型需要与 common_data 中的 TrainDynamicConfig类型属性保持一致 +message TrainDynamicConfigMqtt{ + //基本阻力参数A 原本数据:float + string baseResistanceParamA=1; + // 基本阻力参数B 原本数据:float + string baseResistanceParamB=2; + // 基本阻力参数C 原本数据:float + string baseResistanceParamC=3; + //曲线阻力参数R1 原本数据:float + string curveResistanceParamR1=4; + // 曲线阻力参数R2 原本数据:float + string curveResistanceParamR2=5; + // 曲线阻力参数R3 原本数据:float + string curveResistanceParamR3=6; + // 曲线阻力参数R4 原本数据:float + string curveResistanceParamR4=7; + //旋转质量参数 原本数据:float + string revolvingMassParam=8; + //是否跳跃 + bool jump=9; + //打滑(%) 原本数据:float + string slip=10; + //前溜/后溜(m/s)(正数前溜,负数后溜) + int32 slide = 11; + //过标/欠标(mm)(正数过标,负数欠标) + int32 stopSign=12; +} +//列车一端的状态 +message TrainEndsStateMqtt{ + //速度传感器 + bool speedSensorEnableA = 1; + bool speedSensorEnableB = 2; + //雷达是否有效 + bool radarEnable = 3; + //雷达测速差值(米/秒) 原本数据:float + string radarCheckSpeedDiff = 4; + //雷达检测时间(秒) + int32 radarCheckTime = 5; +} // 继电器状态 message ReplyState { // 继电器索引 diff --git a/protos/stationLayoutGraphics.proto b/protos/stationLayoutGraphics.proto index 26fda99..506bab6 100644 --- a/protos/stationLayoutGraphics.proto +++ b/protos/stationLayoutGraphics.proto @@ -657,8 +657,8 @@ message Train { TrainModel trainModel = 1; // 车型 int32 carriageLength = 2; // 列车车厢长度 int32 totalLength = 3; // 总长度 - int32 minDiameter = 4; // 车轮的最小直径 - int32 maxDiameter = 5; // 车轮的最大直径 +// int32 minDiameter = 4; // 车轮的最小直径 +// int32 maxDiameter = 5; // 车轮的最大直径 string trainSets = 6; // 编组 common.TrainDynamicConfig dynamicConfig = 7; //动力学参数 }