[修改]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 {
|
for _, data := range stationGi.LianSuoData.AcSections {
|
||||||
// if data.Index <= 0 {
|
if data.Index <= 0 {
|
||||||
// continue
|
continue
|
||||||
// }
|
}
|
||||||
// if data.Index == 0 { //这是其它线的区段
|
sectionModule := sim.Repo.FindAxleCountingSection(uids.AxleCountingSectionIds[data.Id].Uid)
|
||||||
// continue
|
for _, station := range sectionModule.PhysicalSection().CentralizedStation() {
|
||||||
// }
|
if station.GetCode() == stationCode {
|
||||||
// for _, station := range uids.AxleCountingSectionIds[data.Id].CentralizedStations {
|
table.AxleSectionMap[uint16(data.Id)] = &Row{
|
||||||
// if station.StationName == stationCode {
|
commonId: data.Id,
|
||||||
// table.AxleSectionMap[uint16(data.Id)] = &Row{
|
uid: uids.AxleCountingSectionIds[data.Id].Uid,
|
||||||
// commonId: data.Id,
|
index: uint16(data.Index),
|
||||||
// uid: uids.PhysicalSectionIds[data.Id].Uid,
|
relateDeviceMap: nil,
|
||||||
// index: uint16(data.Index),
|
}
|
||||||
// relateDeviceMap: nil,
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//无人折返,实际数据中数量为0
|
//无人折返,实际数据中数量为0
|
||||||
//防淹门,实际数据中数量为0
|
//防淹门,实际数据中数量为0
|
||||||
//人员防护
|
//人员防护
|
||||||
@ -360,10 +358,10 @@ func (s *serviceContext) collectDeviceState() *ToInterlockFrame {
|
|||||||
//计轴区段
|
//计轴区段
|
||||||
for _, row := range s.deviceTable.AxleSectionMap {
|
for _, row := range s.deviceTable.AxleSectionMap {
|
||||||
entry := wd.EntityMap[row.uid]
|
entry := wd.EntityMap[row.uid]
|
||||||
axleManager := component.PhysicalSectionManagerType.Get(entry)
|
sectionState := component.AxleCountingSectionStateType.Get(entry)
|
||||||
frame.AxleSectionStates = append(frame.AxleSectionStates, &AxleSectionState{
|
frame.AxleSectionStates = append(frame.AxleSectionStates, &AxleSectionState{
|
||||||
Id: row.index,
|
Id: row.index,
|
||||||
State: GetStateByte(axleManager.Occupied),
|
State: GetStateByte(sectionState.Occupied),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//SPKS
|
//SPKS
|
||||||
|
@ -1125,19 +1125,23 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
|
|||||||
turnoutUids = append(turnoutUids, uidsMap.TurnoutIds[tid].Uid)
|
turnoutUids = append(turnoutUids, uidsMap.TurnoutIds[tid].Uid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var centralizedStation string
|
var centralizedStationIds []string
|
||||||
if len(data.CentralizedStations) > 0 {
|
for _, station := range uidsMap.PhysicalSectionIds[data.Common.Id].CentralizedStations {
|
||||||
s := uidsMap.StationIds[data.CentralizedStations[0]]
|
centralizedStationIds = append(centralizedStationIds, uidsMap.StationIds[station.Common.Id].Uid)
|
||||||
if s != nil {
|
|
||||||
centralizedStation = s.Code
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
//var centralizedStation string
|
||||||
|
//if len(data.CentralizedStations) > 0 {
|
||||||
|
// s := uidsMap.StationIds[data.CentralizedStations[0]]
|
||||||
|
// if s != nil {
|
||||||
|
// centralizedStation = s.Code
|
||||||
|
// }
|
||||||
|
//}
|
||||||
physicalSection := &proto.PhysicalSection{
|
physicalSection := &proto.PhysicalSection{
|
||||||
Id: uidsMap.PhysicalSectionIds[GetMapElementId(data.Common)].Uid,
|
Id: uidsMap.PhysicalSectionIds[GetMapElementId(data.Common)].Uid,
|
||||||
ADevicePort: convertDevicePort(data.PaRef, uidsMap),
|
ADevicePort: convertDevicePort(data.PaRef, uidsMap),
|
||||||
BDevicePort: convertDevicePort(data.PbRef, uidsMap),
|
BDevicePort: convertDevicePort(data.PbRef, uidsMap),
|
||||||
TurnoutIds: turnoutUids,
|
TurnoutIds: turnoutUids,
|
||||||
CentralizedStation: centralizedStation,
|
CentralizedStation: centralizedStationIds,
|
||||||
}
|
}
|
||||||
repo.PhysicalSections = append(repo.PhysicalSections, physicalSection)
|
repo.PhysicalSections = append(repo.PhysicalSections, physicalSection)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user