# Conflicts:
#	protos/device_state.proto
This commit is contained in:
xzb 2023-10-13 15:57:29 +08:00
commit b86f21606e
2 changed files with 122 additions and 97 deletions

View File

@ -9,54 +9,57 @@ option go_package = "./ats/verify/protos/state";
// //
enum SectionType{ enum SectionType{
Any=0; Any=0;
// //
Axle=1; Axle=1;
// //
Logic=2; Logic=2;
// //
Physic=3; Physic=3;
} }
//link的状态 //link的状态
message LinkState{ message LinkState{
//link索引 //link索引
string id = 1; string id = 1;
//link上的列车id列表 //link上的列车id列表
repeated string trainId = 2; repeated string trainId = 2;
} }
// //
message SectionState{ message SectionState{
// //
string id = 1; string id = 1;
// //
SectionType type = 2; SectionType type = 2;
// //
//true-false- //true-false-
bool occupied = 3; bool occupied = 3;
} }
// //
message SwitchState{ message SwitchState{
// //
string id = 1; string id = 1;
//() //()
bool normal = 2; bool normal = 2;
// //
bool reverse = 3; bool reverse = 3;
//() //()
bool dw = 4; bool dw = 4;
// //
bool fw = 5; bool fw = 5;
} }
// //
message SignalState{ message SignalState{
// //
string id = 1; string id = 1;
//
repeated Signal.Light light = 2;
} }
// //
message Signal { message Signal {
//
enum Aspect { enum Aspect {
// //
OFF = 0; OFF = 0;
@ -64,59 +67,66 @@ message Signal {
ON = 1; ON = 1;
//绿 //绿
L = 2; L = 2;
// //
H = 3; H = 3;
// //
U = 4; U = 4;
// //
HU= 5; HU= 5;
// //
B=6; B=6;
// //
A=7; A=7;
} }
//
message Light{
//()
Aspect color = 1;
//true-false-
bool display = 2;
}
} }
// //
message PlatformState{ message PlatformState{
// //
string id = 1; string id = 1;
} }
// //
message StationState{ message StationState{
// //
string id = 1; string id = 1;
} }
// //
message TrainState{ message TrainState{
// //
string id = 1; string id = 1;
//link运行方向 //link运行方向
bool up = 2; bool up = 2;
// //
float speed = 3; float speed = 3;
//,1=1mm //,1=1mm
int64 trainLength = 4; int64 trainLength = 4;
// //
bool show = 5; bool show = 5;
// ID // ID
string headDeviceId = 6; string headDeviceId = 6;
// //
int64 headOffset = 7; int64 headOffset = 7;
// //
string devicePort = 8; string devicePort = 8;
// (A-B,-> ) // (A-B,-> )
bool pointTo = 9; bool pointTo = 9;
// -> -> // -> ->
bool runDirection = 10; bool runDirection = 10;
// //
bool headDirection = 11; bool headDirection = 11;
// //
TrainDynamicState dynamicState = 12; TrainDynamicState dynamicState = 12;
// //
TrainVobcState vobcState = 13; TrainVobcState vobcState = 13;
// //
int64 trainKilometer = 14; int64 trainKilometer = 14;
} }
// //
@ -234,39 +244,41 @@ message ReplyState {
//仿 //仿
message VariationStatus{ message VariationStatus{
// //
repeated TrainState updatedTrain = 1; repeated TrainState updatedTrain = 1;
// //
repeated string removedTrainId = 2; repeated string removedTrainId = 2;
// //
repeated SwitchState updatedSwitch = 3; repeated SwitchState updatedSwitch = 3;
// //
repeated SectionState updatedSection = 4; repeated SectionState updatedSection = 4;
// //
repeated ReplyState updatedReply = 5; repeated ReplyState updatedReply = 5;
} }
//仿 //仿
message AllDevicesStatus{ message AllDevicesStatus{
// //
repeated TrainState trainState = 1; repeated TrainState trainState = 1;
// //
repeated SwitchState switchState = 2; repeated SwitchState switchState = 2;
// //
repeated SectionState sectionState = 3; repeated SectionState sectionState = 3;
// //
repeated ReplyState replyState = 4; repeated ReplyState replyState = 4;
//
repeated SignalState signalState = 5;
} }
// //
message PushedDevicesStatus{ message PushedDevicesStatus{
//true-allStatus有效 //true-allStatus有效
//false - varStatus有效 //false - varStatus有效
bool all = 1; bool all = 1;
// //
VariationStatus varStatus = 2; VariationStatus varStatus = 2;
// //
AllDevicesStatus allStatus = 3; AllDevicesStatus allStatus = 3;
} }
// 仿 // 仿

View File

@ -12,6 +12,7 @@ message IBPGraphicStorage {
repeated IBPText IBPTexts = 6; repeated IBPText IBPTexts = 6;
// UniqueIdType UniqueIdPrefix = 7; // UniqueIdType UniqueIdPrefix = 7;
repeated IbpRelatedDevice ibpRelatedDevices = 8; repeated IbpRelatedDevice ibpRelatedDevices = 8;
repeated IbpLight ibpLights = 9;
} }
message IBPButton { message IBPButton {
@ -54,6 +55,18 @@ message IbpArrow {
repeated graphicData.Point points = 3; repeated graphicData.Point points = 3;
} }
message IbpLight {
enum IbpLightColor {
white = 0;
red = 1;
green = 2;
blue = 3;
}
graphicData.CommonInfo common = 1;
IbpLightColor color = 2;
string code = 3;
}
// message UniqueIdType { // message UniqueIdType {
// string city = 1; // // string city = 1; //
// string lineId = 2; //线 // string lineId = 2; //线