Pulled Interface. More...
Public Member Functions | |
def | __init__ (self, default_rule_blacklist, default_rules, all_targets) |
def | list_remote_gateway_names (self) |
Pulled Interface Specific Methods. More... | |
def | update (self, remote_connections, unique_name) |
Public Member Functions inherited from rocon_gateway.interactive_interface.InteractiveInterface | |
def | __init__ (self, default_rule_blacklist, default_rules, all_targets) |
def | add_all (self, gateway, blacklist) |
def | add_rule (self, remote_rule) |
Rules. More... | |
def | find_registration_match (self, remote_gateway, remote_name, remote_node, connection_type) |
Utilities. More... | |
def | getLocalRegistrations (self) |
def | getWatchlist (self) |
def | is_matched (self, rule, rule_name, name, node) |
Accessors for Gateway Info. More... | |
def | remove_all (self, gateway) |
def | remove_rule (self, remote_rule) |
Public Attributes | |
pull_all | |
pulled | |
unpull_all | |
Public Attributes inherited from rocon_gateway.interactive_interface.InteractiveInterface | |
active | |
registrations | |
watchlist | |
Private Member Functions | |
def | _generate_pulls (self, connection_type, name, node, gateway, unique_name) |
Utility Methods. More... | |
Pulled Interface.
The pulled interface is the set of rules (pubs/subs/services/actions) and rules controlling pulls from other gateways.
Definition at line 23 of file pulled_interface.py.
def rocon_gateway.pulled_interface.PulledInterface.__init__ | ( | self, | |
default_rule_blacklist, | |||
default_rules, | |||
all_targets | |||
) |
Initialises the pulled interface. @param default_rule_blacklist : used when in flip all mode @type dictionary of gateway @param default_rules : static rules to pull on startup @type gateway_msgs.msg.RemoteRule[] @param all_targets : static pull all targets to pull to on startup @type string[]
Definition at line 31 of file pulled_interface.py.
|
private |
Utility Methods.
Checks if a local rule (obtained from master.get_system_state) is a suitable association with any of the rules or patterns. This can return multiple matches, since the same local rule properties can be multiply pulled to different remote gateways. Used in the update() call above that is run in the watcher thread. Note, don't need to lock here as the update() function takes care of it. @param connection_type : rule type @type str : string constant from gateway_msgs.Rule @param name : fully qualified topic, service or action name @type str @param node : ros node name (coming from master.get_system_state) @type str @param gateway : remote gateway hash name. @type str @return all the pull rules that match this local rule @return list of RemoteRule objects updated with node names from self.watchlist
Definition at line 110 of file pulled_interface.py.
def rocon_gateway.pulled_interface.PulledInterface.list_remote_gateway_names | ( | self | ) |
Pulled Interface Specific Methods.
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
Definition at line 171 of file pulled_interface.py.
def rocon_gateway.pulled_interface.PulledInterface.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). 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
Definition at line 49 of file pulled_interface.py.
rocon_gateway.pulled_interface.PulledInterface.pull_all |
Definition at line 46 of file pulled_interface.py.
rocon_gateway.pulled_interface.PulledInterface.pulled |
Definition at line 45 of file pulled_interface.py.
rocon_gateway.pulled_interface.PulledInterface.unpull_all |
Definition at line 47 of file pulled_interface.py.