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

25 lines
454 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 (
2023-08-23 15:13:06 +08:00
"joylink.club/rtsssimulation/components/cstate"
2023-08-22 11:00:14 +08:00
"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-22 11:00:14 +08:00
Type cstate.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-22 11:00:14 +08:00
func (me *DeviceModel) GetType() cstate.DeviceType {
2023-08-21 15:12:57 +08:00
return me.Type
}