rts-sim-module/repository/signal.go

27 lines
513 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
}
func NewSignal(id string, km *proto.Kilometer) *Signal {
return &Signal{
Identity: identity{id, proto.DeviceType_DeviceType_Signal},
km: km,
}
}
func (s *Signal) bindSection(section *PhysicalSection) {
s.section = section
}
func (s *Signal) bindTurnoutPort(tp TurnoutPort) {
s.turnoutPort = tp
}