[新增]ecs物理区段增加区段电路组件及逻辑;
[修改]12号线联锁通信服务如果启动失败,则启动参数无法更换bug
This commit is contained in:
parent
6211f61ecd
commit
d610a15fdb
@ -6,7 +6,7 @@ server:
|
|||||||
# 数据源
|
# 数据源
|
||||||
datasource:
|
datasource:
|
||||||
# 数据库访问url
|
# 数据库访问url
|
||||||
dsn: root:localdb@tcp(192.168.53.11:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
|
dsn: root:localdb@tcp(192.168.1.211:3306)/bj-rtss?charset=utf8mb4&parseTime=true&loc=UTC
|
||||||
|
|
||||||
# 日志配置
|
# 日志配置
|
||||||
logging:
|
logging:
|
||||||
@ -27,7 +27,7 @@ logging:
|
|||||||
# 是否压缩日志
|
# 是否压缩日志
|
||||||
compress: false
|
compress: false
|
||||||
# 控制台是否输出
|
# 控制台是否输出
|
||||||
stdout: false
|
stdout: true
|
||||||
|
|
||||||
# 消息配置
|
# 消息配置
|
||||||
messaging:
|
messaging:
|
||||||
|
25
third_party/interlock/beijing12/interlock.go
vendored
25
third_party/interlock/beijing12/interlock.go
vendored
@ -33,13 +33,26 @@ type InterlockProxy interface {
|
|||||||
var interlockMap = make(map[string]InterlockProxy)
|
var interlockMap = make(map[string]InterlockProxy)
|
||||||
var initMutex sync.Mutex
|
var initMutex sync.Mutex
|
||||||
|
|
||||||
func Default(c *config.InterlockConfig) InterlockProxy {
|
//func Default(c *config.InterlockConfig) InterlockProxy {
|
||||||
initMutex.Lock()
|
// initMutex.Lock()
|
||||||
defer initMutex.Unlock()
|
// defer initMutex.Unlock()
|
||||||
if interlockMap[c.Code] == nil {
|
// if interlockMap[c.Code] == nil {
|
||||||
interlockMap[c.Code] = &interlockProxy{runConfig: c}
|
// interlockMap[c.Code] = &interlockProxy{runConfig: c}
|
||||||
|
// }
|
||||||
|
// return interlockMap[c.Code]
|
||||||
|
//}
|
||||||
|
|
||||||
|
func Start(c *config.InterlockConfig, manager InterlockMessageManager) {
|
||||||
|
proxy := &interlockProxy{runConfig: c}
|
||||||
|
proxy.Start(manager)
|
||||||
|
interlockMap[c.Code] = proxy
|
||||||
|
}
|
||||||
|
|
||||||
|
func Stop(c *config.InterlockConfig) {
|
||||||
|
proxy := interlockMap[c.Code]
|
||||||
|
if proxy != nil {
|
||||||
|
proxy.Stop()
|
||||||
}
|
}
|
||||||
return interlockMap[c.Code]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type interlockProxy struct {
|
type interlockProxy struct {
|
||||||
|
@ -756,6 +756,10 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *data_pro
|
|||||||
for _, xcj := range repo.Xcjs {
|
for _, xcj := range repo.Xcjs {
|
||||||
xcjMap[xcj.Id] = xcj
|
xcjMap[xcj.Id] = xcj
|
||||||
}
|
}
|
||||||
|
sectionMap := make(map[string]*proto.PhysicalSection)
|
||||||
|
for _, section := range repo.PhysicalSections {
|
||||||
|
sectionMap[section.Id] = section
|
||||||
|
}
|
||||||
ciecs := stationMap[stationUid] //联锁集中站
|
ciecs := stationMap[stationUid] //联锁集中站
|
||||||
if ciecs == nil {
|
if ciecs == nil {
|
||||||
panic(fmt.Errorf("联锁集中站[%s]不存在", stationUid))
|
panic(fmt.Errorf("联锁集中站[%s]不存在", stationUid))
|
||||||
@ -907,6 +911,27 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *data_pro
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
case data_proto.RelatedRef_Section:
|
||||||
|
{
|
||||||
|
section, ok := sectionMap[GenerateElementUid(city, lineId, []string{station}, relationship.Code)]
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
for _, group := range relationship.Combinationtypes {
|
||||||
|
var componentIds []string
|
||||||
|
for _, relayId := range group.RefRelays {
|
||||||
|
if relayUidStructure.RelayIds[relayId] == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
componentIds = append(componentIds, relayUidStructure.RelayIds[relayId].Uid)
|
||||||
|
}
|
||||||
|
section.ElectronicComponentGroups = append(section.ElectronicComponentGroups,
|
||||||
|
&proto.ElectronicComponentGroup{
|
||||||
|
Code: group.Code,
|
||||||
|
ComponentIds: componentIds,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//门控箱
|
//门控箱
|
||||||
|
@ -126,7 +126,7 @@ func runThirdParty(s *memory.VerifySimulation) error {
|
|||||||
case "11":
|
case "11":
|
||||||
beijing11.Start(c, s)
|
beijing11.Start(c, s)
|
||||||
default:
|
default:
|
||||||
beijing12.Default(c).Start(s)
|
beijing12.Start(c, s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 计轴RSSP启动
|
// 计轴RSSP启动
|
||||||
@ -162,7 +162,7 @@ func stopThirdParty(s *memory.VerifySimulation) {
|
|||||||
case "11":
|
case "11":
|
||||||
beijing11.Stop()
|
beijing11.Stop()
|
||||||
default:
|
default:
|
||||||
beijing12.Default(c).Stop()
|
beijing12.Stop(c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//计轴RSSP启动销毁
|
//计轴RSSP启动销毁
|
||||||
|
Loading…
Reference in New Issue
Block a user