def unadvertise(self, connection): ''' Removes a topic, service or action from the public interface. @param connection: representation of a connection (topic, service, action) @type connection: str @raise .exceptions.ConnectionTypeError: if connectionarg is invalid. ''' key = hub_api.create_rocon_gateway_key(self._unique_gateway_name, 'advertisements') msg_str = utils.serialize_connection(connection) self._redis_server.srem(key, msg_str)
def advertise(self, connection): ''' Places a topic, service or action on the public interface. On the redis server, this representation will always be: - topic : a triple { name, type, xmlrpc node uri } - service : a triple { name, rosrpc uri, xmlrpc node uri } - action : ??? @param connection: representation of a connection (topic, service, action) @type connection: str @raise .exceptions.ConnectionTypeError: if connection arg is invalid. ''' key = hub_api.create_rocon_gateway_key(self._unique_gateway_name, 'advertisements') msg_str = utils.serialize_connection(connection) self._redis_server.sadd(key, msg_str)