rpc

package
v0.0.0-...-418de2e Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMotorsSoftwareBlocked = errors.New("Motors controller is software blocked")
	ErrBoardSoftwareBlocked  = errors.New("Board controller is software blocked")
)

Error definitions

Functions

This section is empty.

Types

type Server

type Server struct {
	AM     *auth.Manager
	Motors *mc.MC
	Board  *bb.BB
}

Server is an implementation of roverserver.RoverServiceServer.

func (*Server) CreateGRPCServer

func (s *Server) CreateGRPCServer() *grpc.Server

CreateGRPCServer returns a new GRPC server instance with RoverService registered and auth interceptors installed

func (*Server) GetAmbientLight

func (s *Server) GetAmbientLight(ctx context.Context,
	in *pb.AmbientLightRequest) (*pb.AmbientLightResponse, error)

GetAmbientLight uses ambient light sensor

func (*Server) GetBatteryPercentage

func (s *Server) GetBatteryPercentage(ctx context.Context,
	in *pb.BatteryPercentageRequest) (*pb.BatteryPercentageResponse, error)

GetBatteryPercentage returns battery value as reported by the Board

func (*Server) GetTemperatureAndHumidity

func (s *Server) GetTemperatureAndHumidity(ctx context.Context,
	in *pb.TemperatureAndHumidityRequest) (*pb.TemperatureAndHumidityResponse, error)

GetTemperatureAndHumidity uses DHT humidity sensor

func (*Server) MoveRover

func (s *Server) MoveRover(ctx context.Context,
	in *pb.RoverWheelRequest) (*pb.RoverWheelResponse, error)

MoveRover is an example of using motors

func (*Server) ReadEncoders

func (s *Server) ReadEncoders(ctx context.Context,
	in *pb.ReadEncodersRequest) (*pb.ReadEncodersResponse, error)

ReadEncoders reads current absolute values from 4 encoders

Jump to

Keyboard shortcuts

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