Classes.
More...
|
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) |
|
Classes.
Parent interface for flip and pull interfaces.
Definition at line 24 of file interactive_interface.py.
def rocon_gateway.interactive_interface.InteractiveInterface.__init__ |
( |
|
self, |
|
|
|
default_rule_blacklist, |
|
|
|
default_rules, |
|
|
|
all_targets |
|
) |
| |
@param default_rule_blacklist : used when in flip/pull all mode
@type dictionary of gateway
@param default_rules : static rules to flip/pull on startup
@type gateway_msgs.msg.RemoteRule[]
@param all_targets : static flip/pull all targets to flip/pull to on startup
@type string[]
Definition at line 30 of file interactive_interface.py.
def rocon_gateway.interactive_interface.InteractiveInterface._is_in_blacklist |
( |
|
self, |
|
|
|
gateway, |
|
|
|
connection_type, |
|
|
|
name, |
|
|
|
node |
|
) |
| |
|
private |
Check if a particular connection is in the blacklist. Use this to
filter connections from the flip_all command.
@todo move to utils - should be shared with the public interface.
Definition at line 287 of file interactive_interface.py.
def rocon_gateway.interactive_interface.InteractiveInterface.add_all |
( |
|
self, |
|
|
|
gateway, |
|
|
|
blacklist |
|
) |
| |
Instead of watching/acting on specific rules, take action
on everything except for rules in a blacklist.
@param gateway : target remote gateway string id
@type str
@param blacklist : do not act on rules matching these patterns
@type gateway_msgs.msg.Rule[]
@return success or failure depending on if it ahs already been set or not
@rtype Bool
Definition at line 137 of file interactive_interface.py.
def rocon_gateway.interactive_interface.InteractiveInterface.add_rule |
( |
|
self, |
|
|
|
remote_rule |
|
) |
| |
Rules.
Add a remote rule to the watchlist for monitoring.
@param remote_rule : the remote rule to add to the watchlist
@type gateway_msgs.msg.RemoteRule
@return the remote rule, or None if the rule already exists.
@rtype gateway_msgs.msg.RemoteRule || None
Definition at line 73 of file interactive_interface.py.
def rocon_gateway.interactive_interface.InteractiveInterface.find_registration_match |
( |
|
self, |
|
|
|
remote_gateway, |
|
|
|
remote_name, |
|
|
|
remote_node, |
|
|
|
connection_type |
|
) |
| |
Utilities.
Check to see if a registration exists. Note that it doesn't use the
local node name in the check. We will get things like unflip requests that
don't have this variable set (that gets autogenerated when registering
the flip), but we need to find the matching registration.
We then return the registration that matches.
@param remote_gateway : string remote gateway id
@type string
@param remote_name, remote_node, connection_type : remote connection details
@type string
@return matching registration or none
@rtype utils.Registration
Definition at line 255 of file interactive_interface.py.
def rocon_gateway.interactive_interface.InteractiveInterface.getLocalRegistrations |
( |
|
self | ) |
|
Gets the local registrations for GatewayInfo consumption (flipped ins/pulls).
We don't need to show the service and node uri's here.
Basic operation : convert Registration -> RemoteRule for each registration
@return the list of registrations corresponding to remote interactions
@rtype RemoteRule[]
Definition at line 213 of file interactive_interface.py.
def rocon_gateway.interactive_interface.InteractiveInterface.getWatchlist |
( |
|
self | ) |
|
Gets the watchlist for GatewayInfo consumption.
@return the list of flip rules that are being watched
@rtype gateway_msgs.msg.RemoteRule[]
Definition at line 235 of file interactive_interface.py.
def rocon_gateway.interactive_interface.InteractiveInterface.is_matched |
( |
|
self, |
|
|
|
rule, |
|
|
|
rule_name, |
|
|
|
name, |
|
|
|
node |
|
) |
| |
def rocon_gateway.interactive_interface.InteractiveInterface.remove_all |
( |
|
self, |
|
|
|
gateway |
|
) |
| |
Remove the add all rule for the specified gateway.
@param gateway : target remote gateway string id
@type str
Definition at line 174 of file interactive_interface.py.
def rocon_gateway.interactive_interface.InteractiveInterface.remove_rule |
( |
|
self, |
|
|
|
remote_rule |
|
) |
| |
Remove a rule. Be a bit careful looking for a rule to remove, depending
on the node name, which can be set (exact rule/node name match) or
None in which case all nodes of that kind of flip will match.
Handle the remapping appropriately.
@param remote_rule : the remote rule to remove from the watchlist.
@type gateway_msgs.msg.RemoteRule
@return Rules remaining in the watchlist
@rtype RemoteRule[]
Definition at line 100 of file interactive_interface.py.
rocon_gateway.interactive_interface.InteractiveInterface._blacklist |
|
private |
rocon_gateway.interactive_interface.InteractiveInterface._default_blacklist |
|
private |
rocon_gateway.interactive_interface.InteractiveInterface._lock |
|
private |
rocon_gateway.interactive_interface.InteractiveInterface.active |
rocon_gateway.interactive_interface.InteractiveInterface.registrations |
rocon_gateway.interactive_interface.InteractiveInterface.watchlist |
The documentation for this class was generated from the following file: