rts-sim-module/repository/device_port.go

22 lines
451 B
Go
Raw Normal View History

package repository
import "joylink.club/rtsssimulation/repository/model/proto"
type PortedDevice interface {
Identity
// PortNum 端口数量
PortNum() int
// 关联设备端口
bindDevicePort(port proto.Port, devicePort DevicePort) error
//// 下一个设备端口
//Next(port proto.Port) DevicePort
//// 其他设备端口
//Others(port proto.Port) []DevicePort
}
type DevicePort interface {
Port() proto.Port
Device() PortedDevice
}