rpc

package
v0.0.0-...-57c47e7 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(network, addr string, size int) (canvas.Matrix, error)

NewRGBLedMatrix returns a new matrix using the given size and config

func Serve

func Serve(m canvas.Matrix) error

Types

type ApplyArgs

type ApplyArgs struct{ Colors []color.Color }

type ApplyReply

type ApplyReply struct{}

type Client

type Client struct {
	// contains filtered or unexported fields
}

RGBLedMatrix matrix representation for ws281x

func (*Client) Apply

func (c *Client) Apply(leds []color.Color) error

func (*Client) At

func (c *Client) At(position int) color.Color

At return an Color which allows access to the LED display data as if it were a sequence of 24-bit RGB values.

func (*Client) Close

func (c *Client) Close() error

Close finalizes the ws281x interface

func (*Client) Geometry

func (c *Client) Geometry() (width, height int)

Geometry returns the width and the height of the matrix

func (*Client) Render

func (c *Client) Render() error

Render update the display with the data from the LED buffer

func (*Client) Set

func (c *Client) Set(position int, col color.Color)

Set set LED at position x,y to the provided 24-bit color value.

func (*Client) SetBrightness

func (c *Client) SetBrightness(b uint8) error

type CloseArgs

type CloseArgs struct{}

type CloseReply

type CloseReply struct{}

type GeometryArgs

type GeometryArgs struct{}

type GeometryReply

type GeometryReply struct{ Width, Height int }

type Matrix

type Matrix struct {
	// contains filtered or unexported fields
}

func (*Matrix) Apply

func (m *Matrix) Apply(args *ApplyArgs, _ *ApplyReply) error

func (*Matrix) Close

func (m *Matrix) Close(_ *CloseArgs, _ *CloseReply) error

func (*Matrix) Geometry

func (m *Matrix) Geometry(_ *GeometryArgs, reply *GeometryReply) error

func (*Matrix) SetBrightness

func (m *Matrix) SetBrightness(a *SetBrightnessArgs, _ *SetBrightnessReply)

type SetBrightnessArgs

type SetBrightnessArgs struct{ B uint8 }

type SetBrightnessReply

type SetBrightnessReply struct{}

Jump to

Keyboard shortcuts

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