From 807bce391c7f2adc4514ac1d66f39f26d56f9376 Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Thu, 13 Jun 2024 18:35:17 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=B9=B3=E8=A5=BF=E5=BA=9C?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=9B=20[=E6=96=B0?= =?UTF-8?q?=E5=A2=9E]11=E5=8F=B7=E7=BA=BF=E8=81=94=E9=94=81=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E6=95=B4=E7=90=86=EF=BC=88=E6=9C=AA=E5=AE=8C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/bj_local_pxf.yml | 2 +- third_party/interlock/beijing11/repo.go | 1 + third_party/interlock/beijing11/service.go | 39 ++++++++++++++++++---- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/config/bj_local_pxf.yml b/config/bj_local_pxf.yml index a38bc7b..ddf7b0e 100644 --- a/config/bj_local_pxf.yml +++ b/config/bj_local_pxf.yml @@ -15,7 +15,7 @@ logging: # 格式化 # format: json # 日志文件路径 - path: /logs/bjrtsts + path: /home/joylink/logs/bjrtsts # 日志文件名 fileName: bjrtsts.log # 单个日志文件大小,单位mb,超过会自动滚动 diff --git a/third_party/interlock/beijing11/repo.go b/third_party/interlock/beijing11/repo.go index 93bbb6a..20d0162 100644 --- a/third_party/interlock/beijing11/repo.go +++ b/third_party/interlock/beijing11/repo.go @@ -1,6 +1,7 @@ package beijing11 // StationDeviceIndexRepo 联锁站设备索引映射 +// key为联锁编号,val为uid type StationDeviceIndexRepo struct { StationName string TurnoutMap map[uint32]string diff --git a/third_party/interlock/beijing11/service.go b/third_party/interlock/beijing11/service.go index 24eb842..c3c6a6f 100644 --- a/third_party/interlock/beijing11/service.go +++ b/third_party/interlock/beijing11/service.go @@ -29,9 +29,20 @@ func init() { //if data.LianSuoData == nil { // return //} - ////初始化所有集中站设备映射结构体 + ////初始化所有集中站设备映射结构体;建立车站和集中站的comId映射关系 + //station_concentration_map := make(map[uint32]uint32) //for _, station := range data.Stations { - // stationMap[station.StationName] = NewStationDeviceIndexRepo() + // if station.ConcentrationStations { + // stationMap[station.StationName] = NewStationDeviceIndexRepo() + // for _, manageStation := range station.ManageStations { + // station_concentration_map[manageStation] = station.Common.Id + // } + // } + //} + ////建立站台和集中站的comId映射 + //platform_station_map := make(map[uint32]uint32) + //for _, platform := range data.Platforms { + // platform_station_map[platform.Common.Id] = station_concentration_map[platform.RefStationId] //} ////填充 //stationIdMap := uidStructure.StationIds @@ -39,15 +50,31 @@ func init() { //turnoutUidMap := uidStructure.TurnoutIds //turnoutIndexMap := make(map[uint32]uint32) //for _, turnout := range data.LianSuoData.Switchs { - // turnoutIndexMap[turnout.Id] = + // turnoutIndexMap[turnout.Id] = turnout.Index //} //for _, turnout := range data.Turnouts { - // for _, stationCid := range turnout.CentralizedStations { - // stationIdStruct := stationIdMap[stationCid] + // for _, stationComId := range turnout.CentralizedStations { + // stationIdStruct := stationIdMap[stationComId] // stationDeviceIndexRepo := stationMap[stationIdStruct.Code] - // stationDeviceIndexRepo.TurnoutMap[] + // index := turnoutIndexMap[turnout.Common.Id] + // stationDeviceIndexRepo.TurnoutMap[index] = turnoutUidMap[turnout.Common.Id].Uid // } //} + ////屏蔽门 + //psdUidMap := uidStructure.PsdIds + //psdIndexMap := make(map[uint32]uint32) + //for _, psd := range data.LianSuoData.ScreenDoors { + // psdIndexMap[psd.Id] = psd.Index + //} + //for _, psd := range data.ScreenDoors { + // stationComId := platform_station_map[psd.RefPlatformId] + // stationIdStruct := stationIdMap[stationComId] + // stationDeviceIndexRepo := stationMap[stationIdStruct.Code] + // index := psdIndexMap[psd.Common.Id] + // stationDeviceIndexRepo.PsdMap[index] = psdUidMap[psd.Common.Id].Uid + //} + ////紧急停车 + //uidStructure. }) }