Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
bosdyn-api / api / image_service_pb2_grpc.py
Size: Mime:
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from bosdyn.api import image_pb2 as bosdyn_dot_api_dot_image__pb2


class ImageServiceStub(object):
    """An Image service provides access to one or more images, for example from cameras. It
    supports querying for the list of available images provided by the service and then
    supports requesting a latest given image by source name.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.ListImageSources = channel.unary_unary(
                '/bosdyn.api.ImageService/ListImageSources',
                request_serializer=bosdyn_dot_api_dot_image__pb2.ListImageSourcesRequest.SerializeToString,
                response_deserializer=bosdyn_dot_api_dot_image__pb2.ListImageSourcesResponse.FromString,
                )
        self.GetImage = channel.unary_unary(
                '/bosdyn.api.ImageService/GetImage',
                request_serializer=bosdyn_dot_api_dot_image__pb2.GetImageRequest.SerializeToString,
                response_deserializer=bosdyn_dot_api_dot_image__pb2.GetImageResponse.FromString,
                )


class ImageServiceServicer(object):
    """An Image service provides access to one or more images, for example from cameras. It
    supports querying for the list of available images provided by the service and then
    supports requesting a latest given image by source name.
    """

    def ListImageSources(self, request, context):
        """Obtain the list of ImageSources for this given service.
        Note that there may be multiple ImageServices running, each with their own set of sources
        The name field keys access to individual images when calling GetImage.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetImage(self, request, context):
        """Request an image by name, with optional parameters for requesting image quality level.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ImageServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ListImageSources': grpc.unary_unary_rpc_method_handler(
                    servicer.ListImageSources,
                    request_deserializer=bosdyn_dot_api_dot_image__pb2.ListImageSourcesRequest.FromString,
                    response_serializer=bosdyn_dot_api_dot_image__pb2.ListImageSourcesResponse.SerializeToString,
            ),
            'GetImage': grpc.unary_unary_rpc_method_handler(
                    servicer.GetImage,
                    request_deserializer=bosdyn_dot_api_dot_image__pb2.GetImageRequest.FromString,
                    response_serializer=bosdyn_dot_api_dot_image__pb2.GetImageResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bosdyn.api.ImageService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ImageService(object):
    """An Image service provides access to one or more images, for example from cameras. It
    supports querying for the list of available images provided by the service and then
    supports requesting a latest given image by source name.
    """

    @staticmethod
    def ListImageSources(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, '/bosdyn.api.ImageService/ListImageSources',
            bosdyn_dot_api_dot_image__pb2.ListImageSourcesRequest.SerializeToString,
            bosdyn_dot_api_dot_image__pb2.ListImageSourcesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetImage(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, '/bosdyn.api.ImageService/GetImage',
            bosdyn_dot_api_dot_image__pb2.GetImageRequest.SerializeToString,
            bosdyn_dot_api_dot_image__pb2.GetImageResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)