[新增]计轴区段的模型、ecs实体、ecs系统、发给前端的状态
All checks were successful
local-test分支打包构建docker并发布运行 / Docker-Build (push) Successful in 1m44s

This commit is contained in:
thesai 2024-08-12 18:57:36 +08:00
parent 016ce0e8bb
commit 4044b7f4c2
9 changed files with 1603 additions and 1447 deletions

View File

@ -922,7 +922,7 @@ type RtssGraphicStorage struct {
LogicSections []*LogicSection `protobuf:"bytes,17,rep,name=logicSections,proto3" json:"logicSections,omitempty"` LogicSections []*LogicSection `protobuf:"bytes,17,rep,name=logicSections,proto3" json:"logicSections,omitempty"`
StopPositions []*StopPosition `protobuf:"bytes,18,rep,name=stopPositions,proto3" json:"stopPositions,omitempty"` StopPositions []*StopPosition `protobuf:"bytes,18,rep,name=stopPositions,proto3" json:"stopPositions,omitempty"`
SpksSwitchs []*SpksSwitch `protobuf:"bytes,19,rep,name=spksSwitchs,proto3" json:"spksSwitchs,omitempty"` SpksSwitchs []*SpksSwitch `protobuf:"bytes,19,rep,name=spksSwitchs,proto3" json:"spksSwitchs,omitempty"`
EsbButtons []*EsbButton `protobuf:"bytes,20,rep,name=esbButtons,proto3" json:"esbButtons,omitempty"` // 紧急关闭按钮 EsbButtons []*EsbButton `protobuf:"bytes,20,rep,name=esbButtons,proto3" json:"esbButtons,omitempty"` // 紧急关闭(这不是按钮只是一个ESB系统的象征物
GateBoxs []*GatedBox `protobuf:"bytes,21,rep,name=gateBoxs,proto3" json:"gateBoxs,omitempty"` // 站台开门/关门/发车按钮整合控制箱 GateBoxs []*GatedBox `protobuf:"bytes,21,rep,name=gateBoxs,proto3" json:"gateBoxs,omitempty"` // 站台开门/关门/发车按钮整合控制箱
Transponders []*Transponder `protobuf:"bytes,22,rep,name=transponders,proto3" json:"transponders,omitempty"` // 应答器 Transponders []*Transponder `protobuf:"bytes,22,rep,name=transponders,proto3" json:"transponders,omitempty"` // 应答器
Slopes []*Slope `protobuf:"bytes,23,rep,name=slopes,proto3" json:"slopes,omitempty"` // 坡度 Slopes []*Slope `protobuf:"bytes,23,rep,name=slopes,proto3" json:"slopes,omitempty"` // 坡度
@ -5485,7 +5485,7 @@ type LianSuoData struct {
Switchs []*LianSuoIndexData `protobuf:"bytes,2,rep,name=switchs,proto3" json:"switchs,omitempty"` Switchs []*LianSuoIndexData `protobuf:"bytes,2,rep,name=switchs,proto3" json:"switchs,omitempty"`
ScreenDoors []*LianSuoIndexData `protobuf:"bytes,3,rep,name=screenDoors,proto3" json:"screenDoors,omitempty"` ScreenDoors []*LianSuoIndexData `protobuf:"bytes,3,rep,name=screenDoors,proto3" json:"screenDoors,omitempty"`
Signals []*LianSuoIndexData `protobuf:"bytes,4,rep,name=signals,proto3" json:"signals,omitempty"` Signals []*LianSuoIndexData `protobuf:"bytes,4,rep,name=signals,proto3" json:"signals,omitempty"`
Sections []*LianSuoIndexData `protobuf:"bytes,5,rep,name=sections,proto3" json:"sections,omitempty"` // repeated LianSuoIndexData sections = 5;
FloodGates []*LianSuoIndexData `protobuf:"bytes,6,rep,name=floodGates,proto3" json:"floodGates,omitempty"` FloodGates []*LianSuoIndexData `protobuf:"bytes,6,rep,name=floodGates,proto3" json:"floodGates,omitempty"`
SpksSwitchs []*LianSuoIndexData `protobuf:"bytes,7,rep,name=spksSwitchs,proto3" json:"spksSwitchs,omitempty"` SpksSwitchs []*LianSuoIndexData `protobuf:"bytes,7,rep,name=spksSwitchs,proto3" json:"spksSwitchs,omitempty"`
GarageDoors []*LianSuoIndexData `protobuf:"bytes,8,rep,name=garageDoors,proto3" json:"garageDoors,omitempty"` GarageDoors []*LianSuoIndexData `protobuf:"bytes,8,rep,name=garageDoors,proto3" json:"garageDoors,omitempty"`
@ -5493,6 +5493,7 @@ type LianSuoData struct {
EsbButtons []*LianSuoIndexData `protobuf:"bytes,10,rep,name=esbButtons,proto3" json:"esbButtons,omitempty"` EsbButtons []*LianSuoIndexData `protobuf:"bytes,10,rep,name=esbButtons,proto3" json:"esbButtons,omitempty"`
HoldButtons []*LianSuoIndexData `protobuf:"bytes,11,rep,name=holdButtons,proto3" json:"holdButtons,omitempty"` HoldButtons []*LianSuoIndexData `protobuf:"bytes,11,rep,name=holdButtons,proto3" json:"holdButtons,omitempty"`
UnattengedButtons []*LianSuoIndexData `protobuf:"bytes,12,rep,name=unattengedButtons,proto3" json:"unattengedButtons,omitempty"` UnattengedButtons []*LianSuoIndexData `protobuf:"bytes,12,rep,name=unattengedButtons,proto3" json:"unattengedButtons,omitempty"`
AcSections []*LianSuoIndexData `protobuf:"bytes,13,rep,name=acSections,proto3" json:"acSections,omitempty"` //计轴区段
} }
func (x *LianSuoData) Reset() { func (x *LianSuoData) Reset() {
@ -5555,13 +5556,6 @@ func (x *LianSuoData) GetSignals() []*LianSuoIndexData {
return nil return nil
} }
func (x *LianSuoData) GetSections() []*LianSuoIndexData {
if x != nil {
return x.Sections
}
return nil
}
func (x *LianSuoData) GetFloodGates() []*LianSuoIndexData { func (x *LianSuoData) GetFloodGates() []*LianSuoIndexData {
if x != nil { if x != nil {
return x.FloodGates return x.FloodGates
@ -5611,6 +5605,13 @@ func (x *LianSuoData) GetUnattengedButtons() []*LianSuoIndexData {
return nil return nil
} }
func (x *LianSuoData) GetAcSections() []*LianSuoIndexData {
if x != nil {
return x.AcSections
}
return nil
}
// 无人折返按钮 // 无人折返按钮
type UnattengedButton struct { type UnattengedButton struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -6690,7 +6691,7 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{
0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x64,
0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x83, 0x06, 0x0a, 0x0b, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x87, 0x06, 0x0a, 0x0b, 0x4c, 0x69, 0x61, 0x6e, 0x53,
0x75, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x75, 0x6f, 0x44, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e,
@ -6706,48 +6707,40 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{
0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67,
0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53,
0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x73, 0x69, 0x67, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x73, 0x69, 0x67,
0x6e, 0x61, 0x6c, 0x73, 0x12, 0x39, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x6e, 0x61, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x6f, 0x64, 0x47, 0x61, 0x74,
0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e,
0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x6f, 0x64, 0x47, 0x61,
0x3d, 0x0a, 0x0a, 0x66, 0x6c, 0x6f, 0x6f, 0x64, 0x47, 0x61, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x74, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x73, 0x70, 0x6b, 0x73, 0x53, 0x77, 0x69, 0x74, 0x63,
0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x68, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e,
0x74, 0x61, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x6f, 0x64, 0x47, 0x61, 0x74, 0x65, 0x73, 0x12, 0x3f, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x73, 0x70, 0x6b, 0x73, 0x53, 0x77, 0x69,
0x0a, 0x0b, 0x73, 0x70, 0x6b, 0x73, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x73, 0x18, 0x07, 0x20, 0x74, 0x63, 0x68, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x67, 0x61, 0x72, 0x61, 0x67, 0x65, 0x44, 0x6f,
0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70,
0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49,
0x74, 0x61, 0x52, 0x0b, 0x73, 0x70, 0x6b, 0x73, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x73, 0x12, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x67, 0x61, 0x72, 0x61, 0x67, 0x65,
0x3f, 0x0a, 0x0b, 0x67, 0x61, 0x72, 0x61, 0x67, 0x65, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x18, 0x08, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x61, 0x72, 0x57, 0x61, 0x73, 0x68,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70,
0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49,
0x61, 0x74, 0x61, 0x52, 0x0b, 0x67, 0x61, 0x72, 0x61, 0x67, 0x65, 0x44, 0x6f, 0x6f, 0x72, 0x73, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x63, 0x61, 0x72, 0x57, 0x61, 0x73,
0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x61, 0x72, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x09, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x3d, 0x0a, 0x0a, 0x65, 0x73, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e,
0x61, 0x74, 0x61, 0x52, 0x0a, 0x63, 0x61, 0x72, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x65, 0x73, 0x62, 0x42, 0x75, 0x74, 0x74,
0x3d, 0x0a, 0x0a, 0x65, 0x73, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x0b, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f,
0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68,
0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e,
0x74, 0x61, 0x52, 0x0a, 0x65, 0x73, 0x62, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x75, 0x74,
0x0a, 0x0b, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x67,
0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x65, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69,
0x74, 0x61, 0x52, 0x0b, 0x68, 0x6f, 0x6c, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x12, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x11,
0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x67, 0x65, 0x64, 0x42, 0x75, 0x74, 0x75, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x67, 0x65, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e,
0x74, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x61, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
0x49, 0x6e, 0x64, 0x65, 0x78, 0x44, 0x61, 0x74, 0x61, 0x52, 0x11, 0x75, 0x6e, 0x61, 0x74, 0x74, 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x69, 0x61, 0x6e, 0x53, 0x75, 0x6f, 0x49, 0x6e, 0x64, 0x65, 0x78,
0x65, 0x6e, 0x67, 0x65, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0a, 0x61, 0x63, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x10, 0x55, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x67, 0x65, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x10, 0x55, 0x6e, 0x61, 0x74, 0x74, 0x65, 0x6e, 0x67, 0x65, 0x64, 0x42,
0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e,
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03,
0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65,
0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65,
0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x0a, 0x48, 0x6f, 0x6c, 0x64, 0x42,
0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x44,
0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06,
@ -6755,16 +6748,24 @@ var file_stationLayoutGraphics_proto_rawDesc = []byte{
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x6c,
0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x1a, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x12, 0x1a,
0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d,
0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x2a, 0x1d, 0x0a, 0x09, 0x44, 0x69, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x22, 0x81, 0x01, 0x0a, 0x0a, 0x48,
0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x55, 0x50, 0x10, 0x00, 0x12, 0x6f, 0x6c, 0x64, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x12, 0x2f, 0x0a, 0x06, 0x63, 0x6f, 0x6d,
0x08, 0x0a, 0x04, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x42, 0x69, 0x0a, 0x25, 0x63, 0x6c, 0x75, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x61, 0x70,
0x62, 0x2e, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x62, 0x6a, 0x72, 0x74, 0x73, 0x73, 0x68, 0x69, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x49, 0x6e,
0x2e, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x66, 0x6f, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
0x6f, 0x73, 0x42, 0x13, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x47, 0x72, 0x61, 0x70, 0x68, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12,
0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x2b, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x0a, 0x04, 0x66, 0x6c, 0x69, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66, 0x6c,
0x2e, 0x63, 0x6c, 0x75, 0x62, 0x2f, 0x62, 0x6a, 0x2d, 0x72, 0x74, 0x73, 0x74, 0x73, 0x2d, 0x73, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x18, 0x04,
0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x70, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x66, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x2a, 0x1d,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x55,
0x50, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x42, 0x69, 0x0a,
0x25, 0x63, 0x6c, 0x75, 0x62, 0x2e, 0x6a, 0x6f, 0x79, 0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x62, 0x6a,
0x72, 0x74, 0x73, 0x73, 0x2e, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x42, 0x13, 0x4c, 0x61, 0x79, 0x6f, 0x75, 0x74, 0x47, 0x72,
0x61, 0x70, 0x68, 0x69, 0x63, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x5a, 0x2b, 0x6a, 0x6f, 0x79,
0x6c, 0x69, 0x6e, 0x6b, 0x2e, 0x63, 0x6c, 0x75, 0x62, 0x2f, 0x62, 0x6a, 0x2d, 0x72, 0x74, 0x73,
0x74, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x64, 0x74, 0x6f, 0x2f, 0x64, 0x61,
0x74, 0x61, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -7013,14 +7014,14 @@ var file_stationLayoutGraphics_proto_depIdxs = []int32{
71, // 150: graphicData.LianSuoData.switchs:type_name -> graphicData.LianSuoIndexData 71, // 150: graphicData.LianSuoData.switchs:type_name -> graphicData.LianSuoIndexData
71, // 151: graphicData.LianSuoData.screenDoors:type_name -> graphicData.LianSuoIndexData 71, // 151: graphicData.LianSuoData.screenDoors:type_name -> graphicData.LianSuoIndexData
71, // 152: graphicData.LianSuoData.signals:type_name -> graphicData.LianSuoIndexData 71, // 152: graphicData.LianSuoData.signals:type_name -> graphicData.LianSuoIndexData
71, // 153: graphicData.LianSuoData.sections:type_name -> graphicData.LianSuoIndexData 71, // 153: graphicData.LianSuoData.floodGates:type_name -> graphicData.LianSuoIndexData
71, // 154: graphicData.LianSuoData.floodGates:type_name -> graphicData.LianSuoIndexData 71, // 154: graphicData.LianSuoData.spksSwitchs:type_name -> graphicData.LianSuoIndexData
71, // 155: graphicData.LianSuoData.spksSwitchs:type_name -> graphicData.LianSuoIndexData 71, // 155: graphicData.LianSuoData.garageDoors:type_name -> graphicData.LianSuoIndexData
71, // 156: graphicData.LianSuoData.garageDoors:type_name -> graphicData.LianSuoIndexData 71, // 156: graphicData.LianSuoData.carWashing:type_name -> graphicData.LianSuoIndexData
71, // 157: graphicData.LianSuoData.carWashing:type_name -> graphicData.LianSuoIndexData 71, // 157: graphicData.LianSuoData.esbButtons:type_name -> graphicData.LianSuoIndexData
71, // 158: graphicData.LianSuoData.esbButtons:type_name -> graphicData.LianSuoIndexData 71, // 158: graphicData.LianSuoData.holdButtons:type_name -> graphicData.LianSuoIndexData
71, // 159: graphicData.LianSuoData.holdButtons:type_name -> graphicData.LianSuoIndexData 71, // 159: graphicData.LianSuoData.unattengedButtons:type_name -> graphicData.LianSuoIndexData
71, // 160: graphicData.LianSuoData.unattengedButtons:type_name -> graphicData.LianSuoIndexData 71, // 160: graphicData.LianSuoData.acSections:type_name -> graphicData.LianSuoIndexData
23, // 161: graphicData.UnattengedButton.common:type_name -> graphicData.CommonInfo 23, // 161: graphicData.UnattengedButton.common:type_name -> graphicData.CommonInfo
23, // 162: graphicData.HoldButton.common:type_name -> graphicData.CommonInfo 23, // 162: graphicData.HoldButton.common:type_name -> graphicData.CommonInfo
163, // [163:163] is the sub-list for method output_type 163, // [163:163] is the sub-list for method output_type

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask {
if err != nil { if err != nil {
return err return err
} }
sectionStates, err := collectSectionStates(vs.World, mapId) sectionStates, err := collectPhysicalSectionStates(vs.World, mapId)
if err != nil { if err != nil {
return err return err
} }
@ -71,6 +71,10 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask {
if err != nil { if err != nil {
return err return err
} }
axleCountingSectionStates, err := collectAxleCountingSectionStates(vs.World, mapId)
if err != nil {
return err
}
ststes := &state_proto.PushedDevicesStatus{ ststes := &state_proto.PushedDevicesStatus{
All: true, All: true,
AllStatus: &state_proto.AllDevicesStatus{ AllStatus: &state_proto.AllDevicesStatus{
@ -85,6 +89,7 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask {
CkmStates: ckmStates, CkmStates: ckmStates,
FymStates: fymStates, FymStates: fymStates,
XcjStates: xcjStates, XcjStates: xcjStates,
AxleCountingSection: axleCountingSectionStates,
}, },
} }
err = mqtt.GetMsgClient().PubSfpState(vs.SimulationId, mapId, ststes) err = mqtt.GetMsgClient().PubSfpState(vs.SimulationId, mapId, ststes)
@ -95,6 +100,23 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask {
}, 1000*time.Millisecond) }, 1000*time.Millisecond)
} }
func collectAxleCountingSectionStates(world ecs.World, mapId int32) ([]*state_proto.AxleCountingSectionState, error) {
uidMap := memory.QueryMapUidMapByType(mapId, &data_proto.AxleCountingSection{})
var stateArr []*state_proto.AxleCountingSectionState
wd := entity.GetWorldData(world)
for _, u := range uidMap {
entry := wd.EntityMap[u.Uid]
if entry == nil {
continue
}
stateArr = append(stateArr, &state_proto.AxleCountingSectionState{
Id: u.CommonId,
Occupied: component.AxleCountingSectionStateType.Get(entry).Occupied,
})
}
return stateArr, nil
}
func collectXcjStates(world ecs.World, mapId int32) ([]*state_proto.XcjState, error) { func collectXcjStates(world ecs.World, mapId int32) ([]*state_proto.XcjState, error) {
uidStructure := memory.QueryUidStructure[*memory.StationUidStructure](mapId) uidStructure := memory.QueryUidStructure[*memory.StationUidStructure](mapId)
var xcjStates []*state_proto.XcjState var xcjStates []*state_proto.XcjState
@ -255,7 +277,7 @@ func collectPsdStates(world ecs.World, mapId int32) ([]*state_proto.PsdState, er
} }
// 收集区段状态 // 收集区段状态
func collectSectionStates(world ecs.World, mapId int32) ([]*state_proto.SectionState, error) { func collectPhysicalSectionStates(world ecs.World, mapId int32) ([]*state_proto.SectionState, error) {
uidMap := memory.QueryMapUidMapByType(mapId, &data_proto.Section{}) uidMap := memory.QueryMapUidMapByType(mapId, &data_proto.Section{})
var sectionArr []*state_proto.SectionState var sectionArr []*state_proto.SectionState
for _, u := range uidMap { for _, u := range uidMap {
@ -275,16 +297,16 @@ func handlerSectionState(w ecs.World, uid string) *state_proto.SectionState {
//fmt.Printf("id=%s的信号机不存在", uid) //fmt.Printf("id=%s的信号机不存在", uid)
return nil return nil
} }
if entry.HasComponent(component.AxleManagerType) { //计轴区段 if entry.HasComponent(component.PhysicalSectionManagerType) { //计轴区段
axleManager := component.AxleManagerType.Get(entry) axleManager := component.PhysicalSectionManagerType.Get(entry)
sectionState := &state_proto.SectionState{ sectionState := &state_proto.SectionState{
Occupied: axleManager.Occupied, Occupied: axleManager.Occupied,
AxleFault: entry.HasComponent(component.AxleSectionForceOccupied), AxleFault: entry.HasComponent(component.PhysicalSectionForceOccupied),
AxleDrst: false, AxleDrst: false,
AxlePdrst: axleManager.PDRST, AxlePdrst: axleManager.PDRST,
} }
sectionState.Occupied = axleManager.Occupied sectionState.Occupied = axleManager.Occupied
sectionState.AxleFault = entry.HasComponent(component.AxleSectionForceOccupied) sectionState.AxleFault = entry.HasComponent(component.PhysicalSectionForceOccupied)
return sectionState return sectionState
} else if entry.HasComponent(component.TrackCircuitType) { //轨道电路 } else if entry.HasComponent(component.TrackCircuitType) { //轨道电路
sectionState := &state_proto.SectionState{ sectionState := &state_proto.SectionState{

@ -1 +1 @@
Subproject commit 51702238da69fcf28d7c07ddccfc6e240222456e Subproject commit 73e7f83cfae775d13e60b6882231b69adab58b5c

@ -1 +1 @@
Subproject commit 4a126b57ac6bb950d764851a27a5ddf4caad0b2a Subproject commit 74bea4e9955524f7254876c90af08d963f666585

View File

@ -269,7 +269,7 @@ func (s *serviceContext) collect() *msg.RsdMsgBuilder {
if entry == nil { if entry == nil {
logger().Error(fmt.Sprintf("没有id[%s]的区段实体", cfg.SectionId)) logger().Error(fmt.Sprintf("没有id[%s]的区段实体", cfg.SectionId))
} }
am := component.AxleManagerType.Get(entry) am := component.PhysicalSectionManagerType.Get(entry)
stateInfo := &msg.StateInfo{ stateInfo := &msg.StateInfo{
CLR: !am.Occupied, CLR: !am.Occupied,
OCC: am.Occupied, OCC: am.Occupied,

View File

@ -205,25 +205,25 @@ func makeTable(sim *memory.VerifySimulation, stationCode string) *StationDeviceI
} }
} }
} }
//计轴区段 ////计轴区段
for _, data := range stationGi.LianSuoData.Sections { //for _, data := range stationGi.LianSuoData.AcSections {
if data.Index <= 0 { // if data.Index <= 0 {
continue // continue
} // }
if data.Index == 0 { //这是其它线的区段 // if data.Index == 0 { //这是其它线的区段
continue // continue
} // }
for _, station := range uids.PhysicalSectionIds[data.Id].CentralizedStations { // for _, station := range uids.AxleCountingSectionIds[data.Id].CentralizedStations {
if station.StationName == stationCode { // if station.StationName == stationCode {
table.AxleSectionMap[uint16(data.Id)] = &Row{ // table.AxleSectionMap[uint16(data.Id)] = &Row{
commonId: data.Id, // commonId: data.Id,
uid: uids.PhysicalSectionIds[data.Id].Uid, // uid: uids.PhysicalSectionIds[data.Id].Uid,
index: uint16(data.Index), // index: uint16(data.Index),
relateDeviceMap: nil, // relateDeviceMap: nil,
} // }
} // }
} // }
} //}
//无人折返实际数据中数量为0 //无人折返实际数据中数量为0
//防淹门实际数据中数量为0 //防淹门实际数据中数量为0
//人员防护 //人员防护
@ -360,7 +360,7 @@ func (s *serviceContext) collectDeviceState() *ToInterlockFrame {
//计轴区段 //计轴区段
for _, row := range s.deviceTable.AxleSectionMap { for _, row := range s.deviceTable.AxleSectionMap {
entry := wd.EntityMap[row.uid] entry := wd.EntityMap[row.uid]
axleManager := component.AxleManagerType.Get(entry) axleManager := component.PhysicalSectionManagerType.Get(entry)
frame.AxleSectionStates = append(frame.AxleSectionStates, &AxleSectionState{ frame.AxleSectionStates = append(frame.AxleSectionStates, &AxleSectionState{
Id: row.index, Id: row.index,
State: GetStateByte(axleManager.Occupied), State: GetStateByte(axleManager.Occupied),

View File

@ -43,6 +43,7 @@ type StationUidStructure struct {
AxlePointIds map[uint32]*DeviceRelationship AxlePointIds map[uint32]*DeviceRelationship
TurnoutIds map[uint32]*DeviceRelationship TurnoutIds map[uint32]*DeviceRelationship
PhysicalSectionIds map[uint32]*DeviceRelationship PhysicalSectionIds map[uint32]*DeviceRelationship
AxleCountingSectionIds map[uint32]*DeviceRelationship
SignalIds map[uint32]*DeviceRelationship SignalIds map[uint32]*DeviceRelationship
TransponderIds map[uint32]*DeviceRelationship TransponderIds map[uint32]*DeviceRelationship
SlopeIds map[uint32]*DeviceRelationship SlopeIds map[uint32]*DeviceRelationship
@ -255,6 +256,7 @@ func initStationUid(data *data_proto.RtssGraphicStorage) *StationUidStructure {
AxlePointIds: make(map[uint32]*DeviceRelationship, len(data.AxleCountings)), AxlePointIds: make(map[uint32]*DeviceRelationship, len(data.AxleCountings)),
TurnoutIds: make(map[uint32]*DeviceRelationship, len(data.Turnouts)), TurnoutIds: make(map[uint32]*DeviceRelationship, len(data.Turnouts)),
PhysicalSectionIds: make(map[uint32]*DeviceRelationship, len(data.Section)), PhysicalSectionIds: make(map[uint32]*DeviceRelationship, len(data.Section)),
AxleCountingSectionIds: make(map[uint32]*DeviceRelationship, len(data.AxleCountingSections)),
SignalIds: make(map[uint32]*DeviceRelationship, len(data.Signals)), SignalIds: make(map[uint32]*DeviceRelationship, len(data.Signals)),
TransponderIds: make(map[uint32]*DeviceRelationship, len(data.Transponders)), TransponderIds: make(map[uint32]*DeviceRelationship, len(data.Transponders)),
SlopeIds: make(map[uint32]*DeviceRelationship, len(data.Slopes)), SlopeIds: make(map[uint32]*DeviceRelationship, len(data.Slopes)),
@ -325,6 +327,15 @@ func initStationUid(data *data_proto.RtssGraphicStorage) *StationUidStructure {
CentralizedStations: cenStations, CentralizedStations: cenStations,
} }
} }
// 初始化计轴区段信息
for _, data := range data.AxleCountingSections {
gus.AxleCountingSectionIds[data.Common.Id] = &DeviceRelationship{
CommonId: data.Common.Id,
Code: data.Code,
Uid: BuildUid(city, lineId, "计轴区段", data.Code, strconv.Itoa(int(data.Common.Id))),
CentralizedStations: nil,
}
}
// 初始化信号机信息 // 初始化信号机信息
for _, s := range data.Signals { for _, s := range data.Signals {
eid := GetMapElementId(s.Common) eid := GetMapElementId(s.Common)
@ -675,6 +686,8 @@ func getUidMapByType(uidData any, m interface{}) map[uint32]*DeviceRelationship
return (uidData.(*StationUidStructure)).TurnoutIds return (uidData.(*StationUidStructure)).TurnoutIds
case *data_proto.Section: case *data_proto.Section:
return (uidData.(*StationUidStructure)).PhysicalSectionIds return (uidData.(*StationUidStructure)).PhysicalSectionIds
case *data_proto.AxleCountingSection:
return (uidData.(*StationUidStructure)).AxleCountingSectionIds
case *data_proto.Signal: case *data_proto.Signal:
return (uidData.(*StationUidStructure)).SignalIds return (uidData.(*StationUidStructure)).SignalIds
case *data_proto.Transponder: case *data_proto.Transponder:

View File

@ -1116,7 +1116,7 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
} }
repo.CheckPoints = append(repo.CheckPoints, cp) repo.CheckPoints = append(repo.CheckPoints, cp)
} }
//区段 //物理区段
for _, data := range storage.Section { for _, data := range storage.Section {
var turnoutUids []string var turnoutUids []string
if data.SectionType == data_proto.Section_TurnoutPhysical { if data.SectionType == data_proto.Section_TurnoutPhysical {
@ -1141,6 +1141,37 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
} }
repo.PhysicalSections = append(repo.PhysicalSections, physicalSection) repo.PhysicalSections = append(repo.PhysicalSections, physicalSection)
} }
//计轴区段
for _, data := range storage.AxleCountingSections {
var axleCountingIds []string
if data.PaRef != nil {
axleCountingIds = append(axleCountingIds, uidsMap.AxlePointIds[data.PaRef.Id].Uid)
}
if data.PbRef != nil {
axleCountingIds = append(axleCountingIds, uidsMap.AxlePointIds[data.PbRef.Id].Uid)
}
var turnoutAndPos []*proto.TurnoutAndPos
for _, tp := range data.TurnoutPos {
var pos proto.Turnout_Pos
switch tp.Position {
case 0:
pos = proto.Turnout_Pos_N
case 1:
pos = proto.Turnout_Pos_R
default:
panic(fmt.Errorf("计轴区段[%s]未知的道岔位置:%d", uidsMap.AxleCountingSectionIds[data.Common.Id].Uid, tp.Position))
}
turnoutAndPos = append(turnoutAndPos, &proto.TurnoutAndPos{
TurnoutId: uidsMap.TurnoutIds[tp.Id].Uid,
Pos: pos,
})
}
repo.AxleCountingSections = append(repo.AxleCountingSections, &proto.AxleCountingSection{
Id: uidsMap.AxleCountingSectionIds[data.Common.Id].Uid,
AxleCountingIds: axleCountingIds,
TurnoutAndPos: turnoutAndPos,
})
}
//道岔 //道岔
for _, data := range storage.Turnouts { for _, data := range storage.Turnouts {
var km *proto.Kilometer var km *proto.Kilometer