rpc

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 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) (rgbmatrix.Matrix, error)

NewRGBLedMatrix returns a new matrix using the given size and config

func Serve

func Serve(m rgbmatrix.Matrix)

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 (m *Client) Set(position int, c color.Color)

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

func (*Client) SetBrightness

func (c *Client) SetBrightness(b int)

type CloseArgs

type CloseArgs struct{}

type CloseReply

type CloseReply struct{}

type GeometryArgs

type GeometryArgs struct{}

type GeometryReply

type GeometryReply struct{ Width, Height int }

type RPCMatrix

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

func (*RPCMatrix) Apply

func (m *RPCMatrix) Apply(args *ApplyArgs, reply *ApplyReply) error

func (*RPCMatrix) Close

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

func (*RPCMatrix) Geometry

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

Jump to

Keyboard shortcuts

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