emulation

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OFF      = "OFF"
	HEAT     = "HEAT"
	COOL     = "COOL"
	HEATCOOL = "HEATCOOL"
)

Variables

This section is empty.

Functions

Types

type EmulatedDevice

type EmulatedDevice struct {
	*sdmclient.DeviceEndpoint

	*sync.Mutex

	*service.Thermostat
	// contains filtered or unexported fields
}

func NewEmulatedDevice

func NewEmulatedDevice(ctx context.Context, c *config.Config, t *service.Thermostat) (*EmulatedDevice, error)

func (*EmulatedDevice) CurrentMode

func (d *EmulatedDevice) CurrentMode() int

func (*EmulatedDevice) CurrentTemp

func (d *EmulatedDevice) CurrentTemp() float64

func (*EmulatedDevice) DisplayUnit

func (d *EmulatedDevice) DisplayUnit() int

func (*EmulatedDevice) ForceUpdate

func (d *EmulatedDevice) ForceUpdate() error

func (*EmulatedDevice) ListenEvents

func (d *EmulatedDevice) ListenEvents() error

func (*EmulatedDevice) SetTargetMode

func (d *EmulatedDevice) SetTargetMode(n int) error

func (*EmulatedDevice) SetTargetTemp

func (d *EmulatedDevice) SetTargetTemp(t float64) error

func (*EmulatedDevice) SetupHandlers

func (d *EmulatedDevice) SetupHandlers()

func (*EmulatedDevice) TargetMode

func (d *EmulatedDevice) TargetMode() int

func (*EmulatedDevice) TargetTemp

func (d *EmulatedDevice) TargetTemp() float64

func (*EmulatedDevice) UpdateTraits

func (d *EmulatedDevice) UpdateTraits(t PubsubUpdate)

type PubsubUpdate

type PubsubUpdate struct {
	Timestamp      time.Time
	ResourceUpdate struct {
		Traits sdmclient.DeviceTraits
	}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL