[修改]11号线联锁通信,区段状态从物理区段改为计轴区段
Some checks failed
local-test分支打包构建docker并发布运行 / Docker-Build (push) Failing after 50s
Some checks failed
local-test分支打包构建docker并发布运行 / Docker-Build (push) Failing after 50s
This commit is contained in:
parent
4044b7f4c2
commit
5e70ad158e
40
third_party/interlock/beijing11/service.go
vendored
40
third_party/interlock/beijing11/service.go
vendored
@ -205,25 +205,23 @@ func makeTable(sim *memory.VerifySimulation, stationCode string) *StationDeviceI
|
||||
}
|
||||
}
|
||||
}
|
||||
////计轴区段
|
||||
//for _, data := range stationGi.LianSuoData.AcSections {
|
||||
// if data.Index <= 0 {
|
||||
// continue
|
||||
// }
|
||||
// if data.Index == 0 { //这是其它线的区段
|
||||
// continue
|
||||
// }
|
||||
// for _, station := range uids.AxleCountingSectionIds[data.Id].CentralizedStations {
|
||||
// if station.StationName == stationCode {
|
||||
// table.AxleSectionMap[uint16(data.Id)] = &Row{
|
||||
// commonId: data.Id,
|
||||
// uid: uids.PhysicalSectionIds[data.Id].Uid,
|
||||
// index: uint16(data.Index),
|
||||
// relateDeviceMap: nil,
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//计轴区段
|
||||
for _, data := range stationGi.LianSuoData.AcSections {
|
||||
if data.Index <= 0 {
|
||||
continue
|
||||
}
|
||||
sectionModule := sim.Repo.FindAxleCountingSection(uids.AxleCountingSectionIds[data.Id].Uid)
|
||||
for _, station := range sectionModule.PhysicalSection().CentralizedStation() {
|
||||
if station.GetCode() == stationCode {
|
||||
table.AxleSectionMap[uint16(data.Id)] = &Row{
|
||||
commonId: data.Id,
|
||||
uid: uids.AxleCountingSectionIds[data.Id].Uid,
|
||||
index: uint16(data.Index),
|
||||
relateDeviceMap: nil,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//无人折返,实际数据中数量为0
|
||||
//防淹门,实际数据中数量为0
|
||||
//人员防护
|
||||
@ -360,10 +358,10 @@ func (s *serviceContext) collectDeviceState() *ToInterlockFrame {
|
||||
//计轴区段
|
||||
for _, row := range s.deviceTable.AxleSectionMap {
|
||||
entry := wd.EntityMap[row.uid]
|
||||
axleManager := component.PhysicalSectionManagerType.Get(entry)
|
||||
sectionState := component.AxleCountingSectionStateType.Get(entry)
|
||||
frame.AxleSectionStates = append(frame.AxleSectionStates, &AxleSectionState{
|
||||
Id: row.index,
|
||||
State: GetStateByte(axleManager.Occupied),
|
||||
State: GetStateByte(sectionState.Occupied),
|
||||
})
|
||||
}
|
||||
//SPKS
|
||||
|
@ -1125,19 +1125,23 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
|
||||
turnoutUids = append(turnoutUids, uidsMap.TurnoutIds[tid].Uid)
|
||||
}
|
||||
}
|
||||
var centralizedStation string
|
||||
if len(data.CentralizedStations) > 0 {
|
||||
s := uidsMap.StationIds[data.CentralizedStations[0]]
|
||||
if s != nil {
|
||||
centralizedStation = s.Code
|
||||
}
|
||||
var centralizedStationIds []string
|
||||
for _, station := range uidsMap.PhysicalSectionIds[data.Common.Id].CentralizedStations {
|
||||
centralizedStationIds = append(centralizedStationIds, uidsMap.StationIds[station.Common.Id].Uid)
|
||||
}
|
||||
//var centralizedStation string
|
||||
//if len(data.CentralizedStations) > 0 {
|
||||
// s := uidsMap.StationIds[data.CentralizedStations[0]]
|
||||
// if s != nil {
|
||||
// centralizedStation = s.Code
|
||||
// }
|
||||
//}
|
||||
physicalSection := &proto.PhysicalSection{
|
||||
Id: uidsMap.PhysicalSectionIds[GetMapElementId(data.Common)].Uid,
|
||||
ADevicePort: convertDevicePort(data.PaRef, uidsMap),
|
||||
BDevicePort: convertDevicePort(data.PbRef, uidsMap),
|
||||
TurnoutIds: turnoutUids,
|
||||
CentralizedStation: centralizedStation,
|
||||
CentralizedStation: centralizedStationIds,
|
||||
}
|
||||
repo.PhysicalSections = append(repo.PhysicalSections, physicalSection)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user