道岔状态

This commit is contained in:
Yuan 2023-07-20 13:49:31 +08:00
parent c538cad92a
commit 6800d67a23

View File

@ -7,65 +7,75 @@ option java_outer_classname = "DeviceStateProto";
//
//
enum SectionType{
Any=0;
enum SectionType {
Any = 0;
//
Axle=1;
Axle = 1;
//
Logic=2;
Logic = 2;
//
Physic=3;
Physic = 3;
}
//link的状态
message LinkState{
//link索引
string id = 1;
//link上的列车id列表
repeated string trainId = 2;
message LinkState {
// link索引
string id = 1;
// link上的列车id列表
repeated string trainId = 2;
}
//
message SectionState{
message SectionState {
//
string id = 1;
string id = 1;
//
SectionType type = 2;
//
//true-false-
bool occupied = 3;
// true-false-
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;
}
//
message SignalState{
message SignalState {
//
string id = 1;
string id = 1;
}
//
message PlatformState {
//
string id = 1;
}
//
message StationState {
//
string id = 1;
}
//
message TrainState{
message TrainState {
//
string id = 1;
string id = 1;
//
//true -
//false -
bool up = 2;
// true -
// false -
bool up = 2;
//link的索引
string headLinkId = 3;
string headLinkId = 3;
//link内的偏移量mm
int64 headLinkOffset = 4;
int64 headLinkOffset = 4;
//link的索引
string tailLinkId = 5;
string tailLinkId = 5;
//link内的偏移量mm
int64 tailLinkOffset = 6;
int64 tailLinkOffset = 6;
//link的索引的列表
//
repeated string occupiedLinkIndex = 7;
@ -74,21 +84,21 @@ message TrainState{
////////////////////////////////////////////////////////////////////////////
//仿
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;
}
//仿
message AllDevicesStatus{
message AllDevicesStatus {
//
repeated TrainState trainState = 1;
repeated TrainState trainState = 1;
//
repeated SwitchState switchState = 2;
//
@ -96,12 +106,12 @@ message AllDevicesStatus{
}
//
message PushedDevicesStatus{
//true-allStatus有效
//false - varStatus有效
bool all = 1;
message PushedDevicesStatus {
// true-allStatus有效
// false - varStatus有效
bool all = 1;
//
VariationStatus varStatus = 2;
VariationStatus varStatus = 2;
//
AllDevicesStatus allStatus = 3;
AllDevicesStatus allStatus = 3;
}