Class MotorServiceGrpc.MotorServiceStub

java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractAsyncStub<MotorServiceGrpc.MotorServiceStub>
com.viam.component.motor.v1.MotorServiceGrpc.MotorServiceStub
Enclosing class:
MotorServiceGrpc

public static final class MotorServiceGrpc.MotorServiceStub extends io.grpc.stub.AbstractAsyncStub<MotorServiceGrpc.MotorServiceStub>
A stub to allow clients to do asynchronous rpc calls to service MotorService.
 A MotorService maintains all motors associated with a robot
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub

    io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>>
  • Method Summary

    Modifier and Type
    Method
    Description
    build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
    void
    doCommand(Common.DoCommandRequest request, io.grpc.stub.StreamObserver<Common.DoCommandResponse> responseObserver)
    DoCommand sends/receives arbitrary commands
    void
    getGeometries(Common.GetGeometriesRequest request, io.grpc.stub.StreamObserver<Common.GetGeometriesResponse> responseObserver)
    GetGeometries returns the geometries of the component in their current configuration
    void
    getPosition(Motor.GetPositionRequest request, io.grpc.stub.StreamObserver<Motor.GetPositionResponse> responseObserver)
    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
    void
    getProperties(Motor.GetPropertiesRequest request, io.grpc.stub.StreamObserver<Motor.GetPropertiesResponse> responseObserver)
    GetProperties returns a message of booleans indicating which optional features the robot's motor supports
    void
    goFor(Motor.GoForRequest request, io.grpc.stub.StreamObserver<Motor.GoForResponse> responseObserver)
    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.
    void
    goTo(Motor.GoToRequest request, io.grpc.stub.StreamObserver<Motor.GoToResponse> responseObserver)
    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
    void
    isMoving(Motor.IsMovingRequest request, io.grpc.stub.StreamObserver<Motor.IsMovingResponse> responseObserver)
    IsMoving reports if a component is in motion
    void
    isPowered(Motor.IsPoweredRequest request, io.grpc.stub.StreamObserver<Motor.IsPoweredResponse> responseObserver)
    IsPowered returns true if the robot's motor is on
    void
    resetZeroPosition(Motor.ResetZeroPositionRequest request, io.grpc.stub.StreamObserver<Motor.ResetZeroPositionResponse> responseObserver)
    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
    void
    setPower(Motor.SetPowerRequest request, io.grpc.stub.StreamObserver<Motor.SetPowerResponse> responseObserver)
    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
    void
    setRPM(Motor.SetRPMRequest request, io.grpc.stub.StreamObserver<Motor.SetRPMResponse> responseObserver)
    SetRPM instructs the motor to move at the specified RPM indefinitely.
    void
    stop(Motor.StopRequest request, io.grpc.stub.StreamObserver<Motor.StopResponse> responseObserver)
    Stop turns the robot's motor off

    Methods inherited from class io.grpc.stub.AbstractAsyncStub

    newStub, newStub

    Methods inherited from class io.grpc.stub.AbstractStub

    getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • build

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

      public void setPower(Motor.SetPowerRequest request, io.grpc.stub.StreamObserver<Motor.SetPowerResponse> responseObserver)
       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 void goFor(Motor.GoForRequest request, io.grpc.stub.StreamObserver<Motor.GoForResponse> responseObserver)
       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 void goTo(Motor.GoToRequest request, io.grpc.stub.StreamObserver<Motor.GoToResponse> responseObserver)
       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 void setRPM(Motor.SetRPMRequest request, io.grpc.stub.StreamObserver<Motor.SetRPMResponse> responseObserver)
       SetRPM instructs the motor to move at the specified RPM indefinitely.
       
    • resetZeroPosition

      public void resetZeroPosition(Motor.ResetZeroPositionRequest request, io.grpc.stub.StreamObserver<Motor.ResetZeroPositionResponse> responseObserver)
       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 void getPosition(Motor.GetPositionRequest request, io.grpc.stub.StreamObserver<Motor.GetPositionResponse> responseObserver)
       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 void getProperties(Motor.GetPropertiesRequest request, io.grpc.stub.StreamObserver<Motor.GetPropertiesResponse> responseObserver)
       GetProperties returns a message of booleans indicating which optional features the robot's motor supports
       
    • stop

      public void stop(Motor.StopRequest request, io.grpc.stub.StreamObserver<Motor.StopResponse> responseObserver)
       Stop turns the robot's motor off
       
    • isPowered

      public void isPowered(Motor.IsPoweredRequest request, io.grpc.stub.StreamObserver<Motor.IsPoweredResponse> responseObserver)
       IsPowered returns true if the robot's motor is on
       
    • isMoving

      public void isMoving(Motor.IsMovingRequest request, io.grpc.stub.StreamObserver<Motor.IsMovingResponse> responseObserver)
       IsMoving reports if a component is in motion
       
    • doCommand

      public void doCommand(Common.DoCommandRequest request, io.grpc.stub.StreamObserver<Common.DoCommandResponse> responseObserver)
       DoCommand sends/receives arbitrary commands
       
    • getGeometries

      public void getGeometries(Common.GetGeometriesRequest request, io.grpc.stub.StreamObserver<Common.GetGeometriesResponse> responseObserver)
       GetGeometries returns the geometries of the component in their current configuration