All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends
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 advertiseAll
def getBlacklist
def getInterface
 List Accessors.
def getWatchlist
def remove_rule
def unadvertiseAll
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 51 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 63 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 269 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 288 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 244 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 100 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 158 of file public_interface.py.

Definition at line 232 of file public_interface.py.

List Accessors.

Definition at line 216 of file public_interface.py.

Definition at line 224 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 119 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 195 of file public_interface.py.

def rocon_gateway.public_interface.PublicInterface.update (   self,
  connections 
)
  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

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

Definition at line 302 of file public_interface.py.


Member Data Documentation

Definition at line 71 of file public_interface.py.

Definition at line 71 of file public_interface.py.

Definition at line 71 of file public_interface.py.

Definition at line 71 of file public_interface.py.

Definition at line 71 of file public_interface.py.

Definition at line 71 of file public_interface.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


rocon_gateway
Author(s): Daniel Stonier, Jihoon Lee,
autogenerated on Tue Jan 15 2013 17:43:24