# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

import common_msgs_pb2 as common__msgs__pb2
import linear_pb2 as linear__pb2


class LinearControlStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetServoAll = channel.unary_unary(
                '/Nrmk.IndyFramework.LinearControl/SetServoAll',
                request_serializer=common__msgs__pb2.State.SerializeToString,
                response_deserializer=common__msgs__pb2.Response.FromString,
                )
        self.MoveLinear = channel.unary_unary(
                '/Nrmk.IndyFramework.LinearControl/MoveLinear',
                request_serializer=linear__pb2.LinearTarget.SerializeToString,
                response_deserializer=common__msgs__pb2.Response.FromString,
                )
        self.StopMotion = channel.unary_unary(
                '/Nrmk.IndyFramework.LinearControl/StopMotion',
                request_serializer=common__msgs__pb2.StopCat.SerializeToString,
                response_deserializer=common__msgs__pb2.Response.FromString,
                )
        self.PauseMotion = channel.unary_unary(
                '/Nrmk.IndyFramework.LinearControl/PauseMotion',
                request_serializer=common__msgs__pb2.PauseCat.SerializeToString,
                response_deserializer=common__msgs__pb2.Response.FromString,
                )
        self.ResumeMotion = channel.unary_unary(
                '/Nrmk.IndyFramework.LinearControl/ResumeMotion',
                request_serializer=common__msgs__pb2.Empty.SerializeToString,
                response_deserializer=common__msgs__pb2.Response.FromString,
                )
        self.GetAxesInfo = channel.unary_unary(
                '/Nrmk.IndyFramework.LinearControl/GetAxesInfo',
                request_serializer=common__msgs__pb2.Empty.SerializeToString,
                response_deserializer=linear__pb2.AxesInfo.FromString,
                )


class LinearControlServicer(object):
    """Missing associated documentation comment in .proto file."""

    def SetServoAll(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MoveLinear(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StopMotion(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def PauseMotion(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ResumeMotion(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAxesInfo(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_LinearControlServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetServoAll': grpc.unary_unary_rpc_method_handler(
                    servicer.SetServoAll,
                    request_deserializer=common__msgs__pb2.State.FromString,
                    response_serializer=common__msgs__pb2.Response.SerializeToString,
            ),
            'MoveLinear': grpc.unary_unary_rpc_method_handler(
                    servicer.MoveLinear,
                    request_deserializer=linear__pb2.LinearTarget.FromString,
                    response_serializer=common__msgs__pb2.Response.SerializeToString,
            ),
            'StopMotion': grpc.unary_unary_rpc_method_handler(
                    servicer.StopMotion,
                    request_deserializer=common__msgs__pb2.StopCat.FromString,
                    response_serializer=common__msgs__pb2.Response.SerializeToString,
            ),
            'PauseMotion': grpc.unary_unary_rpc_method_handler(
                    servicer.PauseMotion,
                    request_deserializer=common__msgs__pb2.PauseCat.FromString,
                    response_serializer=common__msgs__pb2.Response.SerializeToString,
            ),
            'ResumeMotion': grpc.unary_unary_rpc_method_handler(
                    servicer.ResumeMotion,
                    request_deserializer=common__msgs__pb2.Empty.FromString,
                    response_serializer=common__msgs__pb2.Response.SerializeToString,
            ),
            'GetAxesInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAxesInfo,
                    request_deserializer=common__msgs__pb2.Empty.FromString,
                    response_serializer=linear__pb2.AxesInfo.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Nrmk.IndyFramework.LinearControl', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class LinearControl(object):
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def SetServoAll(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Nrmk.IndyFramework.LinearControl/SetServoAll',
            common__msgs__pb2.State.SerializeToString,
            common__msgs__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MoveLinear(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Nrmk.IndyFramework.LinearControl/MoveLinear',
            linear__pb2.LinearTarget.SerializeToString,
            common__msgs__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StopMotion(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Nrmk.IndyFramework.LinearControl/StopMotion',
            common__msgs__pb2.StopCat.SerializeToString,
            common__msgs__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def PauseMotion(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Nrmk.IndyFramework.LinearControl/PauseMotion',
            common__msgs__pb2.PauseCat.SerializeToString,
            common__msgs__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ResumeMotion(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Nrmk.IndyFramework.LinearControl/ResumeMotion',
            common__msgs__pb2.Empty.SerializeToString,
            common__msgs__pb2.Response.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAxesInfo(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Nrmk.IndyFramework.LinearControl/GetAxesInfo',
            common__msgs__pb2.Empty.SerializeToString,
            linear__pb2.AxesInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
