rts-sim-module/repository/responder.go

27 lines
552 B
Go

package repository
import "joylink.club/rtsssimulation/repository/model/proto"
type Responder struct {
Identity
km *proto.Kilometer
section *PhysicalSection
turnoutPort TurnoutPort
}
func NewResponder(id string, km *proto.Kilometer) *Responder {
return &Responder{
Identity: identity{id, proto.DeviceType_DeviceType_Responder},
km: km,
}
}
func (r *Responder) bindSection(section *PhysicalSection) {
r.section = section
}
func (r *Responder) bindTurnoutPort(turnoutPort TurnoutPort) {
r.turnoutPort = turnoutPort
}