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

import messages_pb2 as messages__pb2
import robot_test_pb2 as robot__test__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.InitReducerTest = channel.unary_unary(
                '/robotc.RobotTest/InitReducerTest',
                request_serializer=robot__test__pb2.Empty.SerializeToString,
                response_deserializer=robot__test__pb2.Result.FromString,
                )
        self.ReducerTest = channel.unary_unary(
                '/robotc.RobotTest/ReducerTest',
                request_serializer=robot__test__pb2.ReducerRequest.SerializeToString,
                response_deserializer=robot__test__pb2.ReducerResult.FromString,
                )
        self.InitJointTest = channel.unary_unary(
                '/robotc.RobotTest/InitJointTest',
                request_serializer=robot__test__pb2.Empty.SerializeToString,
                response_deserializer=robot__test__pb2.Result.FromString,
                )
        self.JointStudy = channel.unary_unary(
                '/robotc.RobotTest/JointStudy',
                request_serializer=robot__test__pb2.Empty.SerializeToString,
                response_deserializer=robot__test__pb2.JointStudyResult.FromString,
                )
        self.JointTest = channel.unary_unary(
                '/robotc.RobotTest/JointTest',
                request_serializer=robot__test__pb2.JointRequest.SerializeToString,
                response_deserializer=robot__test__pb2.JointResult.FromString,
                )
        self.TestCommand = channel.unary_unary(
                '/robotc.RobotTest/TestCommand',
                request_serializer=robot__test__pb2.CommandRequest.SerializeToString,
                response_deserializer=robot__test__pb2.CommandResult.FromString,
                )
        self.RunInTest = channel.unary_unary(
                '/robotc.RobotTest/RunInTest',
                request_serializer=robot__test__pb2.RunInRequest.SerializeToString,
                response_deserializer=robot__test__pb2.RunInResult.FromString,
                )
        self.MoveDetectTest = channel.unary_unary(
                '/robotc.RobotTest/MoveDetectTest',
                request_serializer=robot__test__pb2.MoveDetectRequest.SerializeToString,
                response_deserializer=robot__test__pb2.MoveDetectResult.FromString,
                )
        self.GetDialIndicator = channel.unary_unary(
                '/robotc.RobotTest/GetDialIndicator',
                request_serializer=robot__test__pb2.DeviceIds.SerializeToString,
                response_deserializer=robot__test__pb2.DeviceValues.FromString,
                )
        self.StartProductTest = channel.unary_unary(
                '/robotc.RobotTest/StartProductTest',
                request_serializer=robot__test__pb2.ProductTestRequest.SerializeToString,
                response_deserializer=robot__test__pb2.ProductTestResult.FromString,
                )
        self.BoxTest = channel.unary_unary(
                '/robotc.RobotTest/BoxTest',
                request_serializer=robot__test__pb2.Empty.SerializeToString,
                response_deserializer=robot__test__pb2.Result.FromString,
                )
        self.InitRobot = channel.unary_unary(
                '/robotc.RobotTest/InitRobot',
                request_serializer=messages__pb2.RobotInfo.SerializeToString,
                response_deserializer=robot__test__pb2.InitRobotResult.FromString,
                )
        self.WriteSn = channel.unary_unary(
                '/robotc.RobotTest/WriteSn',
                request_serializer=messages__pb2.DeviceInfo.SerializeToString,
                response_deserializer=robot__test__pb2.WriteSnResult.FromString,
                )
        self.ReadSn = channel.unary_unary(
                '/robotc.RobotTest/ReadSn',
                request_serializer=robot__test__pb2.DeviceTypeRequest.SerializeToString,
                response_deserializer=messages__pb2.DeviceInfo.FromString,
                )


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

    def InitReducerTest(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 ReducerTest(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 InitJointTest(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 JointStudy(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 JointTest(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 TestCommand(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 RunInTest(self, request, context):
        """/ 磨合测试，返回每个周期的结果，主动断开即停止
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def MoveDetectTest(self, request, context):
        """/ 绝对精度测试
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetDialIndicator(self, request, context):
        """/ 百分表读取
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StartProductTest(self, request, context):
        """/ 量产测试
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def BoxTest(self, request, context):
        """/ 主机箱测试: 1, 正常；其他异常
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def InitRobot(self, request, context):
        """初始化机器人设备信息

        *
        {
        "robot": {
        "model": "LM6J",
        "sn": "C01905010001XX"
        },
        "name": "lebai-Yonnie",
        "mac": "B6LLYLUAQG19",
        "arm": {
        "sn": "R01905010001XX"
        }
        }
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def WriteSn(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 ReadSn(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_RobotTestServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'InitReducerTest': grpc.unary_unary_rpc_method_handler(
                    servicer.InitReducerTest,
                    request_deserializer=robot__test__pb2.Empty.FromString,
                    response_serializer=robot__test__pb2.Result.SerializeToString,
            ),
            'ReducerTest': grpc.unary_unary_rpc_method_handler(
                    servicer.ReducerTest,
                    request_deserializer=robot__test__pb2.ReducerRequest.FromString,
                    response_serializer=robot__test__pb2.ReducerResult.SerializeToString,
            ),
            'InitJointTest': grpc.unary_unary_rpc_method_handler(
                    servicer.InitJointTest,
                    request_deserializer=robot__test__pb2.Empty.FromString,
                    response_serializer=robot__test__pb2.Result.SerializeToString,
            ),
            'JointStudy': grpc.unary_unary_rpc_method_handler(
                    servicer.JointStudy,
                    request_deserializer=robot__test__pb2.Empty.FromString,
                    response_serializer=robot__test__pb2.JointStudyResult.SerializeToString,
            ),
            'JointTest': grpc.unary_unary_rpc_method_handler(
                    servicer.JointTest,
                    request_deserializer=robot__test__pb2.JointRequest.FromString,
                    response_serializer=robot__test__pb2.JointResult.SerializeToString,
            ),
            'TestCommand': grpc.unary_unary_rpc_method_handler(
                    servicer.TestCommand,
                    request_deserializer=robot__test__pb2.CommandRequest.FromString,
                    response_serializer=robot__test__pb2.CommandResult.SerializeToString,
            ),
            'RunInTest': grpc.unary_unary_rpc_method_handler(
                    servicer.RunInTest,
                    request_deserializer=robot__test__pb2.RunInRequest.FromString,
                    response_serializer=robot__test__pb2.RunInResult.SerializeToString,
            ),
            'MoveDetectTest': grpc.unary_unary_rpc_method_handler(
                    servicer.MoveDetectTest,
                    request_deserializer=robot__test__pb2.MoveDetectRequest.FromString,
                    response_serializer=robot__test__pb2.MoveDetectResult.SerializeToString,
            ),
            'GetDialIndicator': grpc.unary_unary_rpc_method_handler(
                    servicer.GetDialIndicator,
                    request_deserializer=robot__test__pb2.DeviceIds.FromString,
                    response_serializer=robot__test__pb2.DeviceValues.SerializeToString,
            ),
            'StartProductTest': grpc.unary_unary_rpc_method_handler(
                    servicer.StartProductTest,
                    request_deserializer=robot__test__pb2.ProductTestRequest.FromString,
                    response_serializer=robot__test__pb2.ProductTestResult.SerializeToString,
            ),
            'BoxTest': grpc.unary_unary_rpc_method_handler(
                    servicer.BoxTest,
                    request_deserializer=robot__test__pb2.Empty.FromString,
                    response_serializer=robot__test__pb2.Result.SerializeToString,
            ),
            'InitRobot': grpc.unary_unary_rpc_method_handler(
                    servicer.InitRobot,
                    request_deserializer=messages__pb2.RobotInfo.FromString,
                    response_serializer=robot__test__pb2.InitRobotResult.SerializeToString,
            ),
            'WriteSn': grpc.unary_unary_rpc_method_handler(
                    servicer.WriteSn,
                    request_deserializer=messages__pb2.DeviceInfo.FromString,
                    response_serializer=robot__test__pb2.WriteSnResult.SerializeToString,
            ),
            'ReadSn': grpc.unary_unary_rpc_method_handler(
                    servicer.ReadSn,
                    request_deserializer=robot__test__pb2.DeviceTypeRequest.FromString,
                    response_serializer=messages__pb2.DeviceInfo.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'robotc.RobotTest', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def InitReducerTest(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, '/robotc.RobotTest/InitReducerTest',
            robot__test__pb2.Empty.SerializeToString,
            robot__test__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReducerTest(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, '/robotc.RobotTest/ReducerTest',
            robot__test__pb2.ReducerRequest.SerializeToString,
            robot__test__pb2.ReducerResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InitJointTest(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, '/robotc.RobotTest/InitJointTest',
            robot__test__pb2.Empty.SerializeToString,
            robot__test__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def JointStudy(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, '/robotc.RobotTest/JointStudy',
            robot__test__pb2.Empty.SerializeToString,
            robot__test__pb2.JointStudyResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def JointTest(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, '/robotc.RobotTest/JointTest',
            robot__test__pb2.JointRequest.SerializeToString,
            robot__test__pb2.JointResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def TestCommand(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, '/robotc.RobotTest/TestCommand',
            robot__test__pb2.CommandRequest.SerializeToString,
            robot__test__pb2.CommandResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RunInTest(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, '/robotc.RobotTest/RunInTest',
            robot__test__pb2.RunInRequest.SerializeToString,
            robot__test__pb2.RunInResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def MoveDetectTest(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, '/robotc.RobotTest/MoveDetectTest',
            robot__test__pb2.MoveDetectRequest.SerializeToString,
            robot__test__pb2.MoveDetectResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetDialIndicator(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, '/robotc.RobotTest/GetDialIndicator',
            robot__test__pb2.DeviceIds.SerializeToString,
            robot__test__pb2.DeviceValues.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StartProductTest(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, '/robotc.RobotTest/StartProductTest',
            robot__test__pb2.ProductTestRequest.SerializeToString,
            robot__test__pb2.ProductTestResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def BoxTest(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, '/robotc.RobotTest/BoxTest',
            robot__test__pb2.Empty.SerializeToString,
            robot__test__pb2.Result.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InitRobot(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, '/robotc.RobotTest/InitRobot',
            messages__pb2.RobotInfo.SerializeToString,
            robot__test__pb2.InitRobotResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def WriteSn(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, '/robotc.RobotTest/WriteSn',
            messages__pb2.DeviceInfo.SerializeToString,
            robot__test__pb2.WriteSnResult.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ReadSn(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, '/robotc.RobotTest/ReadSn',
            robot__test__pb2.DeviceTypeRequest.SerializeToString,
            messages__pb2.DeviceInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
