server

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package server contains a gRPC based robot.Robot server implementation.

It should be used by an rpc.Server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New constructs a gRPC service server for a Robot.

Types

type Server

type Server struct {
	pb.UnimplementedRobotServiceServer
	// contains filtered or unexported fields
}

Server implements the contract from robot.proto that ultimately satisfies a robot.Robot as a gRPC server.

func (*Server) BlockForOperation

func (s *Server) BlockForOperation(ctx context.Context, req *pb.BlockForOperationRequest) (*pb.BlockForOperationResponse, error)

BlockForOperation blocks for an operation to finish.

func (*Server) CancelOperation

func (s *Server) CancelOperation(ctx context.Context, req *pb.CancelOperationRequest) (*pb.CancelOperationResponse, error)

CancelOperation kills an operations.

func (*Server) Close

func (s *Server) Close()

Close cleanly shuts down the server.

func (*Server) DiscoverComponents

DiscoverComponents takes a list of discovery queries and returns corresponding component configurations.

func (*Server) FrameSystemConfig

func (s *Server) FrameSystemConfig(
	ctx context.Context,
	req *pb.FrameSystemConfigRequest,
) (*pb.FrameSystemConfigResponse, error)

FrameSystemConfig returns the info of each individual part that makes up the frame system.

func (*Server) GetOperations

func (s *Server) GetOperations(ctx context.Context, req *pb.GetOperationsRequest) (*pb.GetOperationsResponse, error)

GetOperations lists all running operations.

func (*Server) GetStatus

func (s *Server) GetStatus(ctx context.Context, req *pb.GetStatusRequest) (*pb.GetStatusResponse, error)

GetStatus takes a list of resource names and returns their corresponding statuses. If no names are passed in, return all statuses.

func (*Server) ResourceNames

ResourceNames returns the list of resources.

func (*Server) ResourceRPCSubtypes

ResourceRPCSubtypes returns the list of resource RPC subtypes.

func (*Server) StopAll

func (s *Server) StopAll(ctx context.Context, req *pb.StopAllRequest) (*pb.StopAllResponse, error)

StopAll will stop all current and outstanding operations for the robot and stops all actuators and movement.

func (*Server) StreamStatus

func (s *Server) StreamStatus(req *pb.StreamStatusRequest, streamServer pb.RobotService_StreamStatusServer) error

StreamStatus periodically sends the status of all statuses requested. An empty request signifies all resources.

func (*Server) TransformPose

func (s *Server) TransformPose(ctx context.Context, req *pb.TransformPoseRequest) (*pb.TransformPoseResponse, error)

TransformPose will transform the pose of the requested poseInFrame to the desired frame in the robot's frame system.

Jump to

Keyboard shortcuts

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