# 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{
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;
//
string id = 1;
//
repeated Signal.Light light = 2;
}
//
//
message Signal {
//
enum Aspect {
//
OFF = 0;
@ -64,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;
}
//
@ -139,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
@ -151,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
@ -193,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=
@ -234,39 +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;
}
// 仿

View File

@ -12,6 +12,7 @@ message IBPGraphicStorage {
repeated IBPText IBPTexts = 6;
// UniqueIdType UniqueIdPrefix = 7;
repeated IbpRelatedDevice ibpRelatedDevices = 8;
repeated IbpLight ibpLights = 9;
}
message IBPButton {
@ -54,6 +55,18 @@ message IbpArrow {
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 {
// string city = 1; //
// string lineId = 2; //线