Package rospy :: Package impl :: Module paramserver :: Class ParamServerCache

Class ParamServerCache

source code

object --+
         |
        ParamServerCache

Cache of values on the parameter server. Implementation is just a thread-safe dictionary.

Instance Methods
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
delete(self, key) source code
 
set_notifier(self, notifier)
Notifier implements any parameter subscription logic.
source code
 
update(self, key, value)
Update the value of the parameter in the cache
source code
 
set(self, key, value)
Set the value of the parameter in the cache.
source code
 
get(self, key)
Returns: Current value for parameter
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)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

set_notifier(self, notifier)

source code 

Notifier implements any parameter subscription logic. The notifier should be a function that takes in a key and value that represents a parameter update. Notifier is called under lock and thus must not implement any lengthy computation.

update(self, key, value)

source code 

Update the value of the parameter in the cache

Parameters:
  • key (str) - parameter key
  • value (str) - parameter value

set(self, key, value)

source code 

Set the value of the parameter in the cache. This is a prerequisite of calling update().

Parameters:
  • key (str) - parameter key
  • value (str) - parameter value

get(self, key)

source code 
Parameters:
  • key (str) - parameter key
Returns:
Current value for parameter