rts-sim-module/repository/model/link.go

43 lines
550 B
Go
Raw Normal View History

2023-08-29 14:59:31 +08:00
package model
import "joylink.club/rtsssimulation/repository/model/proto"
type Link struct {
Model
aRelation LinkNodePort
bRelation LinkNodePort
}
func NewLink(model Model) Link {
return Link{Model: model}
}
// link位置
type LinkPosition struct {
link *Link
offset int
}
// link节点
type LinkNode struct {
turnout *Turnout
aRelation LinkPort
bRelation LinkPort
cRelation LinkPort
}
type LinkPort struct {
DevicePort
link *Link
port proto.Port
}
type LinkNodePort struct {
DevicePort
node *LinkNode
port proto.Port
}