Skip to content

Commit

Permalink
Automated Protos Update (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: viambot <[email protected]>
  • Loading branch information
github-actions[bot] and viambot authored May 31, 2024
1 parent 913fd8f commit fe394b4
Show file tree
Hide file tree
Showing 9 changed files with 10,234 additions and 6,227 deletions.
773 changes: 773 additions & 0 deletions core/sdk/src/main/gen/com/viam/component/motor/v1/Motor.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,36 @@ com.viam.component.motor.v1.Motor.GoToResponse> getGoToMethod() {
return getGoToMethod;
}

private static volatile io.grpc.MethodDescriptor<com.viam.component.motor.v1.Motor.SetRPMRequest,
com.viam.component.motor.v1.Motor.SetRPMResponse> getSetRPMMethod;

@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "SetRPM",
requestType = com.viam.component.motor.v1.Motor.SetRPMRequest.class,
responseType = com.viam.component.motor.v1.Motor.SetRPMResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor<com.viam.component.motor.v1.Motor.SetRPMRequest,
com.viam.component.motor.v1.Motor.SetRPMResponse> getSetRPMMethod() {
io.grpc.MethodDescriptor<com.viam.component.motor.v1.Motor.SetRPMRequest, com.viam.component.motor.v1.Motor.SetRPMResponse> getSetRPMMethod;
if ((getSetRPMMethod = MotorServiceGrpc.getSetRPMMethod) == null) {
synchronized (MotorServiceGrpc.class) {
if ((getSetRPMMethod = MotorServiceGrpc.getSetRPMMethod) == null) {
MotorServiceGrpc.getSetRPMMethod = getSetRPMMethod =
io.grpc.MethodDescriptor.<com.viam.component.motor.v1.Motor.SetRPMRequest, com.viam.component.motor.v1.Motor.SetRPMResponse>newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetRPM"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.viam.component.motor.v1.Motor.SetRPMRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
com.viam.component.motor.v1.Motor.SetRPMResponse.getDefaultInstance()))
.build();
}
}
}
return getSetRPMMethod;
}

private static volatile io.grpc.MethodDescriptor<com.viam.component.motor.v1.Motor.ResetZeroPositionRequest,
com.viam.component.motor.v1.Motor.ResetZeroPositionResponse> getResetZeroPositionMethod;

Expand Down Expand Up @@ -416,8 +446,8 @@ default void setPower(com.viam.component.motor.v1.Motor.SetPowerRequest 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 is 0, this will run the motor at rpm indefinitely
* 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.
* </pre>
*/
default void goFor(com.viam.component.motor.v1.Motor.GoForRequest request,
Expand All @@ -437,6 +467,16 @@ default void goTo(com.viam.component.motor.v1.Motor.GoToRequest request,
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGoToMethod(), responseObserver);
}

/**
* <pre>
* SetRPM instructs the motor to move at the specified RPM indefinitely.
* </pre>
*/
default void setRPM(com.viam.component.motor.v1.Motor.SetRPMRequest request,
io.grpc.stub.StreamObserver<com.viam.component.motor.v1.Motor.SetRPMResponse> responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetRPMMethod(), responseObserver);
}

/**
* <pre>
* ResetZeroPosition sets the current position of the motor as the new zero position
Expand Down Expand Up @@ -571,8 +611,8 @@ public void setPower(com.viam.component.motor.v1.Motor.SetPowerRequest 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 is 0, this will run the motor at rpm indefinitely
* 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.
* </pre>
*/
public void goFor(com.viam.component.motor.v1.Motor.GoForRequest request,
Expand All @@ -594,6 +634,17 @@ public void goTo(com.viam.component.motor.v1.Motor.GoToRequest request,
getChannel().newCall(getGoToMethod(), getCallOptions()), request, responseObserver);
}

/**
* <pre>
* SetRPM instructs the motor to move at the specified RPM indefinitely.
* </pre>
*/
public void setRPM(com.viam.component.motor.v1.Motor.SetRPMRequest request,
io.grpc.stub.StreamObserver<com.viam.component.motor.v1.Motor.SetRPMResponse> responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getSetRPMMethod(), getCallOptions()), request, responseObserver);
}

/**
* <pre>
* ResetZeroPosition sets the current position of the motor as the new zero position
Expand Down Expand Up @@ -721,8 +772,8 @@ public com.viam.component.motor.v1.Motor.SetPowerResponse setPower(com.viam.comp
* 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 is 0, this will run the motor at rpm indefinitely
* 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.
* </pre>
*/
public com.viam.component.motor.v1.Motor.GoForResponse goFor(com.viam.component.motor.v1.Motor.GoForRequest request) {
Expand All @@ -742,6 +793,16 @@ public com.viam.component.motor.v1.Motor.GoToResponse goTo(com.viam.component.mo
getChannel(), getGoToMethod(), getCallOptions(), request);
}

