# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import admm_pb2 as admm__pb2


class ADMMAgentStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.start_admm = channel.unary_unary(
        '/ADMMAgent/start_admm',
        request_serializer=admm__pb2.EmptyRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.set_beta_element = channel.unary_unary(
        '/ADMMAgent/set_beta_element',
        request_serializer=admm__pb2.SetBetaRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.set_z_element = channel.unary_unary(
        '/ADMMAgent/set_z_element',
        request_serializer=admm__pb2.SetZRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.set_x0_element = channel.unary_unary(
        '/ADMMAgent/set_x0_element',
        request_serializer=admm__pb2.SetX0Request.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.set_admm_rho = channel.unary_unary(
        '/ADMMAgent/set_admm_rho',
        request_serializer=admm__pb2.SetRhoRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.set_admm_max_iter = channel.unary_unary(
        '/ADMMAgent/set_admm_max_iter',
        request_serializer=admm__pb2.SetMaxIterRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.remote_shutdown = channel.unary_unary(
        '/ADMMAgent/remote_shutdown',
        request_serializer=admm__pb2.EmptyRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.enable = channel.unary_unary(
        '/ADMMAgent/enable',
        request_serializer=admm__pb2.EmptyRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.merge = channel.unary_unary(
        '/ADMMAgent/merge',
        request_serializer=admm__pb2.MergeRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.add_me_to_your_neighbours = channel.unary_unary(
        '/ADMMAgent/add_me_to_your_neighbours',
        request_serializer=admm__pb2.AddToNeighboursRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.set_comm_link_to_neigh = channel.unary_unary(
        '/ADMMAgent/set_comm_link_to_neigh',
        request_serializer=admm__pb2.SetCommLinkRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )
    self.set_measurement_webserver = channel.unary_unary(
        '/ADMMAgent/set_measurement_webserver',
        request_serializer=admm__pb2.SetMeasServerRequest.SerializeToString,
        response_deserializer=admm__pb2.CommReply.FromString,
        )


class ADMMAgentServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def start_admm(self, request, context):
    """start the admm algorithm on the agent
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def set_beta_element(self, request, context):
    """sets a beta value in the ADMM algorithm
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def set_z_element(self, request, context):
    """sets a z value in the ADMM algorithm
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def set_x0_element(self, request, context):
    """sets a x0 value in the ADMM algorithm
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def set_admm_rho(self, request, context):
    """sets the step size rho for the ADMM algorithm
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def set_admm_max_iter(self, request, context):
    """sets the number of iterations the ADMM algorithm
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def remote_shutdown(self, request, context):
    """shuts down the agent
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def enable(self, request, context):
    """enable the agent
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def merge(self, request, context):
    """when a new agent is started after the system, use this function to merge the agent to the rest of the network
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def add_me_to_your_neighbours(self, request, context):
    """when a new agent is started after the system, use this function to register the new agent with its neighbours
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def set_comm_link_to_neigh(self, request, context):
    """adds virtual delay and loss to the communication link towards a neighbour
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def set_measurement_webserver(self, request, context):
    """sets the measurement server to be used by the agent
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ADMMAgentServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'start_admm': grpc.unary_unary_rpc_method_handler(
          servicer.start_admm,
          request_deserializer=admm__pb2.EmptyRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'set_beta_element': grpc.unary_unary_rpc_method_handler(
          servicer.set_beta_element,
          request_deserializer=admm__pb2.SetBetaRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'set_z_element': grpc.unary_unary_rpc_method_handler(
          servicer.set_z_element,
          request_deserializer=admm__pb2.SetZRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'set_x0_element': grpc.unary_unary_rpc_method_handler(
          servicer.set_x0_element,
          request_deserializer=admm__pb2.SetX0Request.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'set_admm_rho': grpc.unary_unary_rpc_method_handler(
          servicer.set_admm_rho,
          request_deserializer=admm__pb2.SetRhoRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'set_admm_max_iter': grpc.unary_unary_rpc_method_handler(
          servicer.set_admm_max_iter,
          request_deserializer=admm__pb2.SetMaxIterRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'remote_shutdown': grpc.unary_unary_rpc_method_handler(
          servicer.remote_shutdown,
          request_deserializer=admm__pb2.EmptyRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'enable': grpc.unary_unary_rpc_method_handler(
          servicer.enable,
          request_deserializer=admm__pb2.EmptyRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'merge': grpc.unary_unary_rpc_method_handler(
          servicer.merge,
          request_deserializer=admm__pb2.MergeRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'add_me_to_your_neighbours': grpc.unary_unary_rpc_method_handler(
          servicer.add_me_to_your_neighbours,
          request_deserializer=admm__pb2.AddToNeighboursRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'set_comm_link_to_neigh': grpc.unary_unary_rpc_method_handler(
          servicer.set_comm_link_to_neigh,
          request_deserializer=admm__pb2.SetCommLinkRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
      'set_measurement_webserver': grpc.unary_unary_rpc_method_handler(
          servicer.set_measurement_webserver,
          request_deserializer=admm__pb2.SetMeasServerRequest.FromString,
          response_serializer=admm__pb2.CommReply.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ADMMAgent', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
