rts-sim-module/examples/test1/tmodel/relay_model.go
2023-09-15 10:13:25 +08:00

19 lines
398 B
Go

package tmodel
import "joylink.club/rtsssimulation/umi"
// 继电器模型
type RelayModel struct {
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
}