信号机状态推送

This commit is contained in:
xzb 2023-10-13 15:53:32 +08:00
parent bbead938bb
commit 62c82bd041

View File

@ -9,56 +9,57 @@ option go_package = "./ats/verify/protos/state";
//
enum SectionType{
Any=0;
//
Axle=1;
//
Logic=2;
//
Physic=3;
Any=0;
//
Axle=1;
//
Logic=2;
//
Physic=3;
}
//link的状态
message LinkState{
//link索引
string id = 1;
//link上的列车id列表
repeated string trainId = 2;
//link索引
string id = 1;
//link上的列车id列表
repeated string trainId = 2;
}
//
message SectionState{
//
string id = 1;
//
SectionType type = 2;
//
//true-false-
bool occupied = 3;
//
string id = 1;
//
SectionType type = 2;
//
//true-false-
bool occupied = 3;
}
//
message SwitchState{
//
string id = 1;
//()
bool normal = 2;
//
bool reverse = 3;
//()
bool dw = 4;
//
bool fw = 5;
//
string id = 1;
//()
bool normal = 2;
//
bool reverse = 3;
//()
bool dw = 4;
//
bool fw = 5;
}
//
message SignalState{
//
string id = 1;
//
Signal.Aspect aspect = 2;
//
string id = 1;
//
repeated Signal.Light light = 2;
}
//
//
message Signal {
//
enum Aspect {
//
OFF = 0;
@ -66,59 +67,66 @@ message Signal {
ON = 1;
//绿
L = 2;
//
//
H = 3;
//
//
U = 4;
//
//
HU= 5;
//
//
B=6;
//
//
A=7;
}
//
message Light{
//()
Aspect color = 1;
//true-false-
bool display = 2;
}
}
//
message PlatformState{
//
string id = 1;
//
string id = 1;
}
//
message StationState{
//
string id = 1;
//
string id = 1;
}
//
message TrainState{
//
string id = 1;
//link运行方向
bool up = 2;
//
float speed = 3;
//,1=1mm
int64 trainLength = 4;
//
bool show = 5;
// ID
string headDeviceId = 6;
//
int64 headOffset = 7;
//
string devicePort = 8;
// (A-B,-> )
bool pointTo = 9;
// -> ->
bool runDirection = 10;
//
bool headDirection = 11;
//
TrainDynamicState dynamicState = 12;
//
TrainVobcState vobcState = 13;
//
int64 trainKilometer = 14;
//
string id = 1;
//link运行方向
bool up = 2;
//
float speed = 3;
//,1=1mm
int64 trainLength = 4;
//
bool show = 5;
// ID
string headDeviceId = 6;
//
int64 headOffset = 7;
//
string devicePort = 8;
// (A-B,-> )
bool pointTo = 9;
// -> ->
bool runDirection = 10;
//
bool headDirection = 11;
//
TrainDynamicState dynamicState = 12;
//
TrainVobcState vobcState = 13;
//
int64 trainKilometer = 14;
}
//
@ -141,7 +149,7 @@ message TrainDynamicState {
//,1=true0=false
bool upslope = 8;
//,1 =true 0 =false
bool runningUp = 9;
bool runningUp = 9;
//NtotalResistance,1=1KN
float runningResistanceSum = 10;
//1NairResistance,1=1KN
@ -153,7 +161,7 @@ message TrainDynamicState {
//m/sspeed,1=1km/h
int32 speed = 14;
//1m/sheadSpeed1,1=1km/h
int32 headSensorSpeed1 = 15;
int32 headSensorSpeed1 = 15;
//2m/sheadSpeed2,1=1km/h
int32 headSensorSpeed2 = 16;
//1m/stailSpeed1,1=1km/h
@ -195,9 +203,9 @@ message TrainVobcState {
// ATO模式 1=ATO模式
bool ato = 11;
// FAM模式 1=FAM模式
bool fam = 12;
bool fam = 12;
// CAM模式 1=CAM模式
bool cam = 13;
bool cam = 13;
// 1=
bool tractionSafetyCircuit = 14;
// 1=
@ -236,41 +244,41 @@ message ReplyState {
//仿
message VariationStatus{
//
repeated TrainState updatedTrain = 1;
//
repeated string removedTrainId = 2;
//
repeated SwitchState updatedSwitch = 3;
//
repeated SectionState updatedSection = 4;
//
repeated ReplyState updatedReply = 5;
//
repeated TrainState updatedTrain = 1;
//
repeated string removedTrainId = 2;
//
repeated SwitchState updatedSwitch = 3;
//
repeated SectionState updatedSection = 4;
//
repeated ReplyState updatedReply = 5;
}
//仿
message AllDevicesStatus{
//
repeated TrainState trainState = 1;
//
repeated SwitchState switchState = 2;
//
repeated SectionState sectionState = 3;
//
repeated ReplyState replyState = 4;
//
repeated TrainState trainState = 1;
//
repeated SwitchState switchState = 2;
//
repeated SectionState sectionState = 3;
//
repeated ReplyState replyState = 4;
//
repeated SignalState signalState = 5;
}
//
message PushedDevicesStatus{
//true-allStatus有效
//false - varStatus有效
bool all = 1;
//
VariationStatus varStatus = 2;
//
AllDevicesStatus allStatus = 3;
//true-allStatus有效
//false - varStatus有效
bool all = 1;
//
VariationStatus varStatus = 2;
//
AllDevicesStatus allStatus = 3;
}
// 仿