|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ros.internal.node.xmlrpc.MasterXmlRpcEndpointImpl
public class MasterXmlRpcEndpointImpl
A combined XML-RPC endpoint for the master and parameter servers.
Constructor Summary | |
---|---|
MasterXmlRpcEndpointImpl(MasterServer master)
|
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> |
getPid(java.lang.String callerId)
Get the PID for the master process. |
java.util.List<java.lang.Object> |
getPublishedTopics(java.lang.String callerId,
java.lang.String subgraph)
Get list of topics that can be subscribed to. |
java.util.List<java.lang.Object> |
getSystemState(java.lang.String callerId)
Retrieve list representation of system state (i.e. |
java.util.List<java.lang.Object> |
getTopicTypes(java.lang.String callerId)
Get a list of all topic types. |
java.util.List<java.lang.Object> |
getUri(java.lang.String callerId)
Get the URI of the the master. |
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> |
lookupNode(java.lang.String callerId,
java.lang.String nodeName)
Get the XML-RPC URI of the node with the associated name/caller_id. |
java.util.List<java.lang.Object> |
lookupService(java.lang.String callerId,
java.lang.String serviceName)
Lookup all provider of a particular service. |
java.util.List<java.lang.Object> |
registerPublisher(java.lang.String callerId,
java.lang.String topicName,
java.lang.String topicMessageType,
java.lang.String callerSlaveUri)
Register the caller as a publisher the topic. |
java.util.List<java.lang.Object> |
registerService(java.lang.String callerId,
java.lang.String serviceName,
java.lang.String serviceUri,
java.lang.String callerSlaveUri)
Register the caller as a provider of the specified service. |
java.util.List<java.lang.Object> |
registerSubscriber(java.lang.String callerId,
java.lang.String topicName,
java.lang.String topicMessageType,
java.lang.String callerSlaveUri)
Subscribe the caller to the specified topic. |
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 callerSlaveUri,
java.lang.String key)
Retrieves the parameter value from server and subscribe to updates to that param. |
java.util.List<java.lang.Object> |
unregisterPublisher(java.lang.String callerId,
java.lang.String topicName,
java.lang.String callerSlaveUri)
Unregister the caller as a publisher of the topic. |
java.util.List<java.lang.Object> |
unregisterService(java.lang.String callerId,
java.lang.String serviceName,
java.lang.String serviceUri)
Unregister the caller as a provider of the specified service. |
java.util.List<java.lang.Object> |
unregisterSubscriber(java.lang.String callerId,
java.lang.String topicName,
java.lang.String callerSlaveUri)
Unregister the caller as a publisher of the topic. |
java.util.List<java.lang.Object> |
unsubscribeParam(java.lang.String callerId,
java.lang.String callerSlaveUri,
java.lang.String key)
Unsubscribes from updates to the specified param. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MasterXmlRpcEndpointImpl(MasterServer master)
Method Detail |
---|
public java.util.List<java.lang.Object> getPid(java.lang.String callerId)
MasterXmlRpcEndpoint
getPid
in interface MasterXmlRpcEndpoint
callerId
- ROS caller ID
public java.util.List<java.lang.Object> getPublishedTopics(java.lang.String callerId, java.lang.String subgraph)
MasterXmlRpcEndpoint
getPublishedTopics
in interface MasterXmlRpcEndpoint
callerId
- ROS caller IDsubgraph
- Restrict topic names to match within the specified subgraph.
Subgraph namespace is resolved relative to the caller's namespace.
Use empty string to specify all names.
public java.util.List<java.lang.Object> getTopicTypes(java.lang.String callerId)
MasterXmlRpcEndpoint
getTopicTypes
in interface MasterXmlRpcEndpoint
callerId
- ROS caller ID
public java.util.List<java.lang.Object> getSystemState(java.lang.String callerId)
MasterXmlRpcEndpoint
getSystemState
in interface MasterXmlRpcEndpoint
callerId
- ROS caller ID
public java.util.List<java.lang.Object> getUri(java.lang.String callerId)
MasterXmlRpcEndpoint
getUri
in interface MasterXmlRpcEndpoint
callerId
- ROS caller ID
public java.util.List<java.lang.Object> lookupNode(java.lang.String callerId, java.lang.String nodeName)
MasterXmlRpcEndpoint
lookupNode
in interface MasterXmlRpcEndpoint
callerId
- ROS caller IDnodeName
- Name of node to lookup
public java.util.List<java.lang.Object> registerPublisher(java.lang.String callerId, java.lang.String topicName, java.lang.String topicMessageType, java.lang.String callerSlaveUri)
MasterXmlRpcEndpoint
registerPublisher
in interface MasterXmlRpcEndpoint
callerId
- ROS caller IDtopicName
- fully-qualified name of topic to registertopicMessageType
- topic type, must be a package-resource name, i.e. the .msg name.callerSlaveUri
- API URI of publisher to register
public java.util.List<java.lang.Object> unregisterPublisher(java.lang.String callerId, java.lang.String topicName, java.lang.String callerSlaveUri)
MasterXmlRpcEndpoint
unregisterPublisher
in interface MasterXmlRpcEndpoint
callerId
- ROS caller IDtopicName
- Fully-qualified name of topic.callerSlaveUri
- API URI of publisher to unregister. Unregistration will only occur
if current registration matches.
public java.util.List<java.lang.Object> registerSubscriber(java.lang.String callerId, java.lang.String topicName, java.lang.String topicMessageType, java.lang.String callerSlaveUri)
MasterXmlRpcEndpoint
registerSubscriber
in interface MasterXmlRpcEndpoint
callerId
- ROS caller IDtopicName
- Fully-qualified name of topictopicMessageType
- topic type, must be a package-resource name, i.e. the .msg namecallerSlaveUri
- API URI of subscriber to register. Will be used for new publisher
notifications
public java.util.List<java.lang.Object> unregisterSubscriber(java.lang.String callerId, java.lang.String topicName, java.lang.String callerSlaveUri)
MasterXmlRpcEndpoint
unregisterSubscriber
in interface MasterXmlRpcEndpoint
callerId
- ROS caller IDtopicName
- Fully-qualified name of topic.callerSlaveUri
- API URI of service to unregister. Unregistration will only occur
if current registration matches.
public java.util.List<java.lang.Object> lookupService(java.lang.String callerId, java.lang.String serviceName)
MasterXmlRpcEndpoint
lookupService
in interface MasterXmlRpcEndpoint
callerId
- ROS caller IDserviceName
- Fully-qualified name of service
public java.util.List<java.lang.Object> registerService(java.lang.String callerId, java.lang.String serviceName, java.lang.String serviceUri, java.lang.String callerSlaveUri)
MasterXmlRpcEndpoint
registerService
in interface MasterXmlRpcEndpoint
callerId
- ROS caller IDserviceName
- Fully-qualified name of serviceserviceUri
- XML-RPC URI of caller node
public java.util.List<java.lang.Object> unregisterService(java.lang.String callerId, java.lang.String serviceName, java.lang.String serviceUri)
MasterXmlRpcEndpoint
unregisterService
in interface MasterXmlRpcEndpoint
callerId
- ROS caller IDserviceName
- Fully-qualified name of serviceserviceUri
- API URI of service to unregister. Unregistration will only occur
if current registration matches.
public java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.lang.Boolean value)
ParameterServerXmlRpcEndpoint
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.
setParam
in interface ParameterServerXmlRpcEndpoint
callerId
- ROS caller IDkey
- Parameter name.value
- Parameter value.
public java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.lang.Integer value)
setParam
in interface ParameterServerXmlRpcEndpoint
public java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.lang.Double value)
setParam
in interface ParameterServerXmlRpcEndpoint
public java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.lang.String value)
setParam
in interface ParameterServerXmlRpcEndpoint
public java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.util.List<?> value)
setParam
in interface ParameterServerXmlRpcEndpoint
public java.util.List<java.lang.Object> setParam(java.lang.String callerId, java.lang.String key, java.util.Map<?,?> value)
setParam
in interface ParameterServerXmlRpcEndpoint
public java.util.List<java.lang.Object> getParam(java.lang.String callerId, java.lang.String key)
ParameterServerXmlRpcEndpoint
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.
getParam
in interface ParameterServerXmlRpcEndpoint
callerId
- ROS caller IDkey
- Parameter name. If key is a namespace, getParam() will return a
parameter tree.
public java.util.List<java.lang.Object> searchParam(java.lang.String callerId, java.lang.String key)
ParameterServerXmlRpcEndpoint
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.
searchParam
in interface ParameterServerXmlRpcEndpoint
callerId
- ROS caller IDkey
- Parameter name to search for.
public java.util.List<java.lang.Object> subscribeParam(java.lang.String callerId, java.lang.String callerSlaveUri, java.lang.String key)
ParameterServerXmlRpcEndpoint
If code is not 1, parameterValue should be ignored. parameterValue is an empty dictionary if the parameter has not been set yet.
subscribeParam
in interface ParameterServerXmlRpcEndpoint
callerId
- ROS caller IDcallerSlaveUri
- Node API URI of subscriber for paramUpdate callbacks.
public java.util.List<java.lang.Object> unsubscribeParam(java.lang.String callerId, java.lang.String callerSlaveUri, java.lang.String key)
ParameterServerXmlRpcEndpoint
A return value of zero means that the caller was not subscribed to the parameter.
unsubscribeParam
in interface ParameterServerXmlRpcEndpoint
callerId
- ROS caller IDcallerSlaveUri
- Node API URI of subscriberkey
- Parameter name
public java.util.List<java.lang.Object> deleteParam(java.lang.String callerId, java.lang.String key)
ParameterServerXmlRpcEndpoint
deleteParam
in interface ParameterServerXmlRpcEndpoint
callerId
- ROS caller IDkey
- parameter name
public java.util.List<java.lang.Object> hasParam(java.lang.String callerId, java.lang.String key)
ParameterServerXmlRpcEndpoint
hasParam
in interface ParameterServerXmlRpcEndpoint
callerId
- ROS caller ID.key
- Parameter name.
true
if the parameter existspublic java.util.List<java.lang.Object> getParamNames(java.lang.String callerId)
ParameterServerXmlRpcEndpoint
getParamNames
in interface ParameterServerXmlRpcEndpoint
callerId
- ROS caller ID.
Collection
of parameter names
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |