state

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoStateGettable     = errors.New("can't get the state of any devices in this room")
	ErrDriverNotRegistered = errors.New("driver not registered")
)
View Source
var (
	ErrInvalidDevice = errors.New("device is invalid in this room")
	ErrNotCapable    = errors.New("can't set this field on this device")
	ErrInvalidBlock  = errors.New("invalid block")
)

Functions

This section is empty.

Types

type GetSetter

type GetSetter struct {
	Logger         *zap.Logger
	DriverRegistry avcontrol.DriverRegistry
}

GetSetter is used to get and set the status of the devices in a room.

func (*GetSetter) Get

Get goes through the devices in the RoomConfig and reports on the state of the room.

func (*GetSetter) GetHealth

func (gs *GetSetter) GetHealth(ctx context.Context, room avcontrol.RoomConfig) (avcontrol.RoomHealth, error)

GetHealth goes through the devices in the RoomConfig and reports on their health statuses. Takes RoomConfig as an input and returns RoomHealth.

func (*GetSetter) GetInfo

GetInfo goes through the devices in the RoomConfig and reports on their status. Takes RoomConfig as an input and returns RoomInfo.

func (*GetSetter) Set

Set goes through the devices in the RoomConfig and sets their states to match whats in the given StateRequest. Takes RoomConfig and StateRequest as input and returns StateResponse.

Jump to

Keyboard shortcuts

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