[新增]ecs物理区段增加区段电路组件及逻辑;
[修改]12号线联锁通信服务如果启动失败,则启动参数无法更换bug
This commit is contained in:
parent
6211f61ecd
commit
d610a15fdb
@ -6,7 +6,7 @@ server:
|
||||
# 数据源
|
||||
datasource:
|
||||
# 数据库访问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:
|
||||
@ -27,7 +27,7 @@ logging:
|
||||
# 是否压缩日志
|
||||
compress: false
|
||||
# 控制台是否输出
|
||||
stdout: false
|
||||
stdout: true
|
||||
|
||||
# 消息配置
|
||||
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 initMutex sync.Mutex
|
||||
|
||||
func Default(c *config.InterlockConfig) InterlockProxy {
|
||||
initMutex.Lock()
|
||||
defer initMutex.Unlock()
|
||||
if interlockMap[c.Code] == nil {
|
||||
interlockMap[c.Code] = &interlockProxy{runConfig: c}
|
||||
//func Default(c *config.InterlockConfig) InterlockProxy {
|
||||
// initMutex.Lock()
|
||||
// defer initMutex.Unlock()
|
||||
// if interlockMap[c.Code] == nil {
|
||||
// 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 {
|
||||
|
@ -756,6 +756,10 @@ func buildAndRelateElectronicComponent(repo *proto.Repository, relayGi *data_pro
|
||||
for _, xcj := range repo.Xcjs {
|
||||
xcjMap[xcj.Id] = xcj
|
||||
}
|
||||
sectionMap := make(map[string]*proto.PhysicalSection)
|
||||
for _, section := range repo.PhysicalSections {
|
||||
sectionMap[section.Id] = section
|
||||
}
|
||||
ciecs := stationMap[stationUid] //联锁集中站
|
||||
if ciecs == nil {
|
||||
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":
|
||||
beijing11.Start(c, s)
|
||||
default:
|
||||
beijing12.Default(c).Start(s)
|
||||
beijing12.Start(c, s)
|
||||
}
|
||||
}
|
||||
// 计轴RSSP启动
|
||||
@ -162,7 +162,7 @@ func stopThirdParty(s *memory.VerifySimulation) {
|
||||
case "11":
|
||||
beijing11.Stop()
|
||||
default:
|
||||
beijing12.Default(c).Stop()
|
||||
beijing12.Stop(c)
|
||||
}
|
||||
}
|
||||
//计轴RSSP启动销毁
|
||||
|
Loading…
Reference in New Issue
Block a user