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