framebuffer

package
v0.0.0-...-edf95e9 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: MPL-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Layer_name = map[int32]string{
		0: "NONE",
		1: "LIGHT",
		2: "COLOR",
		8: "NOTIFICATIONS",
		9: "PRIORITY",
	}
	Layer_value = map[string]int32{
		"NONE":          0,
		"LIGHT":         1,
		"COLOR":         2,
		"NOTIFICATIONS": 8,
		"PRIORITY":      9,
	}
)

Enum value maps for Layer.

View Source
var File_framebuffer_proto protoreflect.FileDescriptor

Functions

func RegisterDrawerServer

func RegisterDrawerServer(s *grpc.Server, srv DrawerServer)

Types

type DrawResponse

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

func (*DrawResponse) Descriptor deprecated

func (*DrawResponse) Descriptor() ([]byte, []int)

Deprecated: Use DrawResponse.ProtoReflect.Descriptor instead.

func (*DrawResponse) ProtoMessage

func (*DrawResponse) ProtoMessage()

func (*DrawResponse) ProtoReflect

func (x *DrawResponse) ProtoReflect() protoreflect.Message

func (*DrawResponse) Reset

func (x *DrawResponse) Reset()

func (*DrawResponse) String

func (x *DrawResponse) String() string

type DrawerClient

type DrawerClient interface {
	// DrawFrame draws one frame
	DrawFrame(ctx context.Context, in *FrameBuffer, opts ...grpc.CallOption) (*DrawResponse, error)
	// DrawFrames draws a series of frames
	DrawFrames(ctx context.Context, in *FrameSequence, opts ...grpc.CallOption) (*DrawResponse, error)
	// GetLength returns the length of the strip
	GetLength(ctx context.Context, in *LengthRequest, opts ...grpc.CallOption) (*LengthResponse, error)
}

DrawerClient is the client API for Drawer service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewDrawerClient

func NewDrawerClient(cc grpc.ClientConnInterface) DrawerClient

type DrawerServer

type DrawerServer interface {
	// DrawFrame draws one frame
	DrawFrame(context.Context, *FrameBuffer) (*DrawResponse, error)
	// DrawFrames draws a series of frames
	DrawFrames(context.Context, *FrameSequence) (*DrawResponse, error)
	// GetLength returns the length of the strip
	GetLength(context.Context, *LengthRequest) (*LengthResponse, error)
}

DrawerServer is the server API for Drawer service.

type FrameBuffer

