Package rocon_gateway :: Module pulled_interface :: Class PulledInterface
[frames] | no frames]

Class PulledInterface

source code

                                object --+    
                                         |    
interactive_interface.InteractiveInterface --+
                                             |
                                            PulledInterface

The pulled interface is the set of rules (pubs/subs/services/actions) and rules controlling pulls from other gateways.

Instance Methods
 
__init__(self, default_rule_blacklist, default_rules, all_targets)
Initialises the pulled interface.
source code
 
update(self, remote_connections, unique_name)
Computes a new pulled interface from the incoming connections list and returns two dictionaries - removed and newly added pulls so the watcher thread can take appropriate action ((un)registrations).
source code
 
list_remote_gateway_names(self)
Collects all gateways that it should watch for (i.e.
source code
 
add_all(self, gateway, blacklist)
Instead of watching/acting on specific rules, take action on everything except for rules in a blacklist. (Inherited from rocon_gateway.interactive_interface.InteractiveInterface)
source code
 
add_rule(self, remote_rule)
Add a remote rule to the watchlist for monitoring. (Inherited from rocon_gateway.interactive_interface.InteractiveInterface)
source code
 
find_registration_match(self, remote_gateway, remote_name, remote_node, connection_type)
Check to see if a registration exists. (Inherited from rocon_gateway.interactive_interface.InteractiveInterface)
source code
 
getLocalRegistrations(self)
Gets the local registrations for GatewayInfo consumption (flipped ins/pulls). (Inherited from rocon_gateway.interactive_interface.InteractiveInterface)
source code
 
getWatchlist(self)
Gets the watchlist for GatewayInfo consumption. (Inherited from rocon_gateway.interactive_interface.InteractiveInterface)
source code
 
is_matched(self, rule, rule_name, name, node) (Inherited from rocon_gateway.interactive_interface.InteractiveInterface) source code
 
remove_all(self, gateway)
Remove the add all rule for the specified gateway. (Inherited from rocon_gateway.interactive_interface.InteractiveInterface)
source code
 
remove_rule(self, remote_rule)
Remove a rule. (Inherited from rocon_gateway.interactive_interface.InteractiveInterface)
source code

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

Properties

Inherited from object: __class__

Method Details

__init__(self, default_rule_blacklist, default_rules, all_targets)
(Constructor)

source code 

Initialises the pulled interface.

Parameters:
  • default_rule_blacklist - used when in flip all mode @type dictionary of gateway
  • default_rules - static rules to pull on startup @type gateway_msgs.msg.RemoteRule[]
  • all_targets - static pull all targets to pull to on startup @type string[]
Overrides: object.__init__

update(self, remote_connections, unique_name)

source code 

Computes a new pulled interface from the incoming connections list
 and returns two dictionaries -
removed and newly added pulls so the watcher thread can take
appropriate action ((un)registrations).

This is run in the watcher thread (warning: take care - other
additions come from ros service calls in different threads!)

@param remote_gateway_hub_index : full gateway-hub database index to parse
@type gateway hash names keyed into a dic with a list of their hubs

list_remote_gateway_names(self)

source code 

Collects all gateways that it should watch for (i.e. those currently handled by existing registrations).

@return set of gateway string ids @rtype set of string