Merge branch 'master' of git.code.tencent.com:xian-ncc-da/xian-ncc-da-message

This commit is contained in:
Yuan 2023-06-27 09:54:09 +08:00
commit 93b999dd97
5 changed files with 234 additions and 86 deletions

View File

@ -3,6 +3,21 @@ syntax = "proto3";
package state; // package state; //
option java_package = "club.joylink.xiannccda.dto.protos"; option java_package = "club.joylink.xiannccda.dto.protos";
option java_outer_classname = "DeviceStatusProto"; 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{ message Rtu{
bool ipRtuStusDown = 1; bool ipRtuStusDown = 1;
@ -248,84 +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;
}

View File

@ -0,0 +1,29 @@
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;
//
string leftKilometerCode = 6;
//
string rightKilometerCode = 7;
}

View File

@ -164,6 +164,7 @@ message RunLine {
string nameBgColor = 5; string nameBgColor = 5;
string upPathLineId = 6; string upPathLineId = 6;
string downPathLineId = 7; string downPathLineId = 7;
repeated string containSta = 8;
} }
message Section { message Section {

159
protos/train.proto Normal file
View File

@ -0,0 +1,159 @@
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;
state.TrainMode 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
string 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";
@ -30,19 +31,41 @@ message WsLineMessage {
// //
repeated state.Gama gama = 11; 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 state.Train train = 14; repeated train.TrainInfo train = 13;
} }
// 线 // 线
message WsLineNetMessage { message WsLineNetMessage {
//线 //线
repeated diagram.LineNetTrainOffsetDiagram diagram = 1; repeated WsLineNetTrainOffsetMessage offset = 1;
//
repeated state.Train train = 2;
} }
// 线
message WsLineNetTrainOffsetMessage {
//线id
int32 lineId = 1;
// 线
string trainIndex = 2;
//
string groupId = 3;
// ID
int32 destinationId = 4;
//
bool show = 5;
//
string kilometerCode = 6;
//
int32 dir = 7;
}