rts-sim-testing-message/protos/device_state.proto
2023-07-07 17:20:29 +08:00

65 lines
1.3 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package state;
option java_package = "club.joylink.bjrtss.ats.verify.protos";
option java_outer_classname = "DeviceStateProto";
//状态定义面向物理层即只定义物理状态,不定义逻辑层状态
//区段类型
enum SectionType{
Any=0;
//计轴区段
Axle=1;
//逻辑区段
Logic=2;
//物理区段
Physic=3;
}
//相邻端点定义的link的状态
message LinkState{
//link索引
string id = 1;
//link上的列车id列表
repeated string trainId = 2;
}
//区段状态
message SectionState{
//区段索引
string id = 1;
//区段类型
SectionType type = 2;
//区段占用
//true-占用false-出清
bool occupied = 3;
}
//道岔状态
message SwitchState{
//道岔索引
string id = 1;
//道岔处于定位
bool normal = 2;
//道岔处于反位
bool reverse = 3;
}
//列车状态
message TrainState{
//列车索引
string id = 1;
//车头所在link的索引
string headLinkId = 2;
//车头所在link内的偏移量单位为cm
int64 headLinkOffset = 3;
//车尾所在link的索引
string tailLinkId = 4;
//车尾所在link内的偏移量单位为cm
int64 tailLinkOffset = 5;
//列车所占用的link的索引的列表
//顺序为从车头到车尾
repeated string occupiedLinkId = 6;
}