Ejemplo n.º 1
0
 def unregisterService(self, caller_id, service, service_api):
     """
     Forked from ROSMasterHandler.
     Unregister the caller as a provider of the specified service.
     @param caller_id str: ROS caller id
     @type  caller_id: str
     @param service: Fully-qualified name of service
     @type  service: str
     @param service_api: API URI of service to unregister. Unregistration will only occur if current
        registration matches.
     @type  service_api: str
     @return: (code, message, numUnregistered). Number of unregistrations (either 0 or 1).
        If this is zero it means that the caller was not registered as a service provider.
        The call still succeeds as the intended final state is reached.
     @rtype: (int, str, int)
     """
     cfg = swcfg.services.get_config(service)
     if not cfg.is_local_only():
         self._unreg_remote_service(caller_id, service, service_api)
     if not cfg.is_remote_only():
         self._unreg_local_service(caller_id, service, service_api)
     return ResponseFactory.service_unreg(caller_id, service).pack()
Ejemplo n.º 2
0
 def unregisterService(self, caller_id, service, service_api):
     """
     Forked from ROSMasterHandler.
     Unregister the caller as a provider of the specified service.
     @param caller_id str: ROS caller id
     @type  caller_id: str
     @param service: Fully-qualified name of service
     @type  service: str
     @param service_api: API URI of service to unregister. Unregistration will only occur if current
        registration matches.
     @type  service_api: str
     @return: (code, message, numUnregistered). Number of unregistrations (either 0 or 1).
        If this is zero it means that the caller was not registered as a service provider.
        The call still succeeds as the intended final state is reached.
     @rtype: (int, str, int)
     """
     cfg = swcfg.services.get_config(service)
     if not cfg.is_local_only():
         self._unreg_remote_service(caller_id, service, service_api)
     if not cfg.is_remote_only():
         self._unreg_local_service(caller_id, service, service_api)
     return ResponseFactory.service_unreg(caller_id, service).pack()
Ejemplo n.º 3
0
 def unregCell(self, service, service_uri, daemon_uri):
     with self.record_lock:
         self.records[service].remove(service_uri, daemon_uri)
     return ResponseFactory.service_unreg(daemon_uri, service).pack()