2023-09-06 16:20:36 +08:00
|
|
|
package repository
|
|
|
|
|
|
|
|
import "joylink.club/rtsssimulation/repository/model/proto"
|
|
|
|
|
|
|
|
type Signal struct {
|
|
|
|
Identity
|
|
|
|
|
2023-09-14 15:06:51 +08:00
|
|
|
km *proto.Kilometer
|
|
|
|
//section *PhysicalSection
|
|
|
|
//turnoutPort TurnoutPort
|
2023-09-20 15:14:38 +08:00
|
|
|
linkPosition *LinkPosition
|
2023-09-06 16:20:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewSignal(id string, km *proto.Kilometer) *Signal {
|
|
|
|
return &Signal{
|
|
|
|
Identity: identity{id, proto.DeviceType_DeviceType_Signal},
|
|
|
|
km: km,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-20 15:14:38 +08:00
|
|
|
func (s *Signal) bindLinkPosition(position *LinkPosition) {
|
|
|
|
s.linkPosition = position
|
|
|
|
}
|
|
|
|
|
2023-09-14 15:06:51 +08:00
|
|
|
//func (s *Signal) bindSection(section *PhysicalSection) {
|
|
|
|
// s.section = section
|
|
|
|
//}
|
|
|
|
//
|
|
|
|
//func (s *Signal) bindTurnoutPort(tp TurnoutPort) {
|
|
|
|
// s.turnoutPort = tp
|
|
|
|
//}
|