balise detect 预测实现

This commit is contained in:
xzb 2023-12-01 15:38:20 +08:00
parent 74dcb57861
commit 96f777e0e8

View File

@ -126,6 +126,9 @@ type LinkPosition struct {
offset int64 offset int64
} }
func NewLinkPosition(link *Link, offset int64) *LinkPosition {
return &LinkPosition{link: link, offset: offset}
}
func (l *LinkPosition) Link() *Link { func (l *LinkPosition) Link() *Link {
return l.link return l.link
} }
@ -157,6 +160,9 @@ func (l *LinkPort) Device() PortedDevice {
func (l *LinkPort) IsPortA() bool { func (l *LinkPort) IsPortA() bool {
return l.port == proto.Port_A return l.port == proto.Port_A
} }
func (l *LinkPort) Link() *Link {
return l.link
}
type LinkRange struct { type LinkRange struct {
link *Link link *Link