Package rocon_gateway :: Module gateway_hub :: Class RedisListenerThread
[frames] | no frames]

Class RedisListenerThread

source code

        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        RedisListenerThread

Tunes into the redis channels that have been subscribed to and calls the apropriate callbacks.

Instance Methods
 
__init__(self, redis_pubsub_server, remote_gateway_request_callbacks, hub_connection_lost_hook)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
run(self)
Used as a callback for incoming requests on redis pubsub channels.
source code

Inherited from threading.Thread: __repr__, daemon, getName, ident, isAlive, isDaemon, is_alive, join, name, setDaemon, setName, start

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, redis_pubsub_server, remote_gateway_request_callbacks, hub_connection_lost_hook)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

run(self)

source code 

Used as a callback for incoming requests on redis pubsub channels.

The received argument is a list of strings for 'flip':

  • [0] - command : this one is 'flip'
  • [1] - remote_gateway : the name of the gateway that is flipping to us
  • [2] - remote_name
  • [3] - remote_node
  • [4] - type : one of ConnectionType.PUBLISHER etc
  • [5] - type_info : a ros format type (e.g. std_msgs/String or service api)
  • [6] - xmlrpc_uri : the xmlrpc node uri

The command 'unflip' is the same, not including args 5 and 6.

Overrides: threading.Thread.run