Documentation ¶
Index ¶
- Variables
- type Server
- func (s *Server) CreateGRPCServer() *grpc.Server
- func (s *Server) GetAmbientLight(ctx context.Context, in *pb.AmbientLightRequest) (*pb.AmbientLightResponse, error)
- func (s *Server) GetBatteryPercentage(ctx context.Context, in *pb.BatteryPercentageRequest) (*pb.BatteryPercentageResponse, error)
- func (s *Server) GetTemperatureAndHumidity(ctx context.Context, in *pb.TemperatureAndHumidityRequest) (*pb.TemperatureAndHumidityResponse, error)
- func (s *Server) MoveRover(ctx context.Context, in *pb.RoverWheelRequest) (*pb.RoverWheelResponse, error)
- func (s *Server) ReadEncoders(ctx context.Context, in *pb.ReadEncodersRequest) (*pb.ReadEncodersResponse, error)
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 ¶
Server is an implementation of roverserver.RoverServiceServer.
func (*Server) CreateGRPCServer ¶
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
Click to show internal directories.
Click to hide internal directories.