displayapi

package
v0.0.0-...-151de34 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package displayapi implements the biotinker:component:display API

Index

Constants

This section is empty.

Variables

View Source
var API = resource.APINamespace("biotinker").WithComponentType("display")

API is the full API definition.

Functions

func Named

func Named(name string) resource.Name

Named is a helper for getting the named Display's typed resource name.

func NewRPCServiceServer

func NewRPCServiceServer(coll resource.APIResourceCollection[Display]) interface{}

NewRPCServiceServer returns a new RPC server for the gizmo API.

Types

type Display

type Display interface {
	resource.Resource
	DisplayBytes(ctx context.Context, data []byte) error
	WriteString(ctx context.Context, xloc, yloc int, text string) error
	DrawLine(ctx context.Context, x1, y1, x2, y2 int) error
	Reset(ctx context.Context) error
}

Display defines the Go interface for the component (should match the protobuf methods.)

func FromRobot

func FromRobot(r robot.Robot, name string) (Display, error)

FromRobot is a helper for getting the named Display from the given Robot.

func NewClientFromConn

func NewClientFromConn(conn rpc.ClientConn, remoteName string, name resource.Name, logger logging.Logger) Display

NewClientFromConn creates a new gizmo RPC client from an existing connection.

Jump to

Keyboard shortcuts

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