device

package
v0.0.0-...-c730260 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bar

type Bar struct {
	*node.Line
	// contains filtered or unexported fields
}

Bar is a strait bar of lights

func NewBar

func NewBar(id uuid.UUID, sender addressable.Sender, bearings *space.Object, spacing addressable.Spacing, leds int) *Bar

NewBar creates a new Bar

func (Bar) DispatchRender

func (d Bar) DispatchRender(t time.Time) error

Render calls render on the underlying line

func (Bar) GetNodeInfos

func (b Bar) GetNodeInfos() []common.NodeInfo

GetNodeInfos returns all the Nodes which the device holds

func (Bar) GetNodes

func (b Bar) GetNodes() []common.Node

GetNodes returns all the Nodes which the device holds

func (Bar) GetType

func (Bar) GetType() string

GetType returns the type

func (Bar) MarshalJSON

func (d Bar) MarshalJSON() ([]byte, error)

func (*Bar) UnmarshalJSON

func (d *Bar) UnmarshalJSON(data []byte) error

type Ring

type Ring struct {
	*node.Arc
	// contains filtered or unexported fields
}

Ring is a ring of LEDs

func NewRing

func NewRing(id uuid.UUID, sender addressable.Sender, bearings *space.Object, spacing addressable.Spacing, leds int, radius float64, aspect addressable.Aspect) Ring

NewRing returns a new Ring

func (Ring) DispatchRender

func (d Ring) DispatchRender(t time.Time) error

DispatchRender calls render on each of the rings and then appends all the lights

func (Ring) GetNodeInfos

func (d Ring) GetNodeInfos() []common.NodeInfo

GetNodeInfos returns all the Nodes which the device holds

func (Ring) GetNodes

func (d Ring) GetNodes() []common.Node

GetNodes returns all the Nodes which the device holds

func (Ring) GetType

func (d Ring) GetType() string

GetType returns the type

func (Ring) MarshalJSON

func (d Ring) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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