2023-09-14 15:03:16 +08:00
|
|
|
package tmodel
|
|
|
|
|
2023-09-15 10:13:25 +08:00
|
|
|
import "joylink.club/rtsssimulation/umi"
|
|
|
|
|
2023-09-14 15:03:16 +08:00
|
|
|
// 继电器模型
|
|
|
|
type RelayModel struct {
|
2023-09-15 10:13:25 +08:00
|
|
|
DeviceModel
|
|
|
|
RelayType umi.RelayType
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewRelayModel(id string, relayType umi.RelayType) *RelayModel {
|
|
|
|
return &RelayModel{DeviceModel: DeviceModel{Id: id, Type: umi.Relay}, RelayType: relayType}
|
|
|
|
}
|
|
|
|
|
|
|
|
//该继电器类型
|
|
|
|
func (me *RelayModel) JType() umi.RelayType {
|
|
|
|
return me.RelayType
|
2023-09-14 15:03:16 +08:00
|
|
|
}
|