<reponame>lemmi25/sila2lib<gh_stars>0
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from . import ObservableCommandController_pb2 as ObservableCommandController__pb2


class ObservableCommandControllerStub(object):
  """Feature: Observable Command Controller

  Allows to pause, resume or stop a currently running observable command

  """

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.Pause = channel.unary_unary(
        '/sila2.org.silastandard.core.observablecommandcontroller.v1.ObservableCommandController/Pause',
        request_serializer=ObservableCommandController__pb2.Pause_Parameters.SerializeToString,
        response_deserializer=ObservableCommandController__pb2.Pause_Responses.FromString,
        )
    self.Resume = channel.unary_unary(
        '/sila2.org.silastandard.core.observablecommandcontroller.v1.ObservableCommandController/Resume',
        request_serializer=ObservableCommandController__pb2.Resume_Parameters.SerializeToString,
        response_deserializer=ObservableCommandController__pb2.Resume_Responses.FromString,
        )
    self.Abort = channel.unary_unary(
        '/sila2.org.silastandard.core.observablecommandcontroller.v1.ObservableCommandController/Abort',
        request_serializer=ObservableCommandController__pb2.Abort_Parameters.SerializeToString,
        response_deserializer=ObservableCommandController__pb2.Abort_Responses.FromString,
        )
    self.Get_SupportedCommands = channel.unary_unary(
        '/sila2.org.silastandard.core.observablecommandcontroller.v1.ObservableCommandController/Get_SupportedCommands',
        request_serializer=ObservableCommandController__pb2.Get_SupportedCommands_Parameters.SerializeToString,
        response_deserializer=ObservableCommandController__pb2.Get_SupportedCommands_Responses.FromString,
        )


class ObservableCommandControllerServicer(object):
  """Feature: Observable Command Controller

  Allows to pause, resume or stop a currently running observable command

  """

  def Pause(self, request, context):
    """Pause
    Pause the command. The command can then be resumed again
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Resume(self, request, context):
    """Resume
    Resume the command after it has been paused
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Abort(self, request, context):
    """Abort
    Abort the command. This will make it impossible to resume the command
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def Get_SupportedCommands(self, request, context):
    """Supported Commands
    List of commands supported by this feature
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ObservableCommandControllerServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'Pause': grpc.unary_unary_rpc_method_handler(
          servicer.Pause,
          request_deserializer=ObservableCommandController__pb2.Pause_Parameters.FromString,
          response_serializer=ObservableCommandController__pb2.Pause_Responses.SerializeToString,
      ),
      'Resume': grpc.unary_unary_rpc_method_handler(
          servicer.Resume,
          request_deserializer=ObservableCommandController__pb2.Resume_Parameters.FromString,
          response_serializer=ObservableCommandController__pb2.Resume_Responses.SerializeToString,
      ),
      'Abort': grpc.unary_unary_rpc_method_handler(
          servicer.Abort,
          request_deserializer=ObservableCommandController__pb2.Abort_Parameters.FromString,
          response_serializer=ObservableCommandController__pb2.Abort_Responses.SerializeToString,
      ),
      'Get_SupportedCommands': grpc.unary_unary_rpc_method_handler(
          servicer.Get_SupportedCommands,
          request_deserializer=ObservableCommandController__pb2.Get_SupportedCommands_Parameters.FromString,
          response_serializer=ObservableCommandController__pb2.Get_SupportedCommands_Responses.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'sila2.org.silastandard.core.observablecommandcontroller.v1.ObservableCommandController', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
