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

import grpc

import tekhsi._tek_highspeed_server_pb2 as TekHighspeedServer__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Connect = channel.unary_unary(
            "/Tekscope.Connect/Connect",
            request_serializer=TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.ConnectReply.FromString,
        )
        self.Disconnect = channel.unary_unary(
            "/Tekscope.Connect/Disconnect",
            request_serializer=TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.ConnectReply.FromString,
        )
        self.RequestNewSequence = channel.unary_unary(
            "/Tekscope.Connect/RequestNewSequence",
            request_serializer=TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.ConnectReply.FromString,
        )
        self.RequestAvailableNames = channel.unary_unary(
            "/Tekscope.Connect/RequestAvailableNames",
            request_serializer=TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.AvailableNamesReply.FromString,
        )
        self.WaitForDataAccess = channel.unary_unary(
            "/Tekscope.Connect/WaitForDataAccess",
            request_serializer=TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.ConnectReply.FromString,
        )
        self.FinishedWithDataAccess = channel.unary_unary(
            "/Tekscope.Connect/FinishedWithDataAccess",
            request_serializer=TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.ConnectReply.FromString,
        )


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

    def Connect(self, request, context):
        """Connect to instrument."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Disconnect(self, request, context):
        """Disconnect from instrument."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def RequestNewSequence(self, request, context):
        """Force new sequence.

        This requests access to data.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def RequestAvailableNames(self, request, context):
        """Returns a list of names of available data."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def WaitForDataAccess(self, request, context):
        """Waits for client access to data.

        When it returns you may access NormalizedData or NativeData.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def FinishedWithDataAccess(self, request, context):
        """Releases access to data (must occur after WaitForDataAccess)"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_ConnectServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Connect": grpc.unary_unary_rpc_method_handler(
            servicer.Connect,
            request_deserializer=TekHighspeedServer__pb2.ConnectRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.ConnectReply.SerializeToString,
        ),
        "Disconnect": grpc.unary_unary_rpc_method_handler(
            servicer.Disconnect,
            request_deserializer=TekHighspeedServer__pb2.ConnectRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.ConnectReply.SerializeToString,
        ),
        "RequestNewSequence": grpc.unary_unary_rpc_method_handler(
            servicer.RequestNewSequence,
            request_deserializer=TekHighspeedServer__pb2.ConnectRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.ConnectReply.SerializeToString,
        ),
        "RequestAvailableNames": grpc.unary_unary_rpc_method_handler(
            servicer.RequestAvailableNames,
            request_deserializer=TekHighspeedServer__pb2.ConnectRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.AvailableNamesReply.SerializeToString,
        ),
        "WaitForDataAccess": grpc.unary_unary_rpc_method_handler(
            servicer.WaitForDataAccess,
            request_deserializer=TekHighspeedServer__pb2.ConnectRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.ConnectReply.SerializeToString,
        ),
        "FinishedWithDataAccess": grpc.unary_unary_rpc_method_handler(
            servicer.FinishedWithDataAccess,
            request_deserializer=TekHighspeedServer__pb2.ConnectRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.ConnectReply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler("Tekscope.Connect", rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Connect(
        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,
            "/Tekscope.Connect/Connect",
            TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            TekHighspeedServer__pb2.ConnectReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def Disconnect(
        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,
            "/Tekscope.Connect/Disconnect",
            TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            TekHighspeedServer__pb2.ConnectReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RequestNewSequence(
        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,
            "/Tekscope.Connect/RequestNewSequence",
            TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            TekHighspeedServer__pb2.ConnectReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def RequestAvailableNames(
        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,
            "/Tekscope.Connect/RequestAvailableNames",
            TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            TekHighspeedServer__pb2.AvailableNamesReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def WaitForDataAccess(
        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,
            "/Tekscope.Connect/WaitForDataAccess",
            TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            TekHighspeedServer__pb2.ConnectReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def FinishedWithDataAccess(
        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,
            "/Tekscope.Connect/FinishedWithDataAccess",
            TekHighspeedServer__pb2.ConnectRequest.SerializeToString,
            TekHighspeedServer__pb2.ConnectReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )


class NormalizedDataStub(object):
    """Normalized Waveform (this is fully defined)"""

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetWaveform = channel.unary_stream(
            "/Tekscope.NormalizedData/GetWaveform",
            request_serializer=TekHighspeedServer__pb2.WaveformRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.NormalizedReply.FromString,
        )
        self.GetHeader = channel.unary_unary(
            "/Tekscope.NormalizedData/GetHeader",
            request_serializer=TekHighspeedServer__pb2.WaveformRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.NormalizedReply.FromString,
        )


class NormalizedDataServicer(object):
    """Normalized Waveform (this is fully defined)"""

    def GetWaveform(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 GetHeader(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_NormalizedDataServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetWaveform": grpc.unary_stream_rpc_method_handler(
            servicer.GetWaveform,
            request_deserializer=TekHighspeedServer__pb2.WaveformRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.NormalizedReply.SerializeToString,
        ),
        "GetHeader": grpc.unary_unary_rpc_method_handler(
            servicer.GetHeader,
            request_deserializer=TekHighspeedServer__pb2.WaveformRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.NormalizedReply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "Tekscope.NormalizedData", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class NormalizedData(object):
    """Normalized Waveform (this is fully defined)"""

    @staticmethod
    def GetWaveform(
        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,
            "/Tekscope.NormalizedData/GetWaveform",
            TekHighspeedServer__pb2.WaveformRequest.SerializeToString,
            TekHighspeedServer__pb2.NormalizedReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetHeader(
        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,
            "/Tekscope.NormalizedData/GetHeader",
            TekHighspeedServer__pb2.WaveformRequest.SerializeToString,
            TekHighspeedServer__pb2.NormalizedReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )


class NativeDataStub(object):
    """Returns internal data (which is smaller)
    However it comes in a byte stream that must be interpreted
    by the client based on the header definition.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetWaveform = channel.unary_stream(
            "/Tekscope.NativeData/GetWaveform",
            request_serializer=TekHighspeedServer__pb2.WaveformRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.RawReply.FromString,
        )
        self.GetHeader = channel.unary_unary(
            "/Tekscope.NativeData/GetHeader",
            request_serializer=TekHighspeedServer__pb2.WaveformRequest.SerializeToString,
            response_deserializer=TekHighspeedServer__pb2.RawReply.FromString,
        )


class NativeDataServicer(object):
    """Returns internal data (which is smaller)
    However it comes in a byte stream that must be interpreted
    by the client based on the header definition.
    """

    def GetWaveform(self, request, context):
        """Query Waveform Samples."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def GetHeader(self, request, context):
        """Query Header information (needed to interpret samples)"""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_NativeDataServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "GetWaveform": grpc.unary_stream_rpc_method_handler(
            servicer.GetWaveform,
            request_deserializer=TekHighspeedServer__pb2.WaveformRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.RawReply.SerializeToString,
        ),
        "GetHeader": grpc.unary_unary_rpc_method_handler(
            servicer.GetHeader,
            request_deserializer=TekHighspeedServer__pb2.WaveformRequest.FromString,
            response_serializer=TekHighspeedServer__pb2.RawReply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "Tekscope.NativeData", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class NativeData(object):
    """Returns internal data (which is smaller)
    However it comes in a byte stream that must be interpreted
    by the client based on the header definition.
    """

    @staticmethod
    def GetWaveform(
        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,
            "/Tekscope.NativeData/GetWaveform",
            TekHighspeedServer__pb2.WaveformRequest.SerializeToString,
            TekHighspeedServer__pb2.RawReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def GetHeader(
        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,
            "/Tekscope.NativeData/GetHeader",
            TekHighspeedServer__pb2.WaveformRequest.SerializeToString,
            TekHighspeedServer__pb2.RawReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
