All calls may result in access/modifications to node registrations dictionary, so be careful to guarantee appropriate thread-safeness.
Data structure for storing a set of registrations (e.g. publications, services). The underlying data storage is the same except for services, which have the constraint that only one registration may be active for a given key.
Method | __bool__ |
@return: True if there are registrations |
Method | __contains__ |
Emulate mapping type for has_key() |
Method | __getitem__ |
@param key: registration key (e.g. topic/service/param name) @type key: str @return: (caller_id, caller_api) for registered key, empty list if registration is not valid @rtype: [(str, str),] |
Method | __init__ |
ctor. @param type_: one of [ TOPIC_SUBSCRIPTIONS, TOPIC_PUBLICATIONS, SERVICE, PARAM_SUBSCRIPTIONS ] @type type_: int |
Method | __nonzero__ |
@return: True if there are registrations |
Method | get |
Only valid if self.type != SERVICE. @param key: registration key (e.g. topic/service/param name) @type key: str @return: caller_apis for registered key, empty list if registration is not valid @rtype: [str]... |
Method | get |
Lookup service API URI. NOTE: this should only be valid if type==SERVICE as service Registrations instances are the only ones that track service API URIs. @param service: service name @type service: str @return str: service_api for registered key or None if registration is no longer valid... |
Method | get |
@return: state in getSystemState()-friendly format [ [key, [callerId1...callerIdN]] ... ] @rtype: [str, [str]...] |
Method | has |
@param key: registration key (e.g. topic/service/param name) @type key: str @return: True if key is registered @rtype: bool |
Method | iterkeys |
Iterate over registration keys @return: iterator for registration keys |
Method | register |
Add caller_id into the map as a provider of the specified service (key). caller_id must not have been previously registered with a different caller_api. |
Method | unregister |
Remove caller_id from the map as a provider of the specified service (key). Subroutine for managing provider map data structure, essentially a multimap @param key: registration key (e.g. topic/service/param name) @type key: str @param caller_id: caller_id of provider @type caller_id: str @param caller_api: API URI of provider @type caller_api: str @param service_api: (keyword) ROS service API URI if registering a service @type service_api: str @return: for ease of master integration, directly returns unregister value for higher-level XMLRPC API... |
Method | unregister |
Remove all registrations associated with caller_id @param caller_id: caller_id of provider @type caller_id: str |
Constant | PARAM |
Undocumented |
Constant | SERVICE |
Undocumented |
Constant | TOPIC |
Undocumented |
Constant | TOPIC |
Undocumented |
Instance Variable | map |
Undocumented |
Instance Variable | service |
Undocumented |
Instance Variable | type |
Undocumented |
@param key: registration key (e.g. topic/service/param name) @type key: str @return: (caller_id, caller_api) for registered key, empty list if registration is not valid @rtype: [(str, str),]
ctor. @param type_: one of [ TOPIC_SUBSCRIPTIONS, TOPIC_PUBLICATIONS, SERVICE, PARAM_SUBSCRIPTIONS ] @type type_: int
Only valid if self.type != SERVICE. @param key: registration key (e.g. topic/service/param name) @type key: str @return: caller_apis for registered key, empty list if registration is not valid @rtype: [str]
Lookup service API URI. NOTE: this should only be valid if type==SERVICE as service Registrations instances are the only ones that track service API URIs. @param service: service name @type service: str @return str: service_api for registered key or None if registration is no longer valid. @type: str
@return: state in getSystemState()-friendly format [ [key, [callerId1...callerIdN]] ... ] @rtype: [str, [str]...]
@param key: registration key (e.g. topic/service/param name) @type key: str @return: True if key is registered @rtype: bool
Add caller_id into the map as a provider of the specified service (key). caller_id must not have been previously registered with a different caller_api.
Subroutine for managing provider map data structure (essentially a multimap). @param key: registration key (e.g. topic/service/param name) @type key: str @param caller_id: caller_id of provider @type caller_id: str @param caller_api: API URI of provider @type caller_api: str @param service_api: (keyword) ROS service API URI if registering a service @type service_api: str
Remove caller_id from the map as a provider of the specified service (key). Subroutine for managing provider map data structure, essentially a multimap @param key: registration key (e.g. topic/service/param name) @type key: str @param caller_id: caller_id of provider @type caller_id: str @param caller_api: API URI of provider @type caller_api: str @param service_api: (keyword) ROS service API URI if registering a service @type service_api: str @return: for ease of master integration, directly returns unregister value for higher-level XMLRPC API. val is the number of APIs unregistered (0 or 1) @rtype: code, msg, val