All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.diozero.remote.message.protobuf.BoardServiceGrpc Maven / Gradle / Ivy

The newest version!
package com.diozero.remote.message.protobuf;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.68.0)",
    comments = "Source: diozero.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class BoardServiceGrpc {

  private BoardServiceGrpc() {}

  public static final java.lang.String SERVICE_NAME = "diozero.BoardService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor getGetBoardInfoMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetBoardInfo",
      requestType = com.google.protobuf.Empty.class,
      responseType = com.diozero.remote.message.protobuf.Board.BoardInfoResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetBoardInfoMethod() {
    io.grpc.MethodDescriptor getGetBoardInfoMethod;
    if ((getGetBoardInfoMethod = BoardServiceGrpc.getGetBoardInfoMethod) == null) {
      synchronized (BoardServiceGrpc.class) {
        if ((getGetBoardInfoMethod = BoardServiceGrpc.getGetBoardInfoMethod) == null) {
          BoardServiceGrpc.getGetBoardInfoMethod = getGetBoardInfoMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetBoardInfo"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.Board.BoardInfoResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BoardServiceMethodDescriptorSupplier("GetBoardInfo"))
              .build();
        }
      }
    }
    return getGetBoardInfoMethod;
  }

  private static volatile io.grpc.MethodDescriptor getSetBoardPwmFrequencyMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "SetBoardPwmFrequency",
      requestType = com.diozero.remote.message.protobuf.IntegerMessage.class,
      responseType = com.diozero.remote.message.protobuf.Response.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getSetBoardPwmFrequencyMethod() {
    io.grpc.MethodDescriptor getSetBoardPwmFrequencyMethod;
    if ((getSetBoardPwmFrequencyMethod = BoardServiceGrpc.getSetBoardPwmFrequencyMethod) == null) {
      synchronized (BoardServiceGrpc.class) {
        if ((getSetBoardPwmFrequencyMethod = BoardServiceGrpc.getSetBoardPwmFrequencyMethod) == null) {
          BoardServiceGrpc.getSetBoardPwmFrequencyMethod = getSetBoardPwmFrequencyMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetBoardPwmFrequency"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.IntegerMessage.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.Response.getDefaultInstance()))
              .setSchemaDescriptor(new BoardServiceMethodDescriptorSupplier("SetBoardPwmFrequency"))
              .build();
        }
      }
    }
    return getSetBoardPwmFrequencyMethod;
  }

  private static volatile io.grpc.MethodDescriptor getSetBoardServoFrequencyMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "SetBoardServoFrequency",
      requestType = com.diozero.remote.message.protobuf.IntegerMessage.class,
      responseType = com.diozero.remote.message.protobuf.Response.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getSetBoardServoFrequencyMethod() {
    io.grpc.MethodDescriptor getSetBoardServoFrequencyMethod;
    if ((getSetBoardServoFrequencyMethod = BoardServiceGrpc.getSetBoardServoFrequencyMethod) == null) {
      synchronized (BoardServiceGrpc.class) {
        if ((getSetBoardServoFrequencyMethod = BoardServiceGrpc.getSetBoardServoFrequencyMethod) == null) {
          BoardServiceGrpc.getSetBoardServoFrequencyMethod = getSetBoardServoFrequencyMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetBoardServoFrequency"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.IntegerMessage.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.Response.getDefaultInstance()))
              .setSchemaDescriptor(new BoardServiceMethodDescriptorSupplier("SetBoardServoFrequency"))
              .build();
        }
      }
    }
    return getSetBoardServoFrequencyMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetGpioModeMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetGpioMode",
      requestType = com.diozero.remote.message.protobuf.Gpio.Identifier.class,
      responseType = com.diozero.remote.message.protobuf.Board.GpioModeResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetGpioModeMethod() {
    io.grpc.MethodDescriptor getGetGpioModeMethod;
    if ((getGetGpioModeMethod = BoardServiceGrpc.getGetGpioModeMethod) == null) {
      synchronized (BoardServiceGrpc.class) {
        if ((getGetGpioModeMethod = BoardServiceGrpc.getGetGpioModeMethod) == null) {
          BoardServiceGrpc.getGetGpioModeMethod = getGetGpioModeMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGpioMode"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.Gpio.Identifier.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.Board.GpioModeResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BoardServiceMethodDescriptorSupplier("GetGpioMode"))
              .build();
        }
      }
    }
    return getGetGpioModeMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetGpioValueMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetGpioValue",
      requestType = com.diozero.remote.message.protobuf.Gpio.Identifier.class,
      responseType = com.diozero.remote.message.protobuf.IntegerResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetGpioValueMethod() {
    io.grpc.MethodDescriptor getGetGpioValueMethod;
    if ((getGetGpioValueMethod = BoardServiceGrpc.getGetGpioValueMethod) == null) {
      synchronized (BoardServiceGrpc.class) {
        if ((getGetGpioValueMethod = BoardServiceGrpc.getGetGpioValueMethod) == null) {
          BoardServiceGrpc.getGetGpioValueMethod = getGetGpioValueMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetGpioValue"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.Gpio.Identifier.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.IntegerResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BoardServiceMethodDescriptorSupplier("GetGpioValue"))
              .build();
        }
      }
    }
    return getGetGpioValueMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetCpuTemperatureMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetCpuTemperature",
      requestType = com.google.protobuf.Empty.class,
      responseType = com.diozero.remote.message.protobuf.FloatResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetCpuTemperatureMethod() {
    io.grpc.MethodDescriptor getGetCpuTemperatureMethod;
    if ((getGetCpuTemperatureMethod = BoardServiceGrpc.getGetCpuTemperatureMethod) == null) {
      synchronized (BoardServiceGrpc.class) {
        if ((getGetCpuTemperatureMethod = BoardServiceGrpc.getGetCpuTemperatureMethod) == null) {
          BoardServiceGrpc.getGetCpuTemperatureMethod = getGetCpuTemperatureMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCpuTemperature"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.FloatResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BoardServiceMethodDescriptorSupplier("GetCpuTemperature"))
              .build();
        }
      }
    }
    return getGetCpuTemperatureMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetI2CBusNumbersMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetI2CBusNumbers",
      requestType = com.google.protobuf.Empty.class,
      responseType = com.diozero.remote.message.protobuf.IntegerArrayResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetI2CBusNumbersMethod() {
    io.grpc.MethodDescriptor getGetI2CBusNumbersMethod;
    if ((getGetI2CBusNumbersMethod = BoardServiceGrpc.getGetI2CBusNumbersMethod) == null) {
      synchronized (BoardServiceGrpc.class) {
        if ((getGetI2CBusNumbersMethod = BoardServiceGrpc.getGetI2CBusNumbersMethod) == null) {
          BoardServiceGrpc.getGetI2CBusNumbersMethod = getGetI2CBusNumbersMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetI2CBusNumbers"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.google.protobuf.Empty.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.IntegerArrayResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BoardServiceMethodDescriptorSupplier("GetI2CBusNumbers"))
              .build();
        }
      }
    }
    return getGetI2CBusNumbersMethod;
  }

  private static volatile io.grpc.MethodDescriptor getGetI2CFunctionalitiesMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "GetI2CFunctionalities",
      requestType = com.diozero.remote.message.protobuf.IntegerMessage.class,
      responseType = com.diozero.remote.message.protobuf.IntegerResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor getGetI2CFunctionalitiesMethod() {
    io.grpc.MethodDescriptor getGetI2CFunctionalitiesMethod;
    if ((getGetI2CFunctionalitiesMethod = BoardServiceGrpc.getGetI2CFunctionalitiesMethod) == null) {
      synchronized (BoardServiceGrpc.class) {
        if ((getGetI2CFunctionalitiesMethod = BoardServiceGrpc.getGetI2CFunctionalitiesMethod) == null) {
          BoardServiceGrpc.getGetI2CFunctionalitiesMethod = getGetI2CFunctionalitiesMethod =
              io.grpc.MethodDescriptor.newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetI2CFunctionalities"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.IntegerMessage.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.diozero.remote.message.protobuf.IntegerResponse.getDefaultInstance()))
              .setSchemaDescriptor(new BoardServiceMethodDescriptorSupplier("GetI2CFunctionalities"))
              .build();
        }
      }
    }
    return getGetI2CFunctionalitiesMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static BoardServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public BoardServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new BoardServiceStub(channel, callOptions);
        }
      };
    return BoardServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static BoardServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public BoardServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new BoardServiceBlockingStub(channel, callOptions);
        }
      };
    return BoardServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static BoardServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory factory =
      new io.grpc.stub.AbstractStub.StubFactory() {
        @java.lang.Override
        public BoardServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new BoardServiceFutureStub(channel, callOptions);
        }
      };
    return BoardServiceFutureStub.newStub(factory, channel);
  }

  /**
   */
  public interface AsyncService {

    /**
     */
    default void getBoardInfo(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetBoardInfoMethod(), responseObserver);
    }

    /**
     */
    default void setBoardPwmFrequency(com.diozero.remote.message.protobuf.IntegerMessage request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetBoardPwmFrequencyMethod(), responseObserver);
    }

    /**
     */
    default void setBoardServoFrequency(com.diozero.remote.message.protobuf.IntegerMessage request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetBoardServoFrequencyMethod(), responseObserver);
    }

    /**
     */
    default void getGpioMode(com.diozero.remote.message.protobuf.Gpio.Identifier request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGpioModeMethod(), responseObserver);
    }

    /**
     */
    default void getGpioValue(com.diozero.remote.message.protobuf.Gpio.Identifier request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetGpioValueMethod(), responseObserver);
    }

    /**
     */
    default void getCpuTemperature(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetCpuTemperatureMethod(), responseObserver);
    }

    /**
     */
    default void getI2CBusNumbers(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetI2CBusNumbersMethod(), responseObserver);
    }

    /**
     */
    default void getI2CFunctionalities(com.diozero.remote.message.protobuf.IntegerMessage request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetI2CFunctionalitiesMethod(), responseObserver);
    }
  }

  /**
   * Base class for the server implementation of the service BoardService.
   */
  public static abstract class BoardServiceImplBase
      implements io.grpc.BindableService, AsyncService {

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return BoardServiceGrpc.bindService(this);
    }
  }

  /**
   * A stub to allow clients to do asynchronous rpc calls to service BoardService.
   */
  public static final class BoardServiceStub
      extends io.grpc.stub.AbstractAsyncStub {
    private BoardServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected BoardServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new BoardServiceStub(channel, callOptions);
    }

    /**
     */
    public void getBoardInfo(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetBoardInfoMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void setBoardPwmFrequency(com.diozero.remote.message.protobuf.IntegerMessage request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSetBoardPwmFrequencyMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void setBoardServoFrequency(com.diozero.remote.message.protobuf.IntegerMessage request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSetBoardServoFrequencyMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getGpioMode(com.diozero.remote.message.protobuf.Gpio.Identifier request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetGpioModeMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getGpioValue(com.diozero.remote.message.protobuf.Gpio.Identifier request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetGpioValueMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getCpuTemperature(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetCpuTemperatureMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getI2CBusNumbers(com.google.protobuf.Empty request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetI2CBusNumbersMethod(), getCallOptions()), request, responseObserver);
    }

    /**
     */
    public void getI2CFunctionalities(com.diozero.remote.message.protobuf.IntegerMessage request,
        io.grpc.stub.StreamObserver responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getGetI2CFunctionalitiesMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   * A stub to allow clients to do synchronous rpc calls to service BoardService.
   */
  public static final class BoardServiceBlockingStub
      extends io.grpc.stub.AbstractBlockingStub {
    private BoardServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected BoardServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new BoardServiceBlockingStub(channel, callOptions);
    }

    /**
     */
    public com.diozero.remote.message.protobuf.Board.BoardInfoResponse getBoardInfo(com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetBoardInfoMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.diozero.remote.message.protobuf.Response setBoardPwmFrequency(com.diozero.remote.message.protobuf.IntegerMessage request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSetBoardPwmFrequencyMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.diozero.remote.message.protobuf.Response setBoardServoFrequency(com.diozero.remote.message.protobuf.IntegerMessage request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSetBoardServoFrequencyMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.diozero.remote.message.protobuf.Board.GpioModeResponse getGpioMode(com.diozero.remote.message.protobuf.Gpio.Identifier request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetGpioModeMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.diozero.remote.message.protobuf.IntegerResponse getGpioValue(com.diozero.remote.message.protobuf.Gpio.Identifier request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetGpioValueMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.diozero.remote.message.protobuf.FloatResponse getCpuTemperature(com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetCpuTemperatureMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.diozero.remote.message.protobuf.IntegerArrayResponse getI2CBusNumbers(com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetI2CBusNumbersMethod(), getCallOptions(), request);
    }

    /**
     */
    public com.diozero.remote.message.protobuf.IntegerResponse getI2CFunctionalities(com.diozero.remote.message.protobuf.IntegerMessage request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getGetI2CFunctionalitiesMethod(), getCallOptions(), request);
    }
  }

  /**
   * A stub to allow clients to do ListenableFuture-style rpc calls to service BoardService.
   */
  public static final class BoardServiceFutureStub
      extends io.grpc.stub.AbstractFutureStub {
    private BoardServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected BoardServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new BoardServiceFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getBoardInfo(
        com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetBoardInfoMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture setBoardPwmFrequency(
        com.diozero.remote.message.protobuf.IntegerMessage request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSetBoardPwmFrequencyMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture setBoardServoFrequency(
        com.diozero.remote.message.protobuf.IntegerMessage request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSetBoardServoFrequencyMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getGpioMode(
        com.diozero.remote.message.protobuf.Gpio.Identifier request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetGpioModeMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getGpioValue(
        com.diozero.remote.message.protobuf.Gpio.Identifier request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetGpioValueMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getCpuTemperature(
        com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetCpuTemperatureMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getI2CBusNumbers(
        com.google.protobuf.Empty request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetI2CBusNumbersMethod(), getCallOptions()), request);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture getI2CFunctionalities(
        com.diozero.remote.message.protobuf.IntegerMessage request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getGetI2CFunctionalitiesMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_GET_BOARD_INFO = 0;
  private static final int METHODID_SET_BOARD_PWM_FREQUENCY = 1;
  private static final int METHODID_SET_BOARD_SERVO_FREQUENCY = 2;
  private static final int METHODID_GET_GPIO_MODE = 3;
  private static final int METHODID_GET_GPIO_VALUE = 4;
  private static final int METHODID_GET_CPU_TEMPERATURE = 5;
  private static final int METHODID_GET_I2CBUS_NUMBERS = 6;
  private static final int METHODID_GET_I2CFUNCTIONALITIES = 7;

  private static final class MethodHandlers implements
      io.grpc.stub.ServerCalls.UnaryMethod,
      io.grpc.stub.ServerCalls.ServerStreamingMethod,
      io.grpc.stub.ServerCalls.ClientStreamingMethod,
      io.grpc.stub.ServerCalls.BidiStreamingMethod {
    private final AsyncService serviceImpl;
    private final int methodId;

    MethodHandlers(AsyncService serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
      switch (methodId) {
        case METHODID_GET_BOARD_INFO:
          serviceImpl.getBoardInfo((com.google.protobuf.Empty) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_SET_BOARD_PWM_FREQUENCY:
          serviceImpl.setBoardPwmFrequency((com.diozero.remote.message.protobuf.IntegerMessage) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_SET_BOARD_SERVO_FREQUENCY:
          serviceImpl.setBoardServoFrequency((com.diozero.remote.message.protobuf.IntegerMessage) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_GPIO_MODE:
          serviceImpl.getGpioMode((com.diozero.remote.message.protobuf.Gpio.Identifier) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_GPIO_VALUE:
          serviceImpl.getGpioValue((com.diozero.remote.message.protobuf.Gpio.Identifier) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_CPU_TEMPERATURE:
          serviceImpl.getCpuTemperature((com.google.protobuf.Empty) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_I2CBUS_NUMBERS:
          serviceImpl.getI2CBusNumbers((com.google.protobuf.Empty) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        case METHODID_GET_I2CFUNCTIONALITIES:
          serviceImpl.getI2CFunctionalities((com.diozero.remote.message.protobuf.IntegerMessage) request,
              (io.grpc.stub.StreamObserver) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver invoke(
        io.grpc.stub.StreamObserver responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
    return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
        .addMethod(
          getGetBoardInfoMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.google.protobuf.Empty,
              com.diozero.remote.message.protobuf.Board.BoardInfoResponse>(
                service, METHODID_GET_BOARD_INFO)))
        .addMethod(
          getSetBoardPwmFrequencyMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.diozero.remote.message.protobuf.IntegerMessage,
              com.diozero.remote.message.protobuf.Response>(
                service, METHODID_SET_BOARD_PWM_FREQUENCY)))
        .addMethod(
          getSetBoardServoFrequencyMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.diozero.remote.message.protobuf.IntegerMessage,
              com.diozero.remote.message.protobuf.Response>(
                service, METHODID_SET_BOARD_SERVO_FREQUENCY)))
        .addMethod(
          getGetGpioModeMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.diozero.remote.message.protobuf.Gpio.Identifier,
              com.diozero.remote.message.protobuf.Board.GpioModeResponse>(
                service, METHODID_GET_GPIO_MODE)))
        .addMethod(
          getGetGpioValueMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.diozero.remote.message.protobuf.Gpio.Identifier,
              com.diozero.remote.message.protobuf.IntegerResponse>(
                service, METHODID_GET_GPIO_VALUE)))
        .addMethod(
          getGetCpuTemperatureMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.google.protobuf.Empty,
              com.diozero.remote.message.protobuf.FloatResponse>(
                service, METHODID_GET_CPU_TEMPERATURE)))
        .addMethod(
          getGetI2CBusNumbersMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.google.protobuf.Empty,
              com.diozero.remote.message.protobuf.IntegerArrayResponse>(
                service, METHODID_GET_I2CBUS_NUMBERS)))
        .addMethod(
          getGetI2CFunctionalitiesMethod(),
          io.grpc.stub.ServerCalls.asyncUnaryCall(
            new MethodHandlers<
              com.diozero.remote.message.protobuf.IntegerMessage,
              com.diozero.remote.message.protobuf.IntegerResponse>(
                service, METHODID_GET_I2CFUNCTIONALITIES)))
        .build();
  }

  private static abstract class BoardServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    BoardServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.diozero.remote.message.protobuf.Diozero.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("BoardService");
    }
  }

  private static final class BoardServiceFileDescriptorSupplier
      extends BoardServiceBaseDescriptorSupplier {
    BoardServiceFileDescriptorSupplier() {}
  }

  private static final class BoardServiceMethodDescriptorSupplier
      extends BoardServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final java.lang.String methodName;

    BoardServiceMethodDescriptorSupplier(java.lang.String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (BoardServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new BoardServiceFileDescriptorSupplier())
              .addMethod(getGetBoardInfoMethod())
              .addMethod(getSetBoardPwmFrequencyMethod())
              .addMethod(getSetBoardServoFrequencyMethod())
              .addMethod(getGetGpioModeMethod())
              .addMethod(getGetGpioValueMethod())
              .addMethod(getGetCpuTemperatureMethod())
              .addMethod(getGetI2CBusNumbersMethod())
              .addMethod(getGetI2CFunctionalitiesMethod())
              .build();
        }
      }
    }
    return result;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy