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

20 lines
342 B
Go
Raw Normal View History

2023-08-29 14:59:31 +08:00
package model
import "joylink.club/rtsssimulation/repository/model/proto"
type PortedDevice interface {
Model
// 端口数量
PortNum() int
// 下一个设备端口
Next(port proto.Port) DevicePort
// 其他设备端口
Others(port proto.Port) []DevicePort
}
type DevicePort interface {
Port() proto.Port
Device() PortedDevice
}