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

import sensor_pb2 as sensor__pb2


class SensorServiceGrpcStub(object):
    """定义服务,用在rpc传输中
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.getDistanceSensorValue = channel.unary_unary(
                '/SensorPackage.SensorServiceGrpc/getDistanceSensorValue',
                request_serializer=sensor__pb2.DistanceSensorRequest.SerializeToString,
                response_deserializer=sensor__pb2.DistanceSensorResponse.FromString,
                )
        self.startDistanceSensorStream = channel.unary_stream(
                '/SensorPackage.SensorServiceGrpc/startDistanceSensorStream',
                request_serializer=sensor__pb2.DistanceSensorRequest.SerializeToString,
                response_deserializer=sensor__pb2.DistanceSensorResponse.FromString,
                )
        self.stopDistanceSensorStream = channel.unary_unary(
                '/SensorPackage.SensorServiceGrpc/stopDistanceSensorStream',
                request_serializer=sensor__pb2.DistanceSensorRequest.SerializeToString,
                response_deserializer=sensor__pb2.SensorCommonResponse.FromString,
                )
        self.getIMUSensorValue = channel.unary_unary(
                '/SensorPackage.SensorServiceGrpc/getIMUSensorValue',
                request_serializer=sensor__pb2.SensorCommonRequest.SerializeToString,
                response_deserializer=sensor__pb2.IMUSensorResponse.FromString,
                )
        self.startCalibrate = channel.unary_stream(
                '/SensorPackage.SensorServiceGrpc/startCalibrate',
                request_serializer=sensor__pb2.StartCalibrateRequest.SerializeToString,
                response_deserializer=sensor__pb2.StartCalibrateResponse.FromString,
                )
        self.cancelCalibrate = channel.unary_unary(
                '/SensorPackage.SensorServiceGrpc/cancelCalibrate',
                request_serializer=sensor__pb2.CancelCalibrateRequest.SerializeToString,
                response_deserializer=sensor__pb2.CancelCalibrateResponse.FromString,
                )
        self.getAttitudeTilt = channel.unary_unary(
                '/SensorPackage.SensorServiceGrpc/getAttitudeTilt',
                request_serializer=sensor__pb2.AttitudeTiltRequest.SerializeToString,
                response_deserializer=sensor__pb2.AttitudeTiltResponse.FromString,
                )
        self.calibrateIMUWithAVFeedback = channel.unary_stream(
                '/SensorPackage.SensorServiceGrpc/calibrateIMUWithAVFeedback',
                request_serializer=sensor__pb2.StartCalibrateRequest.SerializeToString,
                response_deserializer=sensor__pb2.StartCalibrateResponse.FromString,
                )


class SensorServiceGrpcServicer(object):
    """定义服务,用在rpc传输中
    """

    def getDistanceSensorValue(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 startDistanceSensorStream(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 stopDistanceSensorStream(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 getIMUSensorValue(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 startCalibrate(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 cancelCalibrate(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 getAttitudeTilt(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 calibrateIMUWithAVFeedback(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_SensorServiceGrpcServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'getDistanceSensorValue': grpc.unary_unary_rpc_method_handler(
                    servicer.getDistanceSensorValue,
                    request_deserializer=sensor__pb2.DistanceSensorRequest.FromString,
                    response_serializer=sensor__pb2.DistanceSensorResponse.SerializeToString,
            ),
            'startDistanceSensorStream': grpc.unary_stream_rpc_method_handler(
                    servicer.startDistanceSensorStream,
                    request_deserializer=sensor__pb2.DistanceSensorRequest.FromString,
                    response_serializer=sensor__pb2.DistanceSensorResponse.SerializeToString,
            ),
            'stopDistanceSensorStream': grpc.unary_unary_rpc_method_handler(
                    servicer.stopDistanceSensorStream,
                    request_deserializer=sensor__pb2.DistanceSensorRequest.FromString,
                    response_serializer=sensor__pb2.SensorCommonResponse.SerializeToString,
            ),
            'getIMUSensorValue': grpc.unary_unary_rpc_method_handler(
                    servicer.getIMUSensorValue,
                    request_deserializer=sensor__pb2.SensorCommonRequest.FromString,
                    response_serializer=sensor__pb2.IMUSensorResponse.SerializeToString,
            ),
            'startCalibrate': grpc.unary_stream_rpc_method_handler(
                    servicer.startCalibrate,
                    request_deserializer=sensor__pb2.StartCalibrateRequest.FromString,
                    response_serializer=sensor__pb2.StartCalibrateResponse.SerializeToString,
            ),
            'cancelCalibrate': grpc.unary_unary_rpc_method_handler(
                    servicer.cancelCalibrate,
                    request_deserializer=sensor__pb2.CancelCalibrateRequest.FromString,
                    response_serializer=sensor__pb2.CancelCalibrateResponse.SerializeToString,
            ),
            'getAttitudeTilt': grpc.unary_unary_rpc_method_handler(
                    servicer.getAttitudeTilt,
                    request_deserializer=sensor__pb2.AttitudeTiltRequest.FromString,
                    response_serializer=sensor__pb2.AttitudeTiltResponse.SerializeToString,
            ),
            'calibrateIMUWithAVFeedback': grpc.unary_stream_rpc_method_handler(
                    servicer.calibrateIMUWithAVFeedback,
                    request_deserializer=sensor__pb2.StartCalibrateRequest.FromString,
                    response_serializer=sensor__pb2.StartCalibrateResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'SensorPackage.SensorServiceGrpc', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class SensorServiceGrpc(object):
    """定义服务,用在rpc传输中
    """

    @staticmethod
    def getDistanceSensorValue(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, '/SensorPackage.SensorServiceGrpc/getDistanceSensorValue',
            sensor__pb2.DistanceSensorRequest.SerializeToString,
            sensor__pb2.DistanceSensorResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def startDistanceSensorStream(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_stream(request, target, '/SensorPackage.SensorServiceGrpc/startDistanceSensorStream',
            sensor__pb2.DistanceSensorRequest.SerializeToString,
            sensor__pb2.DistanceSensorResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def stopDistanceSensorStream(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, '/SensorPackage.SensorServiceGrpc/stopDistanceSensorStream',
            sensor__pb2.DistanceSensorRequest.SerializeToString,
            sensor__pb2.SensorCommonResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getIMUSensorValue(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, '/SensorPackage.SensorServiceGrpc/getIMUSensorValue',
            sensor__pb2.SensorCommonRequest.SerializeToString,
            sensor__pb2.IMUSensorResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def startCalibrate(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_stream(request, target, '/SensorPackage.SensorServiceGrpc/startCalibrate',
            sensor__pb2.StartCalibrateRequest.SerializeToString,
            sensor__pb2.StartCalibrateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def cancelCalibrate(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, '/SensorPackage.SensorServiceGrpc/cancelCalibrate',
            sensor__pb2.CancelCalibrateRequest.SerializeToString,
            sensor__pb2.CancelCalibrateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def getAttitudeTilt(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, '/SensorPackage.SensorServiceGrpc/getAttitudeTilt',
            sensor__pb2.AttitudeTiltRequest.SerializeToString,
            sensor__pb2.AttitudeTiltResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def calibrateIMUWithAVFeedback(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_stream(request, target, '/SensorPackage.SensorServiceGrpc/calibrateIMUWithAVFeedback',
            sensor__pb2.StartCalibrateRequest.SerializeToString,
            sensor__pb2.StartCalibrateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
