Interface ParameterServerXmlRpcEndpoint
- All Superinterfaces:
XmlRpcEndpoint
- All Known Implementing Classes:
MasterXmlRpcEndpointImpl
- Author:
- damonkohler@google.com (Damon Kohler)
-
Method Summary
Modifier and TypeMethodDescriptiondeleteParam(String callerId, String key) Deletes a parameter.Retrieve parameter value from server.getParamNames(String callerId) Gets the list of all parameter names stored on this server.Check if parameter is stored on server.searchParam(String callerId, String key) Searches for a parameter key on theParameterServer.Sets a parameter.subscribeParam(String callerId, String callerApi, String key) Retrieves the parameter value from server and subscribe to updates to that param.unsubscribeParam(String callerId, String callerApi, String key) Unsubscribes from updates to the specified param.
-
Method Details
-
deleteParam
Deletes a parameter.- Parameters:
callerId- ROS caller IDkey- parameter name- Returns:
- void
-
setParam
Sets a parameter.NOTE: if value is a dictionary it will be treated as a parameter tree, where key is the parameter namespace. For example {'x':1,'y':2,'sub':{'z':3}} will set key/x=1, key/y=2, and key/sub/z=3. Furthermore, it will replace all existing parameters in the key parameter namespace with the parameters in value. You must set parameters individually if you wish to perform a union update.
- Parameters:
callerId- ROS caller IDkey- Parameter name.value- Parameter value.- Returns:
- void
-
setParam
-
setParam
-
setParam
-
setParam
-
setParam
-
getParam
Retrieve parameter value from server.If code is not 1, parameterValue should be ignored. If key is a namespace, the return value will be a dictionary, where each key is a parameter in that namespace. Sub-namespaces are also represented as dictionaries.
- Parameters:
callerId- ROS caller IDkey- Parameter name. If key is a namespace, getParam() will return a parameter tree.- Returns:
- the parameter value
-
searchParam
Searches for a parameter key on theParameterServer.Search starts in caller's namespace and proceeds upwards through parent namespaces until Parameter Server finds a matching key. searchParam()'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, searchParam() 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). If code is not 1, foundKey should be ignored.
- Parameters:
callerId- ROS caller IDkey- Parameter name to search for.- Returns:
- the found key
-
subscribeParam
Retrieves the parameter value from server and subscribe to updates to that param. See paramUpdate() in the Node API.If code is not 1, parameterValue should be ignored. parameterValue is an empty dictionary if the parameter has not been set yet.
- Parameters:
callerId- ROS caller IDcallerApi- Node API URI of subscriber for paramUpdate callbacks.key-- Returns:
- the parameter value
-
unsubscribeParam
Unsubscribes from updates to the specified param. See paramUpdate() in the Node API.A return value of zero means that the caller was not subscribed to the parameter.
- Parameters:
callerId- ROS caller IDcallerApi- Node API URI of subscriberkey- Parameter name- Returns:
- the number of parameters that were unsubscribed
-
hasParam
Check if parameter is stored on server.- Parameters:
callerId- ROS caller ID.key- Parameter name.- Returns:
trueif the parameter exists
-
getParamNames
Gets the list of all parameter names stored on this server.- Parameters:
callerId- ROS caller ID.- Returns:
- a
Collectionof parameter names
-