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; } //区段状态 message SectionState{ //区段索引 string id = 1; //区段类型 SectionType type = 2; //区段占用 //true-占用;false-出清 bool occupied = 3; //占用该区段的所有列车的索引列表,即有哪些列车在该区段上 repeated string trainId = 4; } //道岔状态 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; }