24 lines
400 B
Go
24 lines
400 B
Go
|
package tmodel
|
||
|
|
||
|
import (
|
||
|
"joylink.club/rtsssimulation/umi"
|
||
|
)
|
||
|
|
||
|
// 设备模型基础信息
|
||
|
type DeviceModel struct {
|
||
|
// 设备id
|
||
|
Id string
|
||
|
// 设备类型
|
||
|
Type umi.DeviceType
|
||
|
}
|
||
|
|
||
|
func (me *DeviceModel) GetId() string {
|
||
|
return me.Id
|
||
|
}
|
||
|
func (me *DeviceModel) IsSame(other umi.IDeviceModel) bool {
|
||
|
return me.Id == other.GetId()
|
||
|
}
|
||
|
func (me *DeviceModel) GetType() umi.DeviceType {
|
||
|
return me.Type
|
||
|
}
|