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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
import qiclib.packages.grpc.vna_pb2 as vna__pb2

GRPC_GENERATED_VERSION = '1.66.1'
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},'
        + f' but the generated code in vna_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 VNAServiceStub(object):
    """*
    Allows access to the VNA via gRPC.

    Theory of operation:

    To measure the Transmission coefficients, set the
    Frequencies to measure (`SetFreqRange`), the sample-time (`SetSample`)
    and optionally the Setup-Time (`SetSetupTime`). Make sure no errors
    occurred since some parameter-sets might be incompatible
    You can then call the `MeasureTransmission` method to retrieve
    The S-Parameter of the Device under Test.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Reset = channel.unary_unary(
                '/vna.VNAService/Reset',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.IsBusy = channel.unary_unary(
                '/vna.VNAService/IsBusy',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
                _registered_method=True)
        self.SetFreqSpec = channel.unary_unary(
                '/vna.VNAService/SetFreqSpec',
                request_serializer=vna__pb2.FrequencySpec.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.GetFreqSpec = channel.unary_unary(
                '/vna.VNAService/GetFreqSpec',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=vna__pb2.FrequencySpec.FromString,
                _registered_method=True)
        self.SetAverages = channel.unary_unary(
                '/vna.VNAService/SetAverages',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.UInt32Value.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.GetAverages = channel.unary_unary(
                '/vna.VNAService/GetAverages',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.UInt32Value.FromString,
                _registered_method=True)
        self.SetMultiplier = channel.unary_unary(
                '/vna.VNAService/SetMultiplier',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.GetMultiplier = channel.unary_unary(
                '/vna.VNAService/GetMultiplier',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.FromString,
                _registered_method=True)
        self.SetSetupTime = channel.unary_unary(
                '/vna.VNAService/SetSetupTime',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.GetSetupTime = channel.unary_unary(
                '/vna.VNAService/GetSetupTime',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.FromString,
                _registered_method=True)
        self.Sweep = channel.unary_stream(
                '/vna.VNAService/Sweep',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=vna__pb2.Transmission.FromString,
                _registered_method=True)
        self.SetPhaseCorr = channel.unary_unary(
                '/vna.VNAService/SetPhaseCorr',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.GetPhaseCorr = channel.unary_unary(
                '/vna.VNAService/GetPhaseCorr',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.FromString,
                _registered_method=True)
        self.GetResonators = channel.unary_unary(
                '/vna.VNAService/GetResonators',
                request_serializer=vna__pb2.ResonatorOptions.SerializeToString,
                response_deserializer=vna__pb2.DetectedResonators.FromString,
                _registered_method=True)
        self.SetPhaseUnit = channel.unary_unary(
                '/vna.VNAService/SetPhaseUnit',
                request_serializer=vna__pb2.PhaseUnit_.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.SetMagnitudeUnit = channel.unary_unary(
                '/vna.VNAService/SetMagnitudeUnit',
                request_serializer=vna__pb2.MagnitudeUnit_.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.SetUnwrapPhase = channel.unary_unary(
                '/vna.VNAService/SetUnwrapPhase',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.SetTransmissionOptions = channel.unary_unary(
                '/vna.VNAService/SetTransmissionOptions',
                request_serializer=vna__pb2.TransmissionOptions.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.GetTransmissionOptions = channel.unary_unary(
                '/vna.VNAService/GetTransmissionOptions',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=vna__pb2.TransmissionOptions.FromString,
                _registered_method=True)
        self.Calibrate = channel.unary_unary(
                '/vna.VNAService/Calibrate',
                request_serializer=vna__pb2.CalibrationOptios.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.RemoveCalibration = channel.unary_unary(
                '/vna.VNAService/RemoveCalibration',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
                _registered_method=True)
        self.GetAvailableCalibrations = channel.unary_unary(
                '/vna.VNAService/GetAvailableCalibrations',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=vna__pb2.AvailableCalibrations.FromString,
                _registered_method=True)
        self.DownloadCalibration = channel.unary_unary(
                '/vna.VNAService/DownloadCalibration',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
                response_deserializer=vna__pb2.CalibrationData.FromString,
                _registered_method=True)
        self.UploadCalibration = channel.unary_unary(
                '/vna.VNAService/UploadCalibration',
                request_serializer=vna__pb2.CalibrationData.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.SetActiveCalibration = channel.unary_unary(
                '/vna.VNAService/SetActiveCalibration',
                request_serializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                _registered_method=True)
        self.GetActiveCalibration = channel.unary_unary(
                '/vna.VNAService/GetActiveCalibration',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
                _registered_method=True)


class VNAServiceServicer(object):
    """*
    Allows access to the VNA via gRPC.

    Theory of operation:

    To measure the Transmission coefficients, set the
    Frequencies to measure (`SetFreqRange`), the sample-time (`SetSample`)
    and optionally the Setup-Time (`SetSetupTime`). Make sure no errors
    occurred since some parameter-sets might be incompatible
    You can then call the `MeasureTransmission` method to retrieve
    The S-Parameter of the Device under Test.
    """

    def Reset(self, request, context):
        """*
        Resets the core
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def IsBusy(self, request, context):
        """*
        Returns `true` when there is any ongoing measurement,
        `false` otherwise
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetFreqSpec(self, request, context):
        """*
        Sets the three relevant frequencies in hertz that control the VNA
        when measuring the transmission parameters.
        The passed `FrequencyRange` message is flexible in that it allows
        multiple configurations how one would want to define frequency spans.
        See the message documentation for more.

        No frequency may be greater than half the sampling-frequency
        (half the sampling frequency is usually 500 MHz) and no frequency
        may be lower than half the negative sampling frequency (-500 MHz).
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetFreqSpec(self, request, context):
        """*
        Returns start, step and stop frequencies.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetAverages(self, request, context):
        """*
        Sets the sample-time in clock-cycle periods.

        A higher sample-time takes longer but generally produces better results.

        This will interrupt ongoing measurements
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAverages(self, request, context):
        """*
        Returns the sample-time in clock-cycle periods.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetMultiplier(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 GetMultiplier(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 SetSetupTime(self, request, context):
        """*
        When measuring the transmission parameters, this is an extra time
        where a signal has time to propagate over the system during which
        no measurements are done.

        The time is given in seconds.

        This will interrupt ongoing measurements
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetSetupTime(self, request, context):
        """*
        Return the setup-time in seconds.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Sweep(self, request, context):
        """*
        Executes one measurement, sweeping the provided frequency range.

        The stream will emit data until all Transmission coefficients in the
        frequency-range given via `SetFreqRange` have completed.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetPhaseCorr(self, request, context):
        """*
        Sets a correction factor when a longer cable is used.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetPhaseCorr(self, request, context):
        """*
        Returns the correction factor
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetResonators(self, request, context):
        """*
        Detect Resonators in a frequency spectrum
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetPhaseUnit(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 SetMagnitudeUnit(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 SetUnwrapPhase(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 SetTransmissionOptions(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 GetTransmissionOptions(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 Calibrate(self, request, context):
        """*
        Issue a calibration command

        This will launch all the required steps to perform the calibration
        of the VNA.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveCalibration(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 GetAvailableCalibrations(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 DownloadCalibration(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 UploadCalibration(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 SetActiveCalibration(self, request, context):
        """if the value is not set; remove the current cal
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetActiveCalibration(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_VNAServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Reset': grpc.unary_unary_rpc_method_handler(
                    servicer.Reset,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'IsBusy': grpc.unary_unary_rpc_method_handler(
                    servicer.IsBusy,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.SerializeToString,
            ),
            'SetFreqSpec': grpc.unary_unary_rpc_method_handler(
                    servicer.SetFreqSpec,
                    request_deserializer=vna__pb2.FrequencySpec.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetFreqSpec': grpc.unary_unary_rpc_method_handler(
                    servicer.GetFreqSpec,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=vna__pb2.FrequencySpec.SerializeToString,
            ),
            'SetAverages': grpc.unary_unary_rpc_method_handler(
                    servicer.SetAverages,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.UInt32Value.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetAverages': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAverages,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.UInt32Value.SerializeToString,
            ),
            'SetMultiplier': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMultiplier,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetMultiplier': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMultiplier,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.SerializeToString,
            ),
            'SetSetupTime': grpc.unary_unary_rpc_method_handler(
                    servicer.SetSetupTime,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetSetupTime': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSetupTime,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.SerializeToString,
            ),
            'Sweep': grpc.unary_stream_rpc_method_handler(
                    servicer.Sweep,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=vna__pb2.Transmission.SerializeToString,
            ),
            'SetPhaseCorr': grpc.unary_unary_rpc_method_handler(
                    servicer.SetPhaseCorr,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetPhaseCorr': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPhaseCorr,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.DoubleValue.SerializeToString,
            ),
            'GetResonators': grpc.unary_unary_rpc_method_handler(
                    servicer.GetResonators,
                    request_deserializer=vna__pb2.ResonatorOptions.FromString,
                    response_serializer=vna__pb2.DetectedResonators.SerializeToString,
            ),
            'SetPhaseUnit': grpc.unary_unary_rpc_method_handler(
                    servicer.SetPhaseUnit,
                    request_deserializer=vna__pb2.PhaseUnit_.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SetMagnitudeUnit': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMagnitudeUnit,
                    request_deserializer=vna__pb2.MagnitudeUnit_.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SetUnwrapPhase': grpc.unary_unary_rpc_method_handler(
                    servicer.SetUnwrapPhase,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SetTransmissionOptions': grpc.unary_unary_rpc_method_handler(
                    servicer.SetTransmissionOptions,
                    request_deserializer=vna__pb2.TransmissionOptions.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetTransmissionOptions': grpc.unary_unary_rpc_method_handler(
                    servicer.GetTransmissionOptions,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=vna__pb2.TransmissionOptions.SerializeToString,
            ),
            'Calibrate': grpc.unary_unary_rpc_method_handler(
                    servicer.Calibrate,
                    request_deserializer=vna__pb2.CalibrationOptios.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'RemoveCalibration': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveCalibration,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.BoolValue.SerializeToString,
            ),
            'GetAvailableCalibrations': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAvailableCalibrations,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=vna__pb2.AvailableCalibrations.SerializeToString,
            ),
            'DownloadCalibration': grpc.unary_unary_rpc_method_handler(
                    servicer.DownloadCalibration,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
                    response_serializer=vna__pb2.CalibrationData.SerializeToString,
            ),
            'UploadCalibration': grpc.unary_unary_rpc_method_handler(
                    servicer.UploadCalibration,
                    request_deserializer=vna__pb2.CalibrationData.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'SetActiveCalibration': grpc.unary_unary_rpc_method_handler(
                    servicer.SetActiveCalibration,
                    request_deserializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'GetActiveCalibration': grpc.unary_unary_rpc_method_handler(
                    servicer.GetActiveCalibration,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'vna.VNAService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('vna.VNAService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class VNAService(object):
    """*
    Allows access to the VNA via gRPC.

    Theory of operation:

    To measure the Transmission coefficients, set the
    Frequencies to measure (`SetFreqRange`), the sample-time (`SetSample`)
    and optionally the Setup-Time (`SetSetupTime`). Make sure no errors
    occurred since some parameter-sets might be incompatible
    You can then call the `MeasureTransmission` method to retrieve
    The S-Parameter of the Device under Test.
    """

    @staticmethod
    def Reset(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,
            '/vna.VNAService/Reset',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def IsBusy(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,
            '/vna.VNAService/IsBusy',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetFreqSpec(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,
            '/vna.VNAService/SetFreqSpec',
            vna__pb2.FrequencySpec.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetFreqSpec(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,
            '/vna.VNAService/GetFreqSpec',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            vna__pb2.FrequencySpec.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetAverages(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,
            '/vna.VNAService/SetAverages',
            google_dot_protobuf_dot_wrappers__pb2.UInt32Value.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAverages(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,
            '/vna.VNAService/GetAverages',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.UInt32Value.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetMultiplier(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,
            '/vna.VNAService/SetMultiplier',
            google_dot_protobuf_dot_wrappers__pb2.DoubleValue.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetMultiplier(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,
            '/vna.VNAService/GetMultiplier',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.DoubleValue.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetSetupTime(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,
            '/vna.VNAService/SetSetupTime',
            google_dot_protobuf_dot_wrappers__pb2.DoubleValue.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSetupTime(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,
            '/vna.VNAService/GetSetupTime',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.DoubleValue.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Sweep(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,
            '/vna.VNAService/Sweep',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            vna__pb2.Transmission.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetPhaseCorr(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,
            '/vna.VNAService/SetPhaseCorr',
            google_dot_protobuf_dot_wrappers__pb2.DoubleValue.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetPhaseCorr(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,
            '/vna.VNAService/GetPhaseCorr',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.DoubleValue.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetResonators(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,
            '/vna.VNAService/GetResonators',
            vna__pb2.ResonatorOptions.SerializeToString,
            vna__pb2.DetectedResonators.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetPhaseUnit(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,
            '/vna.VNAService/SetPhaseUnit',
            vna__pb2.PhaseUnit_.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetMagnitudeUnit(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,
            '/vna.VNAService/SetMagnitudeUnit',
            vna__pb2.MagnitudeUnit_.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetUnwrapPhase(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,
            '/vna.VNAService/SetUnwrapPhase',
            google_dot_protobuf_dot_wrappers__pb2.BoolValue.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetTransmissionOptions(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,
            '/vna.VNAService/SetTransmissionOptions',
            vna__pb2.TransmissionOptions.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetTransmissionOptions(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,
            '/vna.VNAService/GetTransmissionOptions',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            vna__pb2.TransmissionOptions.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Calibrate(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,
            '/vna.VNAService/Calibrate',
            vna__pb2.CalibrationOptios.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RemoveCalibration(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,
            '/vna.VNAService/RemoveCalibration',
            google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.BoolValue.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetAvailableCalibrations(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,
            '/vna.VNAService/GetAvailableCalibrations',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            vna__pb2.AvailableCalibrations.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DownloadCalibration(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,
            '/vna.VNAService/DownloadCalibration',
            google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
            vna__pb2.CalibrationData.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def UploadCalibration(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,
            '/vna.VNAService/UploadCalibration',
            vna__pb2.CalibrationData.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SetActiveCalibration(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,
            '/vna.VNAService/SetActiveCalibration',
            google_dot_protobuf_dot_wrappers__pb2.StringValue.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetActiveCalibration(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,
            '/vna.VNAService/GetActiveCalibration',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            google_dot_protobuf_dot_wrappers__pb2.StringValue.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
