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 / fault_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 service_fault_pb2 as bosdyn_dot_api_dot_service__fault__pb2


class FaultServiceStub(object):
    """The service fault service enables modification of the robot state ServiceFaultState.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.TriggerServiceFault = channel.unary_unary(
                '/bosdyn.api.FaultService/TriggerServiceFault',
                request_serializer=bosdyn_dot_api_dot_service__fault__pb2.TriggerServiceFaultRequest.SerializeToString,
                response_deserializer=bosdyn_dot_api_dot_service__fault__pb2.TriggerServiceFaultResponse.FromString,
                )
        self.ClearServiceFault = channel.unary_unary(
                '/bosdyn.api.FaultService/ClearServiceFault',
                request_serializer=bosdyn_dot_api_dot_service__fault__pb2.ClearServiceFaultRequest.SerializeToString,
                response_deserializer=bosdyn_dot_api_dot_service__fault__pb2.ClearServiceFaultResponse.FromString,
                )


class FaultServiceServicer(object):
    """The service fault service enables modification of the robot state ServiceFaultState.
    """

    def TriggerServiceFault(self, request, context):
        """Sends a ServiceFault to be reporting in robot state.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ClearServiceFault(self, request, context):
        """Clears an active ServiceFault from robot state.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_FaultServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'TriggerServiceFault': grpc.unary_unary_rpc_method_handler(
                    servicer.TriggerServiceFault,
                    request_deserializer=bosdyn_dot_api_dot_service__fault__pb2.TriggerServiceFaultRequest.FromString,
                    response_serializer=bosdyn_dot_api_dot_service__fault__pb2.TriggerServiceFaultResponse.SerializeToString,
            ),
            'ClearServiceFault': grpc.unary_unary_rpc_method_handler(
                    servicer.ClearServiceFault,
                    request_deserializer=bosdyn_dot_api_dot_service__fault__pb2.ClearServiceFaultRequest.FromString,
                    response_serializer=bosdyn_dot_api_dot_service__fault__pb2.ClearServiceFaultResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'bosdyn.api.FaultService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class FaultService(object):
    """The service fault service enables modification of the robot state ServiceFaultState.
    """

    @staticmethod
    def TriggerServiceFault(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.FaultService/TriggerServiceFault',
            bosdyn_dot_api_dot_service__fault__pb2.TriggerServiceFaultRequest.SerializeToString,
            bosdyn_dot_api_dot_service__fault__pb2.TriggerServiceFaultResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ClearServiceFault(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.FaultService/ClearServiceFault',
            bosdyn_dot_api_dot_service__fault__pb2.ClearServiceFaultRequest.SerializeToString,
            bosdyn_dot_api_dot_service__fault__pb2.ClearServiceFaultResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)