Class MotorServiceGrpc.MotorServiceBlockingV2Stub

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

public static final class MotorServiceGrpc.MotorServiceBlockingV2Stub extends io.grpc.stub.AbstractBlockingStub<MotorServiceGrpc.MotorServiceBlockingV2Stub>
A stub to allow clients to do synchronous rpc calls to service MotorService.
 A MotorService maintains all motors associated with a robot
 
  • Method Details

    • build

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

      public Motor.SetPowerResponse setPower(Motor.SetPowerRequest request) throws io.grpc.StatusException
       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
       
      Throws:
      io.grpc.StatusException
    • goFor

      public Motor.GoForResponse goFor(Motor.GoForRequest request) throws io.grpc.StatusException
       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.
       
      Throws:
      io.grpc.StatusException
    • goTo

      public Motor.GoToResponse goTo(Motor.GoToRequest request) throws io.grpc.StatusException
       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
       
      Throws:
      io.grpc.StatusException
    • setRPM

      public Motor.SetRPMResponse setRPM(Motor.SetRPMRequest request) throws io.grpc.StatusException
       SetRPM instructs the motor to move at the specified RPM indefinitely.
       
      Throws:
      io.grpc.StatusException
    • resetZeroPosition

      public Motor.ResetZeroPositionResponse resetZeroPosition(Motor.ResetZeroPositionRequest request) throws io.grpc.StatusException
       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
       
      Throws:
      io.grpc.StatusException
    • getPosition

      public Motor.GetPositionResponse getPosition(Motor.GetPositionRequest request) throws io.grpc.StatusException
       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
       
      Throws:
      io.grpc.StatusException
    • getProperties

      public Motor.GetPropertiesResponse getProperties(Motor.GetPropertiesRequest request) throws io.grpc.StatusException
       GetProperties returns a message of booleans indicating which optional features the robot's motor supports
       
      Throws:
      io.grpc.StatusException
    • stop

      public Motor.StopResponse stop(Motor.StopRequest request) throws io.grpc.StatusException
       Stop turns the robot's motor off
       
      Throws:
      io.grpc.StatusException
    • isPowered

      public Motor.IsPoweredResponse isPowered(Motor.IsPoweredRequest request) throws io.grpc.StatusException
       IsPowered returns true if the robot's motor is on
       
      Throws:
      io.grpc.StatusException
    • isMoving

      public Motor.IsMovingResponse isMoving(Motor.IsMovingRequest request) throws io.grpc.StatusException
       IsMoving reports if a component is in motion
       
      Throws:
      io.grpc.StatusException
    • doCommand

      public Common.DoCommandResponse doCommand(Common.DoCommandRequest request) throws io.grpc.StatusException
       DoCommand sends/receives arbitrary commands
       
      Throws:
      io.grpc.StatusException
    • getGeometries

      public Common.GetGeometriesResponse getGeometries(Common.GetGeometriesRequest request) throws io.grpc.StatusException
       GetGeometries returns the geometries of the component in their current configuration
       
      Throws:
      io.grpc.StatusException