org.ros.internal.node.xmlrpc
Interface ParameterServerXmlRpcEndpoint

All Superinterfaces:
XmlRpcEndpoint
All Known Implementing Classes:
MasterXmlRpcEndpointImpl

public interface ParameterServerXmlRpcEndpoint
extends XmlRpcEndpoint

XML-RPC endpoint for a parameter server.


Method Summary
 java.util.List<java.lang.Object> deleteParam(java.lang.String callerId, java.lang.String key)
          Deletes a parameter.
 java.util.List<java.lang.Object> getParam(java.lang.String callerId, java.lang.String key)
          Retrieve parameter value from server.
 java.util.List<java.lang.Object> getParamNames(java.lang.String callerId)
          Gets the list of all parameter names stored on this server.
 java.util.List<java.lang.Object> hasParam(java.lang.String callerId, java.lang.String key)
          Check if parameter is stored on server.
 java.util.List<java.lang.Object> searchParam(java.lang.String callerId, java.lang.String key)
          Searches for a parameter key on the ParameterServer.
 java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.lang.Boolean value)
          Sets a parameter.
 java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.lang.Double value)
           
 java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.lang.Integer value)
           
 java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.util.List<?> value)
           
 java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.util.Map<?,?> value)
           
 java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.lang.String value)
           
 java.util.List<java.lang.Object> subscribeParam(java.lang.String callerId, java.lang.String callerApi, java.lang.String key)
          Retrieves the parameter value from server and subscribe to updates to that param.
 java.util.List<java.lang.Object> unsubscribeParam(java.lang.String callerId, java.lang.String callerApi, java.lang.String key)
          Unsubscribes from updates to the specified param.
 

Method Detail

deleteParam

java.util.List<java.lang.Object> deleteParam(java.lang.String callerId,
                                             java.lang.String key)
Deletes a parameter.

Parameters:
callerId - ROS caller ID
key - parameter name
Returns:
void

setParam

java.util.List<java.lang.Object> setParam(java.lang.String callerId,
                                          java.lang.String key,
                                          java.lang.Boolean value)
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 ID
key - Parameter name.
value - Parameter value.
Returns:
void

setParam

java.util.List<java.lang.Object> setParam(java.lang.String callerId,
                                          java.lang.String key,
                                          java.lang.Integer value)

setParam

java.util.List<java.lang.Object> setParam(java.lang.String callerId,
                                          java.lang.String key,
                                          java.lang.Double value)

setParam

java.util.List<java.lang.Object> setParam(java.lang.String callerId,
                                          java.lang.String key,
                                          java.lang.String value)

setParam

java.util.List<java.lang.Object> setParam(java.lang.String callerId,
                                          java.lang.String key,
                                          java.util.List<?> value)

setParam

java.util.List<java.lang.Object> setParam(java.lang.String callerId,
                                          java.lang.String key,
                                          java.util.Map<?,?> value)

getParam

java.util.List<java.lang.Object> getParam(java.lang.String callerId,
                                          java.lang.String key)
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 ID
key - Parameter name. If key is a namespace, getParam() will return a parameter tree.
Returns:
the parameter value

searchParam

java.util.List<java.lang.Object> searchParam(java.lang.String callerId,
                                             java.lang.String key)
Searches for a parameter key on the ParameterServer.

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 ID
key - Parameter name to search for.
Returns:
the found key

subscribeParam

java.util.List<java.lang.Object> subscribeParam(java.lang.String callerId,
                                                java.lang.String callerApi,
                                                java.lang.String key)
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 ID
callerApi - Node API URI of subscriber for paramUpdate callbacks.
key -
Returns:
the parameter value

unsubscribeParam

java.util.List<java.lang.Object> unsubscribeParam(java.lang.String callerId,
                                                  java.lang.String callerApi,
                                                  java.lang.String key)
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 ID
callerApi - Node API URI of subscriber
key - Parameter name
Returns:
the number of parameters that were unsubscribed

hasParam

java.util.List<java.lang.Object> hasParam(java.lang.String callerId,
                                          java.lang.String key)
Check if parameter is stored on server.

Parameters:
callerId - ROS caller ID.
key - Parameter name.
Returns:
true if the parameter exists

getParamNames

java.util.List<java.lang.Object> getParamNames(java.lang.String callerId)
Gets the list of all parameter names stored on this server.

Parameters:
callerId - ROS caller ID.
Returns:
a Collection of parameter names