From d6d6168ac1cc6225098b3aeac21f746cecc87bd3 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 26 Jun 2023 08:54:56 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E5=88=97?= =?UTF-8?q?=E8=BD=A6=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_status.proto | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/protos/device_status.proto b/protos/device_status.proto index e52b8b7..5d4ad20 100644 --- a/protos/device_status.proto +++ b/protos/device_status.proto @@ -250,7 +250,6 @@ message OccNccFepNetwork{ // 2.7.8 列车状态信息 message Train { - // 基础信息 // 列车表号 string trainId = 1; @@ -269,7 +268,6 @@ message Train { // 速度 float speed = 6; - // 信息消息 // 运行方向 int32 direction = 7; @@ -326,6 +324,21 @@ message Train { // 列车标示号,全线唯一 string trainIndex = 25; + + // 编组数量 + int32 rollingStock = 26; + + // 计划偏离时间 + int32 otpTime = 27; + + // 集中站站号 + int32 rtuId = 28; + + // 到点 + bytes arriveTime = 29; + + // 发点 + bytes departTime = 30; } From 6f2622cd7ffbebc42d4af8bac4e79116e8ab6a0b Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 26 Jun 2023 09:04:00 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E7=B1=BB=E5=9E=8B=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/device_status.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protos/device_status.proto b/protos/device_status.proto index 5d4ad20..8699389 100644 --- a/protos/device_status.proto +++ b/protos/device_status.proto @@ -335,10 +335,10 @@ message Train { int32 rtuId = 28; // 到点 - bytes arriveTime = 29; + int64 arriveTime = 29; // 发点 - bytes departTime = 30; + int64 departTime = 30; } From 911d1999d0df58db7fefb59471487bd5c524269f Mon Sep 17 00:00:00 2001 From: tiger_zhou Date: Mon, 26 Jun 2023 09:56:38 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E7=BA=BF=E8=B7=AF=E6=A8=A1=E6=8B=9F?= =?UTF-8?q?=E8=AE=A2=E9=98=85=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/device_status.proto | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/protos/device_status.proto b/protos/device_status.proto index 8699389..690c7ad 100644 --- a/protos/device_status.proto +++ b/protos/device_status.proto @@ -3,6 +3,21 @@ syntax = "proto3"; package state; //模型的可变的状态数据 option java_package = "club.joylink.xiannccda.dto.protos"; option java_outer_classname = "DeviceStatusProto"; +enum DeviceType{ + UNKNOW = 0; + RTU = 1; + STATION = 2; + SIGNAL = 3; + SWITCH = 4; + TRACK = 5; + ENTRY = 6; + PLATFORM = 7; + SCADA = 8; + WATERPROOF_DOOR = 9; + WORK_AREA = 10; + GAMA = 11; + +} message Rtu{ bool ipRtuStusDown = 1; @@ -339,6 +354,8 @@ message Train { // 发点 int64 departTime = 30; + //车次号变化状态 + bool type = 31; } From 32ac71bd13424f2e1cb2880f823b810cc3e5e4fc Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 26 Jun 2023 14:34:25 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E3=80=90=E5=8F=91=E5=B8=83=E6=97=B6?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E7=9A=84=E5=8C=BA=E6=AE=B5=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/section_status.proto | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 protos/section_status.proto diff --git a/protos/section_status.proto b/protos/section_status.proto new file mode 100644 index 0000000..3854325 --- /dev/null +++ b/protos/section_status.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +package state; +option java_package = "club.joylink.xiannccda.dto.protos"; +option java_outer_classname = "SectionProto"; + +message Section { + // 区段编码 + string code = 1; + + // 左侧区段 + Section leftSection = 2; + + // 右侧区段 + Section rightSection = 3; + + // 是否计轴区段 + bool axleCounter = 4; + + // 关联区段 + repeated Section logicList = 5; +} + From f69dbc04a0ac2418ea45bbbedd5e83ebeaeb118f Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 26 Jun 2023 14:38:15 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E5=8C=BA=E6=AE=B5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=85=AC=E9=87=8C=E6=A0=87=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/section_status.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/protos/section_status.proto b/protos/section_status.proto index 3854325..97a840f 100644 --- a/protos/section_status.proto +++ b/protos/section_status.proto @@ -19,5 +19,11 @@ message Section { // 关联区段 repeated Section logicList = 5; + + // 左侧公里标 + string leftKilometerCode = 6; + + // 右侧公里标 + string rightKilometerCode = 7; } From a2006168c30fbfc52425de42c159402cc20066e6 Mon Sep 17 00:00:00 2001 From: tiger_zhou Date: Mon, 26 Jun 2023 14:47:27 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=8B=86=E5=88=86=E5=88=97=E8=BD=A6?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/device_status.proto | 94 ---------------------- protos/train.proto | 158 +++++++++++++++++++++++++++++++++++++ protos/ws_message.proto | 5 +- 3 files changed, 161 insertions(+), 96 deletions(-) create mode 100644 protos/train.proto diff --git a/protos/device_status.proto b/protos/device_status.proto index 690c7ad..fd29d73 100644 --- a/protos/device_status.proto +++ b/protos/device_status.proto @@ -263,99 +263,5 @@ message OccNccFepNetwork{ bool active = 2; } -// 2.7.8 列车状态信息 -message Train { - // 列车表号 - string trainId = 1; - - // 列车车次号 - string globalId = 2; - - // 列车车组号 - string groupId = 3; - - // 局部序列号 - int32 localSubId = 4; - - // 列车类型 - int32 trainType = 5; - - // 速度 - float speed = 6; - - // 运行方向 - int32 direction = 7; - - // 目的地ID - int32 destinationId = 8; - - // 行驶站号 - int32 stationId = 9; - - // 站台号 - int32 sideId = 10; - - // 轨道名称 - string trackName = 11; - - // 到发点类型 - bool recordType = 12; - - // 到发时间 - int64 recordTime = 13; - - // 司机号 - string driverId = 14; - - // 运行路径号 - int32 routeId = 15; - - // 列车状态 - int32 mode = 16; - - // 车次窗编号 - int32 nccWindow = 17; - - // 车次窗位置 - int32 nccWindowOffset = 18; - - // 满载率 - int32 rate = 19; - - // 所在设备类型 - int32 devType = 20; - - // 所在设备名称 - string devName = 21; - - // 阻塞标记 - int32 blockFlag = 22; - - //是否显示 - bool show = 23; - - //线路id - int32 lineId = 24; - - // 列车标示号,全线唯一 - string trainIndex = 25; - - // 编组数量 - int32 rollingStock = 26; - - // 计划偏离时间 - int32 otpTime = 27; - - // 集中站站号 - int32 rtuId = 28; - - // 到点 - int64 arriveTime = 29; - - // 发点 - int64 departTime = 30; - //车次号变化状态 - bool type = 31; -} diff --git a/protos/train.proto b/protos/train.proto new file mode 100644 index 0000000..7e46d24 --- /dev/null +++ b/protos/train.proto @@ -0,0 +1,158 @@ +syntax = "proto3"; + +package train; //模型的可变的状态数据 +import "device_status.proto"; +option java_package = "club.joylink.xiannccda.dto.protos"; +option java_outer_classname = "TrainProto"; + +// 2.7.8 列车状态信息 +message TrainInfo { + //线路id + int32 lineId = 1; + // 集中站站号 + int32 rtuId = 2; + NccWindow window = 3; + // 所在设备类型 + state.DeviceType devType = 4; + // 所在设备名称 + string devName = 5; + // 列车标示号,全线唯一 + string trainIndex = 6; + // 列车车组号 + string groupId = 7; + // 列车表号 + string trainId = 8; + // 列车车次号 + string globalId = 9; + // 目的地ID + int32 destinationId = 10; + // 编组数量 + int32 rollingStock = 11; + // 司机号 + string driverId = 12; + // 计划偏离时间 + int32 otpTime = 13; + // 列车状态 + int32 mode = 14; + // 到点 + int64 arriveTime = 15; + // 发点 + int64 departTime = 16; + // 速度 + float speed = 17; + //是否显示 + bool show = 18; + //车次号变化状态 true=添加;false = 更新 + bool type = 19; + //运行路径号(若无法提供,缺省值为0) + int32 routeId = 20; + //满载率 + int32 rate = 21; +} +message NccWindow{ + int32 nccWindow = 1; + int32 nccWinOffset = 2; +} +//列车删除消息 +message TrainRemove{ + // 线路号 + int32 lineId = 1; + // 集中站站号 + + int32 rtuId = 2; + // NCC车次窗编号 + // 列车在车次窗中的位置 + NccWindow window = 3; + // 列车所在的设备的类型 + + state.DeviceType deviceType = 4; + // 列车所在的设备的名称 + + string devName = 5; + // 列车标示号,全线唯一(若无法提供,缺省值为0) + int32 trainIndex = 6; + // 列车编组号 + string groupId = 7; +} + +//2.7.13 列车阻塞消息 +message TrainBlock{ + // 线路号 + int32 lineId = 1; + // 列车编组号 + string groupId = 2; + // 表号 + string trainId = 3; + // 方向 + // 0:上行 + // 1:下行 + // 2:未知 + int32 direction = 4; + // 列车所在区间左边车站的站号 + + int32 stationIDInUpSide = 5; + // 列车所在区间右边车站的站号 + + int32 stationIDInDownSide = 6; + // 集中站站号 + + int32 rtuId = 7; + // 列车所在的设备的类型 + + state.DeviceType deviceType = 8; + // 列车所在的设备的名称 + + string DevName = 9; + // 列车阻塞标记 + // 1:列车阻塞 + // 0:列车没有阻塞 + + int32 blockFlag = 10; + +} + +//列车报点消息 +message TrainRecord{ + /** 线路号(2) */ + int32 lineId = 1; + /** 表号(9) */ + string trainId = 2; + /** 车次号(12) */ + string globalId = 3; + /** 局部序列号(4) */ + int32 localSubId = 4; + /** 车组号(9) */ + string groupId = 5; + /** 目的地(4) */ + int32 destinationId = 6; + /** +* 列车类型(2) 1:计划车
+* 2:头码车
+* 3:M0车
+* 4:MM车
+*/ + int32 trainType = 7; + /** + * 运行方向(1) 1:下行
+ * 2:上行
+ * 0:无方向
+ */ + int32 dir = 8; + /** 站号(2) */ + int32 stationId = 9; + /** 站台编号(2) */ + int32 sideId = 10; + /** 轨道名称(小区段名称)(20) */ + string trackName = 11; + /** + * 到发点类型(2)
+ * 0x01H:到达
+ * 0x02H:出发
+ * true-到达,false-出发 + */ + bool recordType = 12; + /** 到发时间(7) */ + int64 recordTime = 13; + +} + diff --git a/protos/ws_message.proto b/protos/ws_message.proto index ea234d8..af3b2e6 100644 --- a/protos/ws_message.proto +++ b/protos/ws_message.proto @@ -2,6 +2,7 @@ syntax = "proto3"; package state; //模型的可变的状态数据 import "device_status.proto"; +import "train.proto"; import "LineNetTrainOffsetDiagram.proto"; option java_package = "club.joylink.xiannccda.dto.protos"; option java_outer_classname = "WsMessageProto"; @@ -34,7 +35,7 @@ message WsLineMessage { //信息源网络状态消息 repeated state.OccNccFepNetwork netWork = 13; //列车信息 - repeated state.Train train = 14; + repeated train.TrainInfo train = 14; } // 线网信息 @@ -44,5 +45,5 @@ message WsLineNetMessage { repeated diagram.LineNetTrainOffsetDiagram diagram = 1; //列车信息 - repeated state.Train train = 2; + repeated train.TrainInfo train = 2; } From ff4d94b1b36fd0f036262a2003a34d6012110b59 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 26 Jun 2023 15:00:44 +0800 Subject: [PATCH 07/10] =?UTF-8?q?websocket=E7=BA=BF=E7=BD=91=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E4=BD=8D=E7=BD=AE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/ws_message.proto | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/protos/ws_message.proto b/protos/ws_message.proto index af3b2e6..1053786 100644 --- a/protos/ws_message.proto +++ b/protos/ws_message.proto @@ -42,8 +42,27 @@ message WsLineMessage { message WsLineNetMessage { //线网车辆位置 - repeated diagram.LineNetTrainOffsetDiagram diagram = 1; - - //列车信息 - repeated train.TrainInfo train = 2; + repeated WsLineNetTrainOffsetMessage offset = 1; } + +// 线网列车位置信息 +message WsLineNetTrainOffsetMessage { + //线路id + int32 lineId = 1; + + // 列车标示号,全线唯一 + string trainIndex = 2; + + // 目的地ID + int32 destinationId = 3; + + //是否显示 + bool show = 4; + + // 列车公里标 + string kilometerCode = 5; + + // 运行方向 + int32 dir = 6; +} + From b5d0bb7fedf61cfe5cdfdfc75637bd02c875b19c Mon Sep 17 00:00:00 2001 From: tiger_zhou Date: Mon, 26 Jun 2023 15:32:25 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E5=88=97=E8=BD=A6=E6=95=B0=E6=8D=AEmode?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/train.proto | 5 +++-- protos/ws_message.proto | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/protos/train.proto b/protos/train.proto index 7e46d24..6d3d1ce 100644 --- a/protos/train.proto +++ b/protos/train.proto @@ -33,7 +33,8 @@ message TrainInfo { // 计划偏离时间 int32 otpTime = 13; // 列车状态 - int32 mode = 14; + // int32 mode = 14; + state.TrainMode mode = 14; // 到点 int64 arriveTime = 15; // 发点 @@ -70,7 +71,7 @@ message TrainRemove{ string devName = 5; // 列车标示号,全线唯一(若无法提供,缺省值为0) - int32 trainIndex = 6; + string trainIndex = 6; // 列车编组号 string groupId = 7; } diff --git a/protos/ws_message.proto b/protos/ws_message.proto index 1053786..91fac50 100644 --- a/protos/ws_message.proto +++ b/protos/ws_message.proto @@ -31,11 +31,11 @@ message WsLineMessage { //区域自动驾驶 repeated state.Gama gama = 11; //列车模式 - repeated state.TrainMode trainMode = 12; + // repeated state.TrainMode trainMode = 12; //信息源网络状态消息 - repeated state.OccNccFepNetwork netWork = 13; + repeated state.OccNccFepNetwork netWork = 12; //列车信息 - repeated train.TrainInfo train = 14; + repeated train.TrainInfo train = 13; } // 线网信息 From fcd6072d5b5b595c43967d97f9c3da626c943cf8 Mon Sep 17 00:00:00 2001 From: weizhihong Date: Mon, 26 Jun 2023 16:48:02 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E8=BD=A6?= =?UTF-8?q?=E7=BB=84=E5=8F=B7=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/ws_message.proto | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/protos/ws_message.proto b/protos/ws_message.proto index 91fac50..b643479 100644 --- a/protos/ws_message.proto +++ b/protos/ws_message.proto @@ -53,16 +53,19 @@ message WsLineNetTrainOffsetMessage { // 列车标示号,全线唯一 string trainIndex = 2; + // 车组号 + string groupId = 3; + // 目的地ID - int32 destinationId = 3; + int32 destinationId = 4; //是否显示 - bool show = 4; + bool show = 5; // 列车公里标 - string kilometerCode = 5; + string kilometerCode = 6; // 运行方向 - int32 dir = 6; + int32 dir = 7; } From 157f3ff8b29405a7f6bdf4fc1c0d0632fe4b216b Mon Sep 17 00:00:00 2001 From: fan Date: Mon, 26 Jun 2023 17:22:22 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E7=BA=BF=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protos/stationLayoutGraphics.proto | 1 + 1 file changed, 1 insertion(+) diff --git a/protos/stationLayoutGraphics.proto b/protos/stationLayoutGraphics.proto index d5bcdfb..becc110 100644 --- a/protos/stationLayoutGraphics.proto +++ b/protos/stationLayoutGraphics.proto @@ -164,6 +164,7 @@ message RunLine { string nameBgColor = 5; string upPathLineId = 6; string downPathLineId = 7; + repeated string containSta = 8; } message Section {