class documentation

class ParamDictionary(object):

Constructor: ParamDictionary(reg_manager)

View In Hierarchy

Undocumented

Method __init__ ctor. @param subscribers: parameter subscribers @type subscribers: Registrations
Method delete_param Delete the parameter in the parameter dictionary. @param key str: parameter key @param notify_task fn(updates): function to call with subscriber updates. updates is of the form [(subscribers, param_key, param_value)*]...
Method get_param Get the parameter in the parameter dictionary.
Method get_param_names Get list of all parameter names stored on this server.
Method has_param Test for parameter existence
Method search_param Search for matching parameter key for search param key. Search for key starts at ns and proceeds upwards to the root. As such, search_param should only be called with a relative parameter name.
Method set_param Set the parameter in the parameter dictionary.
Method subscribe_param @param key: parameter key @type key: str @param registration_args: additional args to pass to subscribers.register. First parameter is always the parameter key. @type registration_args: tuple
Method unsubscribe_param @param key str: parameter key @type key: str @param unregistration_args: additional args to pass to subscribers.unregister. i.e. unregister will be called with (key, *unregistration_args) @type unregistration_args: tuple @return: return value of subscribers...
Instance Variable lock Undocumented
Instance Variable parameters Undocumented
Instance Variable reg_manager Undocumented
def __init__(self, reg_manager):

ctor. @param subscribers: parameter subscribers @type subscribers: Registrations

def delete_param(self, key, notify_task=None):

Delete the parameter in the parameter dictionary. @param key str: parameter key @param notify_task fn(updates): function to call with subscriber updates. updates is of the form [(subscribers, param_key, param_value)*]. The empty dictionary represents an unset parameter.

def get_param(self, key):

Get the parameter in the parameter dictionary.

@param key: parameter key @type key: str @return: parameter value

def get_param_names(self):

Get list of all parameter names stored on this server.

@return: [code, statusMessage, parameterNameList] @rtype: [int, str, [str]]

def has_param(self, key):

Test for parameter existence

@param key: parameter key @type key: str @return: True if parameter set, False otherwise @rtype: bool

def search_param(self, ns, key):

Search for matching parameter key for search param key. Search for key starts at ns and proceeds upwards to the root. As such, search_param should only be called with a relative parameter name.

search_param's behavior is to search for the first partial match. For example, imagine that there are two 'robot_description' parameters:

  • /robot_description
  • /robot_description/arm
  • /robot_description/base
  • /pr2/robot_description
  • /pr2/robot_description/base

If I start in the namespace /pr2/foo and search for 'robot_description', search_param will match /pr2/robot_description. If I search for 'robot_description/arm' it will return /pr2/robot_description/arm, even though that parameter does not exist (yet).

@param ns: namespace to begin search from. @type ns: str @param key: Parameter key. @type key: str @return: key of matching parameter or None if no matching parameter. @rtype: str

def set_param(self, key, value, notify_task=None, caller_id=None):

Set the parameter in the parameter dictionary.

@param key: parameter key @type key: str @param value: parameter value @param notify_task: function to call with subscriber updates. updates is of the form [(subscribers, param_key, param_value)*]. The empty dictionary represents an unset parameter. @type notify_task: fn(updates) @param caller_id: the caller id @type caller_id: str

def subscribe_param(self, key, registration_args):

@param key: parameter key @type key: str @param registration_args: additional args to pass to subscribers.register. First parameter is always the parameter key. @type registration_args: tuple

def unsubscribe_param(self, key, unregistration_args):

@param key str: parameter key @type key: str @param unregistration_args: additional args to pass to subscribers.unregister. i.e. unregister will be called with (key, *unregistration_args) @type unregistration_args: tuple @return: return value of subscribers.unregister()

lock =

Undocumented

parameters =

Undocumented

reg_manager =

Undocumented