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

import agv_calib_chassis_pb2 as agv__calib__chassis__pb2

GRPC_GENERATED_VERSION = '1.78.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + ' but the generated code in agv_calib_chassis_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class AgvCalibChassisServiceStub(object):
    """=========================================================
    核心服务：AGV 底盘底层硬件自诊与物理运动学标定代理服务
    [部署端 Server]：Windows 车端 (只负责听口令、转电机、报裸数据)
    [调用端 Client]：Linux 车间服务器 (负责发口令、看雷达真值、算误差)
    =========================================================
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.SetDiagnosticMode = channel.unary_unary(
                '/agv.calibration.chassis.AgvCalibChassisService/SetDiagnosticMode',
                request_serializer=agv__calib__chassis__pb2.DiagnosticModeRequest.SerializeToString,
                response_deserializer=agv__calib__chassis__pb2.StandardResponse.FromString,
                _registered_method=True)
        self.HardwareEmergencyBrake = channel.unary_unary(
                '/agv.calibration.chassis.AgvCalibChassisService/HardwareEmergencyBrake',
                request_serializer=agv__calib__chassis__pb2.Empty.SerializeToString,
                response_deserializer=agv__calib__chassis__pb2.StandardResponse.FromString,
                _registered_method=True)
        self.StreamHardwareTelemetry = channel.unary_stream(
                '/agv.calibration.chassis.AgvCalibChassisService/StreamHardwareTelemetry',
                request_serializer=agv__calib__chassis__pb2.Empty.SerializeToString,
                response_deserializer=agv__calib__chassis__pb2.HardwareState.FromString,
                _registered_method=True)
        self.ExecuteRawDriveCommand = channel.unary_unary(
                '/agv.calibration.chassis.AgvCalibChassisService/ExecuteRawDriveCommand',
                request_serializer=agv__calib__chassis__pb2.RawDriveRequest.SerializeToString,
                response_deserializer=agv__calib__chassis__pb2.StandardResponse.FromString,
                _registered_method=True)
        self.ExecuteRawSteerCommand = channel.unary_unary(
                '/agv.calibration.chassis.AgvCalibChassisService/ExecuteRawSteerCommand',
                request_serializer=agv__calib__chassis__pb2.RawSteerRequest.SerializeToString,
                response_deserializer=agv__calib__chassis__pb2.StandardResponse.FromString,
                _registered_method=True)
        self.CommitKinematicParameters = channel.unary_unary(
                '/agv.calibration.chassis.AgvCalibChassisService/CommitKinematicParameters',
                request_serializer=agv__calib__chassis__pb2.KinematicParams.SerializeToString,
                response_deserializer=agv__calib__chassis__pb2.StandardResponse.FromString,
                _registered_method=True)


class AgvCalibChassisServiceServicer(object):
    """=========================================================
    核心服务：AGV 底盘底层硬件自诊与物理运动学标定代理服务
    [部署端 Server]：Windows 车端 (只负责听口令、转电机、报裸数据)
    [调用端 Client]：Linux 车间服务器 (负责发口令、看雷达真值、算误差)
    =========================================================
    """

    def SetDiagnosticMode(self, request, context):
        """---------------------------------------------------------
        第一步：权限接管与安全熔断 (剥夺车端算法大脑)
        ---------------------------------------------------------
        💻 [Linux 发送 -> Windows]：要求切断底盘运动学逆解，进入纯物理开环直驱模式
        🚙 [Windows 返回 -> Linux]：返回接管是否成功的回执
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def HardwareEmergencyBrake(self, request, context):
        """💻 [Linux 发送 -> Windows]：无视一切状态立刻抱死电机的紧急急停指令
        🚙 [Windows 返回 -> Linux]：返回急停执行状态
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StreamHardwareTelemetry(self, request, context):
        """---------------------------------------------------------
        第二步：打开体征监控水龙头 (数字孪生健康诊断)
        ---------------------------------------------------------
        💻 [Linux 发送 -> Windows]：发送空请求，触发高频推流开关
        🚙 [Windows 持续流式返回 -> Linux]：以 50Hz 频率持续不断地回传原始脉冲与电流
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ExecuteRawDriveCommand(self, request, context):
        """---------------------------------------------------------
        第三步：原始物理开环考题下发 (逼迫底盘暴露机械缺陷)
        ---------------------------------------------------------
        💻 [Linux 发送 -> Windows]：绕过算法，直接命令指定驱动轮以固定 RPM 盲跑
        🚙 [Windows 返回 -> Linux]：返回电机是否已成功按给定 RPM 运转
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ExecuteRawSteerCommand(self, request, context):
        """💻 [Linux 发送 -> Windows]：直接对转向机构下发绝对物理角度 (测机械装歪的角度)
        🚙 [Windows 返回 -> Linux]：返回舵机是否已开始执行角度指令
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def CommitKinematicParameters(self, request, context):
        """---------------------------------------------------------
        第四步：物理本底参数定稿写值 (标定闭环结束)
        ---------------------------------------------------------
        💻 [Linux 发送 -> Windows]：下发 Linux 结合外部真值算出的绝对物理修正系数
        🚙 [Windows 返回 -> Linux]：将系数覆写到本地硬盘/驱动板后，返回成功回执
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_AgvCalibChassisServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'SetDiagnosticMode': grpc.unary_unary_rpc_method_handler(
                    servicer.SetDiagnosticMode,
                    request_deserializer=agv__calib__chassis__pb2.DiagnosticModeRequest.FromString,
                    response_serializer=agv__calib__chassis__pb2.StandardResponse.SerializeToString,
            ),
            'HardwareEmergencyBrake': grpc.unary_unary_rpc_method_handler(
                    servicer.HardwareEmergencyBrake,
                    request_deserializer=agv__calib__chassis__pb2.Empty.FromString,
                    response_serializer=agv__calib__chassis__pb2.StandardResponse.SerializeToString,
            ),
            'StreamHardwareTelemetry': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamHardwareTelemetry,
                    request_deserializer=agv__calib__chassis__pb2.Empty.FromString,
                    response_serializer=agv__calib__chassis__pb2.HardwareState.SerializeToString,
            ),
            'ExecuteRawDriveCommand': grpc.unary_unary_rpc_method_handler(
                    servicer.ExecuteRawDriveCommand,
                    request_deserializer=agv__calib__chassis__pb2.RawDriveRequest.FromString,
                    response_serializer=agv__calib__chassis__pb2.StandardResponse.SerializeToString,
            ),
            'ExecuteRawSteerCommand': grpc.unary_unary_rpc_method_handler(
                    servicer.ExecuteRawSteerCommand,
                    request_deserializer=agv__calib__chassis__pb2.RawSteerRequest.FromString,
                    response_serializer=agv__calib__chassis__pb2.StandardResponse.SerializeToString,
            ),
            'CommitKinematicParameters': grpc.unary_unary_rpc_method_handler(
                    servicer.CommitKinematicParameters,
                    request_deserializer=agv__calib__chassis__pb2.KinematicParams.FromString,
                    response_serializer=agv__calib__chassis__pb2.StandardResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'agv.calibration.chassis.AgvCalibChassisService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('agv.calibration.chassis.AgvCalibChassisService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class AgvCalibChassisService(object):
    """=========================================================
    核心服务：AGV 底盘底层硬件自诊与物理运动学标定代理服务
    [部署端 Server]：Windows 车端 (只负责听口令、转电机、报裸数据)
    [调用端 Client]：Linux 车间服务器 (负责发口令、看雷达真值、算误差)
    =========================================================
    """

    @staticmethod
    def SetDiagnosticMode(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,
            '/agv.calibration.chassis.AgvCalibChassisService/SetDiagnosticMode',
            agv__calib__chassis__pb2.DiagnosticModeRequest.SerializeToString,
            agv__calib__chassis__pb2.StandardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def HardwareEmergencyBrake(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,
            '/agv.calibration.chassis.AgvCalibChassisService/HardwareEmergencyBrake',
            agv__calib__chassis__pb2.Empty.SerializeToString,
            agv__calib__chassis__pb2.StandardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StreamHardwareTelemetry(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,
            '/agv.calibration.chassis.AgvCalibChassisService/StreamHardwareTelemetry',
            agv__calib__chassis__pb2.Empty.SerializeToString,
            agv__calib__chassis__pb2.HardwareState.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExecuteRawDriveCommand(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,
            '/agv.calibration.chassis.AgvCalibChassisService/ExecuteRawDriveCommand',
            agv__calib__chassis__pb2.RawDriveRequest.SerializeToString,
            agv__calib__chassis__pb2.StandardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExecuteRawSteerCommand(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,
            '/agv.calibration.chassis.AgvCalibChassisService/ExecuteRawSteerCommand',
            agv__calib__chassis__pb2.RawSteerRequest.SerializeToString,
            agv__calib__chassis__pb2.StandardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CommitKinematicParameters(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,
            '/agv.calibration.chassis.AgvCalibChassisService/CommitKinematicParameters',
            agv__calib__chassis__pb2.KinematicParams.SerializeToString,
            agv__calib__chassis__pb2.StandardResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
