[新增]区段、Link、运营方向/位置之间互相转换的函数
This commit is contained in:
parent
90003ec942
commit
a613ac109b
@ -1,6 +1,7 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"joylink.club/rtsssimulation/repository/model/proto"
|
||||
)
|
||||
|
||||
@ -145,6 +146,10 @@ func (l *LinkPosition) Offset() int64 {
|
||||
return l.offset
|
||||
}
|
||||
|
||||
func (l *LinkPosition) String() string {
|
||||
return fmt.Sprintf("[LinkPosition:{%s-%d]", l.link.Id(), l.offset)
|
||||
}
|
||||
|
||||
// link端口
|
||||
type LinkPort struct {
|
||||
link *Link
|
||||
|
Loading…
Reference in New Issue
Block a user