rts-sim-module/storages/model/device_model.go
2023-08-23 15:23:30 +08:00

25 lines
454 B
Go

package model
import (
"joylink.club/rtsssimulation/components/cstate"
"joylink.club/rtsssimulation/umi"
)
// 设备模型基础信息
type DeviceModel struct {
// 设备id
Id string
// 设备类型
Type cstate.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() cstate.DeviceType {
return me.Type
}