[bug]之前,在仿真运行时联锁配置中的code被替换为了车站uid,后来我只是简单将此转换去掉了,导致有些将此code当uid使用的场景出错
This commit is contained in:
parent
270f5a9772
commit
eae1b8d6df
|
@ -207,7 +207,12 @@ func (i *interlockProxy) handleFromCiData(n int, data []byte) {
|
|||
//处理驱动数据
|
||||
if i.simulation != nil {
|
||||
logger().Info(fmt.Sprintf("解析出的驱动数据:%x", msg.driveData))
|
||||
i.simulation.HandleInterlockDriverInfo(i.runConfig.Code, msg.driveData)
|
||||
station := i.simulation.Repo.FindStationByStationName(i.runConfig.Code)
|
||||
if station != nil {
|
||||
i.simulation.HandleInterlockDriverInfo(station.Id(), msg.driveData)
|
||||
} else {
|
||||
logger().Error(fmt.Sprintf("没有找到名为%s的车站", i.runConfig.Code))
|
||||
}
|
||||
}
|
||||
//处理应答器数据
|
||||
for _, datum := range msg.baliseTelegramData {
|
||||
|
|
|
@ -430,8 +430,12 @@ func (s *VerifySimulation) HandleInterlockDriverInfo(code string, driveBytes []b
|
|||
|
||||
// 采集联锁中的继电器消息
|
||||
func (s *VerifySimulation) CollectInterlockRelayInfo(code string) *message.InterlockSendMsgPkg {
|
||||
station := s.Repo.FindStationByStationName(code)
|
||||
if station == nil {
|
||||
return nil
|
||||
}
|
||||
for _, m := range s.Repo.CiQcList() { // 获取继电器地图信息
|
||||
if m.StationId != code {
|
||||
if m.StationId != station.Id() {
|
||||
continue
|
||||
}
|
||||
if len(m.CjList) == 0 {
|
||||
|
|
Loading…
Reference in New Issue