opclient

package
v0.0.0-...-33c2882 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 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 Backend

type Backend struct {
	Servers []OPCServer `json:"servers"`
}

func (*Backend) DiscoverLights

func (b *Backend) DiscoverLights(l *chromaticity.LightResource)

func (*Backend) GetType

func (b *Backend) GetType() string

func (*Backend) ImportLights

func (b *Backend) ImportLights(l *chromaticity.LightResource, from []byte)

func (*Backend) Sync

func (b *Backend) Sync()

type Channel

type Channel struct {
	ID            uint8            `json:"id"`
	NumPixels     uint16           `json:"numPixels"`
	Server        *OPCServer       `json:"-"`
	CurrentColors []colorful.Color `json:"-"`
	NextColors    []colorful.Color `json:"-"`
}

type OPCLight

type OPCLight struct {
	*chromaticity.LightInfo
	LightState *chromaticity.State `json:"state"`
	Chan       *Channel            `json:"-"`
}

func (OPCLight) GetInfo

func (o OPCLight) GetInfo() *chromaticity.LightInfo

func (OPCLight) GetNumPixels

func (o OPCLight) GetNumPixels() uint16

func (OPCLight) GetState

func (o OPCLight) GetState() *chromaticity.State

func (OPCLight) GetType

func (o OPCLight) GetType() string

func (OPCLight) SetColor

func (o OPCLight) SetColor(c colorful.Color)

func (OPCLight) SetColors

func (o OPCLight) SetColors(c []colorful.Color)

type OPCServer

type OPCServer struct {
	Name        string      `json:"name"`
	Address     string      `json:"address"`
	RefreshRate uint8       `json:"refreshrate"`
	Type        string      `json:"type"`
	White       uint16      `json:"white"`
	Gamma       float64     `json:"gamma"`
	Channels    []Channel   `json:"channels"`
	Client      *opc.Client `json:"-"`
}

func (*OPCServer) Connect

func (server *OPCServer) Connect()

func (*OPCServer) Sync

func (server *OPCServer) Sync()

Jump to

Keyboard shortcuts

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