Merge branch 'master' of https://git.code.tencent.com/jl-framework/rtss_simulation
This commit is contained in:
commit
d8efe7c24c
@ -71,6 +71,21 @@ func (repo *Repository) FindById(id string) Identity {
|
||||
if md, ok := repo.relayMap[id]; ok {
|
||||
return md
|
||||
}
|
||||
if md, ok := repo.physicalSectionMap[id]; ok {
|
||||
return md
|
||||
}
|
||||
if md, ok := repo.checkPointMap[id]; ok {
|
||||
return md
|
||||
}
|
||||
if md, ok := repo.responderMap[id]; ok {
|
||||
return md
|
||||
}
|
||||
if md, ok := repo.stationMap[id]; ok {
|
||||
return md
|
||||
}
|
||||
if md, ok := repo.platformMap[id]; ok {
|
||||
return md
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package repository
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"joylink.club/rtsssimulation/repository/model/proto"
|
||||
)
|
||||
|
||||
@ -278,6 +279,14 @@ func (t *Turnout) FindRelay(groupCode, relayCode string) *Relay {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *Turnout) GetPhysicalSection() *PhysicalSection {
|
||||
return t.section
|
||||
}
|
||||
|
||||
func (t *Turnout) GindDevicePortByPort(port proto.Port) DevicePort {
|
||||
return t.findDevicePortByPort(port)
|
||||
}
|
||||
|
||||
type TurnoutPort struct {
|
||||
turnout *Turnout
|
||||
port proto.Port
|
||||
|
Loading…
Reference in New Issue
Block a user