lifx

package
v0.0.0-...-d92405d Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Config
	net.PacketConn
	// contains filtered or unexported fields
}

func New

func New(c Config) (*Client, error)

func (*Client) End

func (l *Client) End()

func (*Client) SetColor

func (l *Client) SetColor(target uint64, s SetColor) error

func (*Client) SetPower

func (l *Client) SetPower(target uint64, s SetPower) error

func (*Client) State

func (l *Client) State(target uint64) (State, error)

func (*Client) States

func (l *Client) States() ([]State, error)

func (*Client) Watch

func (l *Client) Watch(ctx context.Context) (<-chan State, error)

type Color

type Color struct {
	H, S, B, K uint16
}

type Config

type Config struct {
	Timeout int
	Devices int
}

type SetColor

type SetColor struct {
	Color
	Duration uint32
}

type SetPower

type SetPower struct {
	Level uint16
}

type State

type State struct {
	Target uint64
	Power  uint16
	Color
}

Jump to

Keyboard shortcuts

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