Documentation
¶
Index ¶
- Variables
- func RegisterDrawerServer(s *grpc.Server, srv DrawerServer)
- type DrawResponse
- type DrawerClient
- type DrawerServer
- type FrameBuffer
- func (*FrameBuffer) Descriptor() ([]byte, []int)deprecated
- func (x *FrameBuffer) GetFrame() *FrameData
- func (x *FrameBuffer) GetLayer() Layer
- func (x *FrameBuffer) GetTimestamp() uint32
- func (*FrameBuffer) ProtoMessage()
- func (x *FrameBuffer) ProtoReflect() protoreflect.Message
- func (x *FrameBuffer) Reset()
- func (x *FrameBuffer) String() string
- type FrameData
- type FrameSequence
- func (*FrameSequence) Descriptor() ([]byte, []int)deprecated
- func (x *FrameSequence) GetFrames() []*FrameBuffer
- func (x *FrameSequence) GetLoop() int32
- func (*FrameSequence) ProtoMessage()
- func (x *FrameSequence) ProtoReflect() protoreflect.Message
- func (x *FrameSequence) Reset()
- func (x *FrameSequence) String() string
- type Layer
- type LengthRequest
- type LengthResponse
- type UnimplementedDrawerServer
- func (*UnimplementedDrawerServer) DrawFrame(context.Context, *FrameBuffer) (*DrawResponse, error)
- func (*UnimplementedDrawerServer) DrawFrames(context.Context, *FrameSequence) (*DrawResponse, error)
- func (*UnimplementedDrawerServer) GetLength(context.Context, *LengthRequest) (*LengthResponse, error)
Constants ¶
This section is empty.
Variables ¶
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.
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) ProtoMessage ¶
func (*FrameData) ProtoMessage()
func (*FrameData) ProtoReflect ¶
func (x *FrameData) ProtoReflect() protoreflect.Message
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.
func (Layer) Descriptor ¶
func (Layer) Descriptor() protoreflect.EnumDescriptor
func (Layer) EnumDescriptor
deprecated
func (Layer) Number ¶
func (x Layer) Number() protoreflect.EnumNumber
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) DrawFrame(context.Context, *FrameBuffer) (*DrawResponse, error)
func (*UnimplementedDrawerServer) DrawFrames ¶
func (*UnimplementedDrawerServer) DrawFrames(context.Context, *FrameSequence) (*DrawResponse, error)
func (*UnimplementedDrawerServer) GetLength ¶
func (*UnimplementedDrawerServer) GetLength(context.Context, *LengthRequest) (*LengthResponse, error)