拆分列车信息

This commit is contained in:
tiger_zhou 2023-06-26 14:47:27 +08:00
parent f69dbc04a0
commit a2006168c3
3 changed files with 161 additions and 96 deletions

View File

@ -263,99 +263,5 @@ message OccNccFepNetwork{
bool active = 2; 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;
}

158
protos/train.proto Normal file
View File

@ -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<br>
* 2<br>
* 3M0车<br>
* 4MM车<br>
*/
int32 trainType = 7;
/**
* (1) 1 <br>
* 2<br>
* 0<br>
*/
int32 dir = 8;
/** 站号(2) */
int32 stationId = 9;
/** 站台编号(2) */
int32 sideId = 10;
/** 轨道名称(小区段名称)(20) */
string trackName = 11;
/**
* (2)<br>
* 0x01H<br>
* 0x02H<br>
* true-false-
*/
bool recordType = 12;
/** 到发时间(7) */
int64 recordTime = 13;
}

View File

@ -2,6 +2,7 @@ syntax = "proto3";
package state; // package state; //
import "device_status.proto"; import "device_status.proto";
import "train.proto";
import "LineNetTrainOffsetDiagram.proto"; import "LineNetTrainOffsetDiagram.proto";
option java_package = "club.joylink.xiannccda.dto.protos"; option java_package = "club.joylink.xiannccda.dto.protos";
option java_outer_classname = "WsMessageProto"; option java_outer_classname = "WsMessageProto";
@ -34,7 +35,7 @@ message WsLineMessage {
// //
repeated state.OccNccFepNetwork netWork = 13; 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 diagram.LineNetTrainOffsetDiagram diagram = 1;
// //
repeated state.Train train = 2; repeated train.TrainInfo train = 2;
} }