proto文件增加设备状态;实现应答器的相关接口

This commit is contained in:
joylink_zhangsai 2024-01-10 14:05:58 +08:00
parent 999608fa88
commit 00828fb909

View File

@ -1,517 +1,528 @@
syntax = "proto3"; syntax = "proto3";
import "stationLayoutGraphics.proto";
package state; package state;
option java_package = "club.joylink.bjrtss.ats.verify.protos"; option java_package = "club.joylink.bjrtss.ats.verify.protos";
option java_outer_classname = "DeviceStateProto"; option java_outer_classname = "DeviceStateProto";
option go_package = "./ts/protos/state"; option go_package = "./ts/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索引
uint32 id = 1; uint32 id = 1;
//link上的列车id列表 //link上的列车id列表
repeated string trainId = 2; repeated string trainId = 2;
} }
// //
message SectionState{ message SectionState{
// //
uint32 id = 1; uint32 id = 1;
// //
//true-false- //true-false-
bool occupied = 3; bool occupied = 3;
// //
bool axleFault = 4; bool axleFault = 4;
} }
// //
message SwitchState{ message SwitchState{
// //
uint32 id = 1; uint32 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;
// () // ()
bool force = 6; bool force = 6;
// //
bool sb = 7; bool sb = 7;
// //
bool dwsb = 8; bool dwsb = 8;
// //
bool fwsb = 9; bool fwsb = 9;
// //
bool jc = 10; bool jc = 10;
// //
bool qdc = 11; bool qdc = 11;
// //
bool qfc = 12; bool qfc = 12;
// //
bool qyc = 13; bool qyc = 13;
// //
bool dc = 14; bool dc = 14;
// //
bool fc = 15; bool fc = 15;
// //
bool yc = 16; bool yc = 16;
// //
bool occupied = 17; bool occupied = 17;
} }
// //
message SignalState{ message SignalState{
// //
uint32 id = 1; uint32 id = 1;
// //
Signal.Aspect aspect = 2; Signal.Aspect aspect = 2;
} }
// //
message Signal { message Signal {
// //
enum Aspect { enum Aspect {
// //
Non = 0; Non = 0;
// //
OFF = 1; OFF = 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 PlatformState{ message PlatformState{
// //
uint32 id = 1; uint32 id = 1;
// EMP继电器状态 // EMP继电器状态
bool empj = 2; bool empj = 2;
// SPKS继电器状态 // SPKS继电器状态
repeated ReplyState spksState = 3; repeated ReplyState spksState = 3;
// //
MkxJState mkxJState = 4; MkxJState mkxJState = 4;
} }
// //
message StationState{ message StationState{
// //
uint32 id = 1; uint32 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
uint32 headDeviceId = 6; uint32 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;
// //
int64 controlDelayTime = 15; int64 controlDelayTime = 15;
// //
int32 wheelDiameter = 16; int32 wheelDiameter = 16;
} }
// //
message TrainDynamicState { message TrainDynamicState {
// +1 // +1
int32 heartbeat = 1; int32 heartbeat = 1;
//link的索引 //link的索引
string headLinkId = 2; string headLinkId = 2;
//link内的偏移量mm //link内的偏移量mm
int64 headLinkOffset = 3; int64 headLinkOffset = 3;
//link的索引 //link的索引
string tailLinkId = 4; string tailLinkId = 4;
//link内的偏移量mm //link内的偏移量mm
int64 tailLinkOffset = 5; int64 tailLinkOffset = 5;
//link的索引的列表 //link的索引的列表
// //
repeated string occupiedLinkIndex = 6; repeated string occupiedLinkIndex = 6;
//,1=1 //,1=1
int32 slope = 7; int32 slope = 7;
//,1=true0=false //,1=true0=false
bool upslope = 8; bool upslope = 8;
//,1 =true 0 =false //,1 =true 0 =false
bool runningUp = 9; bool runningUp = 9;
//NtotalResistance,1=1KN //NtotalResistance,1=1KN
float runningResistanceSum = 10; float runningResistanceSum = 10;
//1NairResistance,1=1KN //1NairResistance,1=1KN
float airResistance = 11; float airResistance = 11;
//2NslopeResistance,1=1KN //2NslopeResistance,1=1KN
float rampResistance = 12; float rampResistance = 12;
//3线NcurveResistance,1=1KN //3线NcurveResistance,1=1KN
float curveResistance = 13; float curveResistance = 13;
//m/sspeed,1=1km/h //m/sspeed,1=1km/h
int32 speed = 14; int32 speed = 14;
//1m/sheadSpeed1,1=1km/h //1m/sheadSpeed1,1=1km/h
int32 headSensorSpeed1 = 15; int32 headSensorSpeed1 = 15;
//2m/sheadSpeed2,1=1km/h //2m/sheadSpeed2,1=1km/h
int32 headSensorSpeed2 = 16; int32 headSensorSpeed2 = 16;
//1m/stailSpeed1,1=1km/h //1m/stailSpeed1,1=1km/h
int32 tailSensorSpeed1 = 17; int32 tailSensorSpeed1 = 17;
//2m/stailSpeed2,1=1km/h //2m/stailSpeed2,1=1km/h
int32 tailSensorSpeed2 = 18; int32 tailSensorSpeed2 = 18;
//m/sheadRadarSpeed,1=1km/h //m/sheadRadarSpeed,1=1km/h
int32 headRadarSpeed = 19; int32 headRadarSpeed = 19;
//m/stailRadarSpeed,1=1km/h //m/stailRadarSpeed,1=1km/h
int32 tailRadarSpeed = 20; int32 tailRadarSpeed = 20;
// //
bool udpInterruption = 21; bool udpInterruption = 21;
// //
float acceleration = 22; float acceleration = 22;
} }
// vobc发过来的列车信息 // vobc发过来的列车信息
message TrainVobcState { message TrainVobcState {
// +1 // +1
int32 lifeSignal = 1; int32 lifeSignal = 1;
// TC1激活状态 1= // TC1激活状态 1=
bool tc1Active = 2; bool tc1Active = 2;
// TC2激活状态 1= // TC2激活状态 1=
bool tc2Active = 3; bool tc2Active = 3;
// 1= // 1=
bool directionForward = 4; bool directionForward = 4;
// 1= // 1=
bool directionBackward = 5; bool directionBackward = 5;
// 1= // 1=
bool tractionStatus = 6; bool tractionStatus = 6;
// 1= // 1=
bool brakingStatus = 7; bool brakingStatus = 7;
// 1= // 1=
bool emergencyBrakingStatus = 8; bool emergencyBrakingStatus = 8;
// AR 1= // AR 1=
bool turnbackStatus = 9; bool turnbackStatus = 9;
// 1= // 1=
bool jumpStatus = 10; bool jumpStatus = 10;
// ATO模式 1=ATO模式 // ATO模式 1=ATO模式
bool ato = 11; bool ato = 11;
// FAM模式 1=FAM模式 // FAM模式 1=FAM模式
bool fam = 12; bool fam = 12;
// CAM模式 1=CAM模式 // CAM模式 1=CAM模式
bool cam = 13; bool cam = 13;
// 1= // 1=
bool tractionSafetyCircuit = 14; bool tractionSafetyCircuit = 14;
// 1= // 1=
bool parkingBrakeStatus = 15; bool parkingBrakeStatus = 15;
// 1= // 1=
bool maintainBrakeStatus = 16; bool maintainBrakeStatus = 16;
// 100=1KN // 100=1KN
int64 tractionForce = 17; int64 tractionForce = 17;
// 100=1KN // 100=1KN
int64 brakeForce = 18; int64 brakeForce = 18;
// 100=1ton // 100=1ton
int64 trainLoad = 19; int64 trainLoad = 19;
// 1= // 1=
bool leftDoorOpenCommand = 20; bool leftDoorOpenCommand = 20;
// 1= // 1=
bool rightDoorOpenCommand = 21; bool rightDoorOpenCommand = 21;
// 1= // 1=
bool leftDoorCloseCommand = 22; bool leftDoorCloseCommand = 22;
// 1= // 1=
bool rightDoorCloseCommand = 23; bool rightDoorCloseCommand = 23;
// 1= // 1=
bool allDoorClose = 24; bool allDoorClose = 24;
// //
bool udpInterruption = 25; bool udpInterruption = 25;
// //
int64 updateTime = 26; int64 updateTime = 26;
} }
// //
message TrainMapState{ message TrainMapState{
// //
string id = 1; string id = 1;
//link运行方向 //link运行方向
bool up = 2; bool up = 2;
// //
float initialSpeed = 3; float initialSpeed = 3;
//,1=1mm //,1=1mm
int64 trainLength = 4; int64 trainLength = 4;
// //
bool show = 5; bool show = 5;
// ID // ID
uint32 headDeviceId = 6; uint32 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;
// //
int64 trainKilometer = 12; int64 trainKilometer = 12;
// //
int64 controlDelayTime = 13; int64 controlDelayTime = 13;
// //
int32 wheelDiameter = 14; int32 wheelDiameter = 14;
// //
// +1 // +1
int32 dynamicHeartbeat = 15; int32 dynamicHeartbeat = 15;
//link的索引 //link的索引
string headLinkId = 16; string headLinkId = 16;
//link内的偏移量mm //link内的偏移量mm
int64 headLinkOffset = 17; int64 headLinkOffset = 17;
//link的索引 //link的索引
string tailLinkId = 18; string tailLinkId = 18;
//link内的偏移量mm //link内的偏移量mm
int64 tailLinkOffset = 19; int64 tailLinkOffset = 19;
//link的索引的列表 //link的索引的列表
// //
repeated string occupiedLinkIndex = 20; repeated string occupiedLinkIndex = 20;
//,1=1 //,1=1
int32 slope = 21; int32 slope = 21;
//,1=true0=false //,1=true0=false
bool upslope = 22; bool upslope = 22;
//,1 =true 0 =false //,1 =true 0 =false
bool runningUp = 23; bool runningUp = 23;
//NtotalResistance,1=1KN //NtotalResistance,1=1KN
float runningResistanceSum = 24; float runningResistanceSum = 24;
//1NairResistance,1=1KN //1NairResistance,1=1KN
float airResistance = 25; float airResistance = 25;
//2NslopeResistance,1=1KN //2NslopeResistance,1=1KN
float rampResistance = 26; float rampResistance = 26;
//3线NcurveResistance,1=1KN //3线NcurveResistance,1=1KN
float curveResistance = 27; float curveResistance = 27;
//m/sspeed,1=1km/h //m/sspeed,1=1km/h
int32 speed = 28; int32 speed = 28;
//1m/sheadSpeed1,1=1km/h //1m/sheadSpeed1,1=1km/h
int32 headSensorSpeed1 = 29; int32 headSensorSpeed1 = 29;
//2m/sheadSpeed2,1=1km/h //2m/sheadSpeed2,1=1km/h
int32 headSensorSpeed2 = 30; int32 headSensorSpeed2 = 30;
//1m/stailSpeed1,1=1km/h //1m/stailSpeed1,1=1km/h
int32 tailSensorSpeed1 = 31; int32 tailSensorSpeed1 = 31;
//2m/stailSpeed2,1=1km/h //2m/stailSpeed2,1=1km/h
int32 tailSensorSpeed2 = 32; int32 tailSensorSpeed2 = 32;
//m/sheadRadarSpeed,1=1km/h //m/sheadRadarSpeed,1=1km/h
int32 headRadarSpeed = 33; int32 headRadarSpeed = 33;
//m/stailRadarSpeed,1=1km/h //m/stailRadarSpeed,1=1km/h
int32 tailRadarSpeed = 34; int32 tailRadarSpeed = 34;
// //
bool dynamicInterruption = 35; bool dynamicInterruption = 35;
// //
float acceleration = 36; float acceleration = 36;
// //
// +1 // +1
int32 vobcLifeSignal = 37; int32 vobcLifeSignal = 37;
// TC1激活状态 1= // TC1激活状态 1=
bool tc1Active = 38; bool tc1Active = 38;
// TC2激活状态 1= // TC2激活状态 1=
bool tc2Active = 39; bool tc2Active = 39;
// 1= // 1=
bool directionForward = 40; bool directionForward = 40;
// 1= // 1=
bool directionBackward = 41; bool directionBackward = 41;
// 1= // 1=
bool tractionStatus = 42; bool tractionStatus = 42;
// 1= // 1=
bool brakingStatus = 43; bool brakingStatus = 43;
// 1= // 1=
bool emergencyBrakingStatus = 44; bool emergencyBrakingStatus = 44;
// AR 1= // AR 1=
bool turnbackStatus = 45; bool turnbackStatus = 45;
// 1= // 1=
bool jumpStatus = 46; bool jumpStatus = 46;
// ATO模式 1=ATO模式 // ATO模式 1=ATO模式
bool ato = 47; bool ato = 47;
// FAM模式 1=FAM模式 // FAM模式 1=FAM模式
bool fam = 48; bool fam = 48;
// CAM模式 1=CAM模式 // CAM模式 1=CAM模式
bool cam = 49; bool cam = 49;
// 1= // 1=
bool tractionSafetyCircuit = 50; bool tractionSafetyCircuit = 50;
// 1= // 1=
bool parkingBrakeStatus = 51; bool parkingBrakeStatus = 51;
// 1= // 1=
bool maintainBrakeStatus = 52; bool maintainBrakeStatus = 52;
// 100=1KN // 100=1KN
int64 tractionForce = 53; int64 tractionForce = 53;
// 100=1KN // 100=1KN
int64 brakeForce = 54; int64 brakeForce = 54;
// 100=1ton // 100=1ton
int64 trainLoad = 55; int64 trainLoad = 55;
// 1= // 1=
bool leftDoorOpenCommand = 56; bool leftDoorOpenCommand = 56;
// 1= // 1=
bool rightDoorOpenCommand = 57; bool rightDoorOpenCommand = 57;
// 1= // 1=
bool leftDoorCloseCommand = 58; bool leftDoorCloseCommand = 58;
// 1= // 1=
bool rightDoorCloseCommand = 59; bool rightDoorCloseCommand = 59;
// 1= // 1=
bool allDoorClose = 60; bool allDoorClose = 60;
// //
bool vobcInterruption = 61; bool vobcInterruption = 61;
} }
// //
message ReplyState { message ReplyState {
// //
uint32 id = 1; uint32 id = 1;
// //
bool xh = 2; bool xh = 2;
// //
string code = 3; string code = 3;
} }
// //
message ButtonState { message ButtonState {
uint32 id = 1; uint32 id = 1;
bool down = 2; bool down = 2;
bool active = 3; // bool active = 3; //
} }
// //
message AlarmState { message AlarmState {
uint32 id = 1; uint32 id = 1;
bool active = 2; bool active = 2;
} }
// //
message LightState { message LightState {
uint32 id = 1; uint32 id = 1;
bool active = 2; bool active = 2;
} }
// //
message PsdState { message PsdState {
uint32 id = 1; //id uint32 id = 1; //id
repeated AsdState asdStates = 2; // repeated AsdState asdStates = 2; //
bool mgj = 3; // bool mgj = 3; //
} }
// //
message AsdState { message AsdState {
int32 code = 1; // int32 code = 1; //
bool kmdw = 2; // bool kmdw = 2; //
bool gmdw = 3; // bool gmdw = 3; //
bool mgj = 4; // bool mgj = 4; //
} }
// //
message KeyState { message KeyState {
uint32 id = 1; uint32 id = 1;
int32 gear = 2; int32 gear = 2;
} }
// //
message MkxJState { message MkxJState {
string code = 1; string code = 1;
repeated ReplyState replyState = 2; repeated ReplyState replyState = 2;
}
//
message BaliseState {
uint32 id = 1;
graphicData.KilometerSystem km = 2; //
bytes telegram = 3; //
} }
//////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////
//仿 //仿
message VariationStatus{ message VariationStatus{
// //
repeated TrainMapState updatedTrain = 1; repeated TrainMapState 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 TrainMapState trainState = 1; repeated TrainMapState 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; repeated SignalState signalState = 5;
// //
repeated ButtonState buttonState = 6; repeated ButtonState buttonState = 6;
// //
repeated AlarmState AlarmState = 7; repeated AlarmState AlarmState = 7;
// //
repeated LightState LightState = 8; repeated LightState LightState = 8;
// //
repeated PsdState psdState = 9; repeated PsdState psdState = 9;
// //
repeated KeyState KeyState = 10; repeated KeyState KeyState = 10;
// //
repeated PlatformState platformState = 11; repeated PlatformState platformState = 11;
//
repeated BaliseState baliseState = 12;
} }
// //
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;
} }
// 仿 // 仿
message SimulationStatus { message SimulationStatus {
enum SimulationState { enum SimulationState {
PAUSE = 0; PAUSE = 0;
START = 1; START = 1;
ERROR = 2; ERROR = 2;
DESTROY = 3; DESTROY = 3;
} }
string simulationId = 1; string simulationId = 1;
SimulationState state = 2; SimulationState state = 2;
string description = 3; string description = 3;
} }