rts-sim-module/repository/signal.go

37 lines
820 B
Go
Raw Normal View History

package repository
import "joylink.club/rtsssimulation/repository/model/proto"
type Signal struct {
Identity
km *proto.Kilometer
//section *PhysicalSection
//turnoutPort TurnoutPort
linkPosition *LinkPosition
2023-10-08 13:11:34 +08:00
//信号机电路系统电子元器件
componentGroups []*ElectronicComponentGroup
}
func NewSignal(id string, km *proto.Kilometer) *Signal {
return &Signal{
Identity: identity{id, proto.DeviceType_DeviceType_Signal},
km: km,
}
}
func (s *Signal) bindLinkPosition(position *LinkPosition) {
s.linkPosition = position
}
2023-10-08 13:11:34 +08:00
// func (s *Signal) bindSection(section *PhysicalSection) {
// s.section = section
// }
//
2023-10-08 13:11:34 +08:00
// func (s *Signal) bindTurnoutPort(tp TurnoutPort) {
// s.turnoutPort = tp
// }
func (s *Signal) RelayGroups() []*ElectronicComponentGroup {
return s.componentGroups
}