Class MotorServiceGrpc.MotorServiceFutureStub

java.lang.Object
io.grpc.stub.AbstractStub<MotorServiceGrpc.MotorServiceFutureStub>
io.grpc.stub.AbstractFutureStub<MotorServiceGrpc.MotorServiceFutureStub>
com.viam.component.motor.v1.MotorServiceGrpc.MotorServiceFutureStub
Enclosing class:
MotorServiceGrpc

public static final class MotorServiceGrpc.MotorServiceFutureStub extends io.grpc.stub.AbstractFutureStub<MotorServiceGrpc.MotorServiceFutureStub>
A stub to allow clients to do ListenableFuture-style rpc calls to service MotorService.
 A MotorService maintains all motors associated with a robot
 
  • Method Details

    • build

      protected MotorServiceGrpc.MotorServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<MotorServiceGrpc.MotorServiceFutureStub>
    • setPower

      public com.google.common.util.concurrent.ListenableFuture<Motor.SetPowerResponse> setPower(Motor.SetPowerRequest request)
       SetPower sets the percentage of the motor's total power that should be employed
       expressed a value between -1 and 1 where negative values indicate a backwards
       direction and positive values a forward direction
       
    • goFor

      public com.google.common.util.concurrent.ListenableFuture<Motor.GoForResponse> goFor(Motor.GoForRequest request)
       GoFor instructs the motor to turn at a specified speed, which is expressed in RPM,
       for a specified number of rotations relative to its starting position
       This method will return an error if position reporting is not supported
       If revolutions != 0, this will block until the number of revolutions has been completed or another operation comes in.
       Deprecated: If revolutions is 0, this will run the motor at rpm indefinitely.
       
    • goTo

      public com.google.common.util.concurrent.ListenableFuture<Motor.GoToResponse> goTo(Motor.GoToRequest request)
       GoTo requests the robot's motor to move to a specific position that
       is relative to its home position at a specified speed which is expressed in RPM
       This method will return an error if position reporting is not supported
       
    • setRPM

      public com.google.common.util.concurrent.ListenableFuture<Motor.SetRPMResponse> setRPM(Motor.SetRPMRequest request)
       SetRPM instructs the motor to move at the specified RPM indefinitely.
       
    • resetZeroPosition

      public com.google.common.util.concurrent.ListenableFuture<Motor.ResetZeroPositionResponse> resetZeroPosition(Motor.ResetZeroPositionRequest request)
       ResetZeroPosition sets the current position of the motor as the new zero position
       This method will return an error if position reporting is not supported
       
    • getPosition

      public com.google.common.util.concurrent.ListenableFuture<Motor.GetPositionResponse> getPosition(Motor.GetPositionRequest request)
       Position reports the position of the robot's motor relative to its zero position
       This method will return an error if position reporting is not supported
       
    • getProperties

      public com.google.common.util.concurrent.ListenableFuture<Motor.GetPropertiesResponse> getProperties(Motor.GetPropertiesRequest request)
       GetProperties returns a message of booleans indicating which optional features the robot's motor supports
       
    • stop

      public com.google.common.util.concurrent.ListenableFuture<Motor.StopResponse> stop(Motor.StopRequest request)
       Stop turns the robot's motor off
       
    • isPowered

      public com.google.common.util.concurrent.ListenableFuture<Motor.IsPoweredResponse> isPowered(Motor.IsPoweredRequest request)
       IsPowered returns true if the robot's motor is on
       
    • isMoving

      public com.google.common.util.concurrent.ListenableFuture<Motor.IsMovingResponse> isMoving(Motor.IsMovingRequest request)
       IsMoving reports if a component is in motion
       
    • doCommand

      public com.google.common.util.concurrent.ListenableFuture<Common.DoCommandResponse> doCommand(Common.DoCommandRequest request)
       DoCommand sends/receives arbitrary commands
       
    • getStatus

      public com.google.common.util.concurrent.ListenableFuture<Common.GetStatusResponse> getStatus(Common.GetStatusRequest request)
       GetStatus returns the status of the resource
       
    • getGeometries

      public com.google.common.util.concurrent.ListenableFuture<Common.GetGeometriesResponse> getGeometries(Common.GetGeometriesRequest request)
       GetGeometries returns the geometries of the component in their current configuration