Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
rocon_gateway.public_interface.PublicInterface Class Reference

Public Interface. More...

List of all members.

Public Member Functions

def __init__
def add_rule
 Public Interfaces.
def advertise_all
def getBlacklist
def getConnections
 List Accessors.
def getInterface
def getWatchlist
def remove_rule
def unadvertise_all
def update

Public Attributes

 advertise_all_enabled
 blacklist
 lock
 public
 watchlist

Private Member Functions

def _allowRule
def _generatePublic
def _matchAgainstRuleList
 Filter.

Private Attributes

 _default_blacklist

Detailed Description

Public Interface.

  The public interface is the set of rules
  (pubs/subs/services/actions) that are exposed and made available for
  freely sharing with a multimaster system.

  It consists of:
   * list of currently available rules to be shared
   * list of rules and filters that will be watched
     and shared if they become available

Definition at line 55 of file public_interface.py.


Constructor & Destructor Documentation

def rocon_gateway.public_interface.PublicInterface.__init__ (   self,
  default_rule_blacklist,
  default_rules 
)
  Initialises the public interface

  @param default_rule_blacklist : connection type keyed dictionary of rules
  @type str keyed dictionary of gateway_msgs.msg.Rule[]

  @param default_rules : connection type keyed dictionary of rules
  @type str keyed dictionary of gateway_msgs.msg.Rule[]

Definition at line 68 of file public_interface.py.


Member Function Documentation

def rocon_gateway.public_interface.PublicInterface._allowRule (   self,
  rule 
) [private]
  Determines whether a given rule should be allowed given the
  status of the current watchlist and blacklist

  @param rule : the given rule/rule to match
  @type Rule
  @return whether rule is allowed
  @rtype bool

Definition at line 289 of file public_interface.py.

  Given a rule, determines if the rule is allowed. If it is
  allowed, then returns the corresponding Rule object

  @param rules : the given rules to match
  @type Rule
  @return The generated Rule if allowed, None if no match
  @rtype Rule || None

Definition at line 308 of file public_interface.py.

def rocon_gateway.public_interface.PublicInterface._matchAgainstRuleList (   self,
  rules,
  rule 
) [private]

Filter.

  Match a given rule/rule against a given rule list

  @param rules : the rules against which to match
  @type dict of list of Rule objects
  @param rule : the given rule/rule to match
  @type Rule
  @return the list of rules matched, None if no rules found
  @rtype list of Rules || None

Definition at line 264 of file public_interface.py.

Public Interfaces.

Watch for a new public rule, as described for by the incoming message.

@param rule : a rule msg from the advertise call
@type Rule

@return the rule if added, or None if the rule exists already
@rtype Rule || None

Definition at line 105 of file public_interface.py.

  Allow all rules apart from the ones in the provided blacklist +
  default blacklist

  @param blacklist : list of Rule objects
  @type list : list of Rule objects

  @return failure if already advertising all, success otherwise
  @rtype bool

Definition at line 163 of file public_interface.py.

Definition at line 252 of file public_interface.py.

List Accessors.

  List of all rules with connection information that is being published.

  @return dictionary of utils.Connections keyed by type.

Definition at line 222 of file public_interface.py.

  List of all rules currently being advertised.

  @return list of all connections posted on hubs
  @rtype list of gateway_msgs.msg.Rule

Definition at line 230 of file public_interface.py.

Definition at line 244 of file public_interface.py.

Attempt to remove a watchlist rule from the public interface. 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 advertisement will match.

@param rule : a rule to unadvertise
@type Rule

@return the list of rules removed
@rtype Rule[]

Definition at line 124 of file public_interface.py.

  Disallow the allow all mode, if enabled. If allow all mode is not
  enabled, remove everything from the public interface

Definition at line 201 of file public_interface.py.

def rocon_gateway.public_interface.PublicInterface.update (   self,
  connections,
  generate_advertisement_connection_details 
)
  Checks a list of rules and determines which ones should be
  added/removed to the public interface. Modifies the public interface
  accordingly, and returns the list of rules to the gateway for
  hub operations

  @param rules: the list of rules available locally
  @type dict of lists of Rule objects

  @param generate_advertisement_connection_details : function from LocalMaster
  that generates Connection.type_info and Connection.xmlrpc_uri
  @type method (see LocalMaster.generate_advertisement_connection_details)

  @return: new public connections, as well as connections to be removed
  @rtype: utils.Connection[], utils.Connection[]

Definition at line 322 of file public_interface.py.


Member Data Documentation

Definition at line 76 of file public_interface.py.

Definition at line 76 of file public_interface.py.

Definition at line 76 of file public_interface.py.

Definition at line 76 of file public_interface.py.

Definition at line 76 of file public_interface.py.

Definition at line 76 of file public_interface.py.


The documentation for this class was generated from the following file:


rocon_gateway
Author(s): Daniel Stonier , Jihoon Lee , Piyush Khandelwal
autogenerated on Sat Jun 8 2019 18:48:44