/**
* <pre>
* SetRPM instructs the motor to move at the specified RPM indefinitely.
* </pre>
*/
public com.viam.component.motor.v1.Motor.SetRPMResponse setRPM(com.viam.component.motor.v1.Motor.SetRPMRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getSetRPMMethod(), getCallOptions(), request);
}

/**
* <pre>
* ResetZeroPosition sets the current position of the motor as the new zero position
Expand Down Expand Up @@ -862,8 +923,8 @@ public com.google.common.util.concurrent.ListenableFuture<com.viam.component.mot
* 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 is 0, this will run the motor at rpm indefinitely
* 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.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.viam.component.motor.v1.Motor.GoForResponse> goFor(
Expand All @@ -885,6 +946,17 @@ public com.google.common.util.concurrent.ListenableFuture<com.viam.component.mot
getChannel().newCall(getGoToMethod(), getCallOptions()), request);
}

/**
* <pre>
* SetRPM instructs the motor to move at the specified RPM indefinitely.
* </pre>
*/
public com.google.common.util.concurrent.ListenableFuture<com.viam.component.motor.v1.Motor.SetRPMResponse> setRPM(
com.viam.component.motor.v1.Motor.SetRPMRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getSetRPMMethod(), getCallOptions()), request);
}

/**
* <pre>
* ResetZeroPosition sets the current position of the motor as the new zero position
Expand Down Expand Up @@ -979,14 +1051,15 @@ public com.google.common.util.concurrent.ListenableFuture<com.viam.common.v1.Com
private static final int METHODID_SET_POWER = 0;
private static final int METHODID_GO_FOR = 1;
private static final int METHODID_GO_TO = 2;
private static final int METHODID_RESET_ZERO_POSITION = 3;
private static final int METHODID_GET_POSITION = 4;
private static final int METHODID_GET_PROPERTIES = 5;
private static final int METHODID_STOP = 6;
private static final int METHODID_IS_POWERED = 7;
private static final int METHODID_IS_MOVING = 8;
private static final int METHODID_DO_COMMAND = 9;
private static final int METHODID_GET_GEOMETRIES = 10;
private static final int METHODID_SET_RPM = 3;
private static final int METHODID_RESET_ZERO_POSITION = 4;
private static final int METHODID_GET_POSITION = 5;
private static final int METHODID_GET_PROPERTIES = 6;
private static final int METHODID_STOP = 7;
private static final int METHODID_IS_POWERED = 8;
private static final int METHODID_IS_MOVING = 9;
private static final int METHODID_DO_COMMAND = 10;
private static final int METHODID_GET_GEOMETRIES = 11;

private static final class MethodHandlers<Req, Resp> implements
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
Expand Down Expand Up @@ -1017,6 +1090,10 @@ public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserv
serviceImpl.goTo((com.viam.component.motor.v1.Motor.GoToRequest) request,
(io.grpc.stub.StreamObserver<com.viam.component.motor.v1.Motor.GoToResponse>) responseObserver);
break;
case METHODID_SET_RPM:
serviceImpl.setRPM((com.viam.component.motor.v1.Motor.SetRPMRequest) request,
(io.grpc.stub.StreamObserver<com.viam.component.motor.v1.Motor.SetRPMResponse>) responseObserver);
break;
case METHODID_RESET_ZERO_POSITION:
serviceImpl.resetZeroPosition((com.viam.component.motor.v1.Motor.ResetZeroPositionRequest) request,
(io.grpc.stub.StreamObserver<com.viam.component.motor.v1.Motor.ResetZeroPositionResponse>) responseObserver);
Expand Down Expand Up @@ -1088,6 +1165,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser
com.viam.component.motor.v1.Motor.GoToRequest,
com.viam.component.motor.v1.Motor.GoToResponse>(
service, METHODID_GO_TO)))
.addMethod(
getSetRPMMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.viam.component.motor.v1.Motor.SetRPMRequest,
com.viam.component.motor.v1.Motor.SetRPMResponse>(
service, METHODID_SET_RPM)))
.addMethod(
getResetZeroPositionMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
Expand Down Expand Up @@ -1159,6 +1243,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getSetPowerMethod())
.addMethod(getGoForMethod())
.addMethod(getGoToMethod())
.addMethod(getSetRPMMethod())
.addMethod(getResetZeroPositionMethod())
.addMethod(getGetPositionMethod())
.addMethod(getGetPropertiesMethod())
Expand Down
Loading

0 comments on commit fe394b4

Please sign in to comment.