rts-sim-module/storages/model/device_model.go

24 lines
399 B
Go
Raw Normal View History

2023-08-14 16:23:34 +08:00
package model
2023-08-22 11:00:14 +08:00
import (
"joylink.club/rtsssimulation/umi"
)
2023-08-18 17:59:16 +08:00
// 设备模型基础信息
2023-08-14 18:06:26 +08:00
type DeviceModel struct {
2023-08-21 15:12:57 +08:00
// 设备id
2023-08-14 16:23:34 +08:00
Id string
2023-08-21 15:12:57 +08:00
// 设备类型
2023-08-23 16:52:01 +08:00
Type umi.DeviceType
2023-08-14 16:23:34 +08:00
}
2023-08-18 17:59:16 +08:00
func (me *DeviceModel) GetId() string {
return me.Id
}
2023-08-22 11:00:14 +08:00
func (me *DeviceModel) IsSame(other umi.IDeviceModel) bool {
2023-08-18 17:59:16 +08:00
return me.Id == other.GetId()
}
2023-08-23 16:52:01 +08:00
func (me *DeviceModel) GetType() umi.DeviceType {
2023-08-21 15:12:57 +08:00
return me.Type
}