Package rosmaster :: Module registrations :: Class NodeRef

Class NodeRef

source code

object --+
         |
        NodeRef

Container for node registration information. Used in master's self.nodes data structure. This is effectively a reference counter for the node registration information: when the subscriptions and publications are empty the node registration can be deleted.

Instance Methods
 
__init__(self, id, api)
ctor
source code
 
clear(self)
Delete all state from this NodeRef except for the api location
source code
 
is_empty(self)
Returns: True if node has no active registrations
source code
 
add(self, type_, key) source code
 
remove(self, type_, key) 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, id, api)
(Constructor)

source code 

ctor

Parameters:
  • api, str - node XML-RPC API
Overrides: object.__init__

is_empty(self)

source code 
Returns:
True if node has no active registrations