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