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

20 lines
342 B
Go

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
}