[重写]北京12号线计轴通信交互逻辑(未完,主要是安全校验域计算逻辑)

This commit is contained in:
thesai 2024-07-04 13:59:39 +08:00
parent 181dd9951b
commit ef7e469175
3 changed files with 10 additions and 2 deletions

View File

@ -56,7 +56,7 @@ func NewAxleDeviceRuntime() *AxleDeviceRuntime {
// AxleManageDevice 计轴管理设备
type AxleManageDevice struct {
CentralizedStation string //所属集中站
CentralizedStation string //所属集中站编号code
Adrs map[string]*AxleDeviceRuntime //key-sectionId
}

View File

@ -33,7 +33,7 @@ type PhysicalSection struct {
//在Link上的区间start小于end
linkRanges []*LinkRange
//物理区段所属集中站
//物理区段所属集中站编号code
centralizedStation string
// 所属站台

View File

@ -362,6 +362,14 @@ func (repo *Repository) PlatformList() []*Platform {
return list
}
func (repo *Repository) CentralizedStationRefList() []*proto.CentralizedStationRef {
var list []*proto.CentralizedStationRef
for _, model := range repo.centralizedMap {
list = append(list, model)
}
return list
}
func (repo *Repository) GetCentralizedStationRef(centralizedStationId string) *proto.CentralizedStationRef {
return repo.centralizedMap[centralizedStationId]
}