Package rocon_gateway :: Module interactive_interface :: Class InteractiveInterface
[frames] | no frames]

Class InteractiveInterface

source code

object --+
         |
        InteractiveInterface
Known Subclasses:

Parent interface for flip and pull interfaces.

Instance Methods
 
__init__(self, default_rule_blacklist, default_rules, all_targets)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
add_rule(self, remote_rule)
Add a remote rule to the watchlist for monitoring.
source code
 
remove_rule(self, remote_rule)
Remove a rule.
source code
 
add_all(self, gateway, blacklist)
Instead of watching/acting on specific rules, take action on everything except for rules in a blacklist.
source code
 
remove_all(self, gateway)
Remove the add all rule for the specified gateway.
source code
 
is_matched(self, rule, rule_name, name, node) source code
 
getLocalRegistrations(self)
Gets the local registrations for GatewayInfo consumption (flipped ins/pulls).
source code
 
getWatchlist(self)
Gets the watchlist for GatewayInfo consumption.
source code
 
find_registration_match(self, remote_gateway, remote_name, remote_node, connection_type)
Check to see if a registration exists.
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 

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

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

add_rule(self, remote_rule)

source code 

Add a remote rule to the watchlist for monitoring.

Parameters:
  • 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

remove_rule(self, remote_rule)

source code 

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.

Parameters:
  • remote_rule - the remote rule to remove from the watchlist. @type gateway_msgs.msg.RemoteRule

    @return Rules remaining in the watchlist @rtype RemoteRule[]

add_all(self, gateway, blacklist)

source code 

Instead of watching/acting on specific rules, take action on everything except for rules in a blacklist.

Parameters:
  • gateway - target remote gateway string id @type str
  • 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

remove_all(self, gateway)

source code 

Remove the add all rule for the specified gateway.

Parameters:
  • gateway - target remote gateway string id @type str

getLocalRegistrations(self)

source code 

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[]

getWatchlist(self)

source code 

Gets the watchlist for GatewayInfo consumption.

@return the list of flip rules that are being watched @rtype gateway_msgs.msg.RemoteRule[]

find_registration_match(self, remote_gateway, remote_name, remote_node, connection_type)

source code 

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.

Parameters:
  • remote_gateway - string remote gateway id @type string
  • remote_name, remote_node, connection_type - remote connection details @type string

    @return matching registration or none @rtype utils.Registration