type FrameBuffer struct {
	Frame *FrameData `protobuf:"bytes,1,opt,name=frame,proto3" json:"frame,omitempty"`
	// Time offset from start of frame in milliseconds
	Timestamp uint32 `protobuf:"fixed32,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Layer to apply the frame to
	Layer Layer `protobuf:"varint,3,opt,name=layer,proto3,enum=Layer" json:"layer,omitempty"`
	// contains filtered or unexported fields
}

FrameBuffer represents an entire frame together with a layer tag. It also defines a timestamp that can be used within a FrameSequence to define the duration a frame will be shown.

func (*FrameBuffer) Descriptor deprecated

func (*FrameBuffer) Descriptor() ([]byte, []int)

Deprecated: Use FrameBuffer.ProtoReflect.Descriptor instead.

func (*FrameBuffer) GetFrame

func (x *FrameBuffer) GetFrame() *FrameData

func (*FrameBuffer) GetLayer

func (x *FrameBuffer) GetLayer() Layer

func (*FrameBuffer) GetTimestamp

func (x *FrameBuffer) GetTimestamp() uint32

func (*FrameBuffer) ProtoMessage

func (*FrameBuffer) ProtoMessage()

func (*FrameBuffer) ProtoReflect

func (x *FrameBuffer) ProtoReflect() protoreflect.Message

func (*FrameBuffer) Reset

func (x *FrameBuffer) Reset()

func (*FrameBuffer) String

func (x *FrameBuffer) String() string

type FrameData

type FrameData struct {

	// ARGB
	Dots []uint32 `protobuf:"fixed32,1,rep,packed,name=dots,proto3" json:"dots,omitempty"`
	// contains filtered or unexported fields
}

FrameData represents an ARGB array of dots.

func (*FrameData) Descriptor deprecated

func (*FrameData) Descriptor() ([]byte, []int)

Deprecated: Use FrameData.ProtoReflect.Descriptor instead.

func (*FrameData) GetDots

func (x *FrameData) GetDots() []uint32

func (*FrameData) ProtoMessage

func (*FrameData) ProtoMessage()

func (*FrameData) ProtoReflect

func (x *FrameData) ProtoReflect() protoreflect.Message

func (*FrameData) Reset

func (x *FrameData) Reset()

func (*FrameData) String

func (x *FrameData) String() string

type FrameSequence

type FrameSequence struct {
	Frames []*FrameBuffer `protobuf:"bytes,1,rep,name=frames,proto3" json:"frames,omitempty"`
	// Number of times to loop the sequence
	Loop int32 `protobuf:"varint,2,opt,name=loop,proto3" json:"loop,omitempty"`
	// contains filtered or unexported fields
}

FrameSequence buffers a series of frames to be drawn one by one at intervals defined by the timestamp included in the FrameBuffers. Useful for running smooth animations.

In the future, this should have more metadata like looping counts and async animations.

func (*FrameSequence) Descriptor deprecated

func (*FrameSequence) Descriptor() ([]byte, []int)

Deprecated: Use FrameSequence.ProtoReflect.Descriptor instead.

func (*FrameSequence) GetFrames

func (x *FrameSequence) GetFrames() []*FrameBuffer

func (*FrameSequence) GetLoop

func (x *FrameSequence) GetLoop() int32

func (*FrameSequence) ProtoMessage

func (*FrameSequence) ProtoMessage()

func (*FrameSequence) ProtoReflect

func (x *FrameSequence) ProtoReflect() protoreflect.Message

func (*FrameSequence) Reset

func (x *FrameSequence) Reset()

func (*FrameSequence) String

func (x *FrameSequence) String() string

type Layer

type Layer int32

Layer defines some default layers for compositing animations onto for various purposes.

const (
	Layer_NONE Layer = 0
	// Well-known layers
	Layer_LIGHT         Layer = 1
	Layer_COLOR         Layer = 2
	Layer_NOTIFICATIONS Layer = 8
	Layer_PRIORITY      Layer = 9
)

func (Layer) Descriptor

func (Layer) Descriptor() protoreflect.EnumDescriptor

func (Layer) Enum

func (x Layer) Enum() *Layer

func (Layer) EnumDescriptor deprecated

func (Layer) EnumDescriptor() ([]byte, []int)

Deprecated: Use Layer.Descriptor instead.

func (Layer) Number

func (x Layer) Number() protoreflect.EnumNumber

func (Layer) String

func (x Layer) String() string

func (Layer) Type

func (Layer) Type() protoreflect.EnumType

type LengthRequest

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

func (*LengthRequest) Descriptor deprecated

func (*LengthRequest) Descriptor() ([]byte, []int)

Deprecated: Use LengthRequest.ProtoReflect.Descriptor instead.

func (*LengthRequest) ProtoMessage

func (*LengthRequest) ProtoMessage()

func (*LengthRequest) ProtoReflect

func (x *LengthRequest) ProtoReflect() protoreflect.Message

func (*LengthRequest) Reset

func (x *LengthRequest) Reset()

func (*LengthRequest) String

func (x *LengthRequest) String() string

type LengthResponse

type LengthResponse struct {
	Length uint32 `protobuf:"fixed32,1,opt,name=length,proto3" json:"length,omitempty"`
	// contains filtered or unexported fields
}

func (*LengthResponse) Descriptor deprecated

func (*LengthResponse) Descriptor() ([]byte, []int)

Deprecated: Use LengthResponse.ProtoReflect.Descriptor instead.

func (*LengthResponse) GetLength

func (x *LengthResponse) GetLength() uint32

func (*LengthResponse) ProtoMessage

func (*LengthResponse) ProtoMessage()

func (*LengthResponse) ProtoReflect

func (x *LengthResponse) ProtoReflect() protoreflect.Message

func (*LengthResponse) Reset

func (x *LengthResponse) Reset()

func (*LengthResponse) String

func (x *LengthResponse) String() string

type UnimplementedDrawerServer

type UnimplementedDrawerServer struct {
}

UnimplementedDrawerServer can be embedded to have forward compatible implementations.

func (*UnimplementedDrawerServer) DrawFrame

func (*UnimplementedDrawerServer) DrawFrames

func (*UnimplementedDrawerServer) GetLength

Jump to

Keyboard shortcuts

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