org.ros.internal.node.xmlrpc
Interface MasterXmlRpcEndpoint

All Superinterfaces:
XmlRpcEndpoint
All Known Implementing Classes:
MasterXmlRpcEndpointImpl

public interface MasterXmlRpcEndpoint
extends XmlRpcEndpoint

An XML-RPC endpoint description of a ROS master.


Method Summary
 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> 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 service)
          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 topicType, java.lang.String callerApi)
          Register the caller as a publisher the topic.
 java.util.List<java.lang.Object> registerService(java.lang.String callerId, java.lang.String service, java.lang.String serviceApi, java.lang.String callerApi)
          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 topicType, java.lang.String callerApi)
          Subscribe the caller to the specified topic.
 java.util.List<java.lang.Object> unregisterPublisher(java.lang.String callerId, java.lang.String topicName, java.lang.String callerApi)
          Unregister the caller as a publisher of the topic.
 java.util.List<java.lang.Object> unregisterService(java.lang.String callerId, java.lang.String service, java.lang.String serviceApi)
          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 callerApi)
          Unregister the caller as a publisher of the topic.
 

Method Detail

getPid

java.util.List<java.lang.Object> getPid(java.lang.String callerId)
Get the PID for the master process.

Parameters:
callerId - ROS caller ID
Returns:
The pid of the process.

registerService

java.util.List<java.lang.Object> registerService(java.lang.String callerId,
                                                 java.lang.String service,
                                                 java.lang.String serviceApi,
                                                 java.lang.String callerApi)
Register the caller as a provider of the specified service.

Parameters:
callerId - ROS caller ID
service - Fully-qualified name of service
serviceApi - XML-RPC URI of caller node
callerApi -
Returns:
ignore

unregisterService

java.util.List<java.lang.Object> unregisterService(java.lang.String callerId,
                                                   java.lang.String service,
                                                   java.lang.String serviceApi)
Unregister the caller as a provider of the specified service.

Parameters:
callerId - ROS caller ID
service - Fully-qualified name of service
serviceApi - API URI of service to unregister. Unregistration will only occur if current registration matches.
Returns:
Number of unregistrations (either 0 or 1). If this is zero it means that the caller was not registered as a service provider. The call still succeeds as the intended final state is reached.

registerSubscriber

java.util.List<java.lang.Object> registerSubscriber(java.lang.String callerId,
                                                    java.lang.String topicName,
                                                    java.lang.String topicType,
                                                    java.lang.String callerApi)
Subscribe the caller to the specified topic. In addition to receiving a list of current publishers, the subscriber will also receive notifications of new publishers via the publisherUpdate API.

Parameters:
callerId - ROS caller ID
topicName - Fully-qualified name of topic
topicType - topic type, must be a package-resource name, i.e. the .msg name
callerApi - API URI of subscriber to register. Will be used for new publisher notifications
Returns:
publishers as a list of XMLRPC API URIs for nodes currently publishing the specified topic

unregisterSubscriber

java.util.List<java.lang.Object> unregisterSubscriber(java.lang.String callerId,
                                                      java.lang.String topicName,
                                                      java.lang.String callerApi)
Unregister the caller as a publisher of the topic.

Parameters:
callerId - ROS caller ID
topicName - Fully-qualified name of topic.
callerApi - API URI of service to unregister. Unregistration will only occur if current registration matches.
Returns:
If numUnsubscribed is zero it means that the caller was not registered as a subscriber. The call still succeeds as the intended final state is reached.

registerPublisher

java.util.List<java.lang.Object> registerPublisher(java.lang.String callerId,
                                                   java.lang.String topicName,
                                                   java.lang.String topicType,
                                                   java.lang.String callerApi)
Register the caller as a publisher the topic.

Parameters:
callerId - ROS caller ID
topicName - fully-qualified name of topic to register
topicType - topic type, must be a package-resource name, i.e. the .msg name.
callerApi - API URI of publisher to register
Returns:
list of current subscribers of topic in the form of XML-RPC URIs

unregisterPublisher

java.util.List<java.lang.Object> unregisterPublisher(java.lang.String callerId,
                                                     java.lang.String topicName,
                                                     java.lang.String callerApi)
Unregister the caller as a publisher of the topic.

Parameters:
callerId - ROS caller ID
topicName - Fully-qualified name of topic.
callerApi - API URI of publisher to unregister. Unregistration will only occur if current registration matches.
Returns:
If numUnsubscribed is zero it means that the caller was not registered as a subscriber. The call still succeeds as the intended final state is reached.

lookupNode

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. This API is for looking information about publishers and subscribers. Use lookupService instead to lookup ROS-RPC URIs.

Parameters:
callerId - ROS caller ID
nodeName - Name of node to lookup
Returns:
URI of the node

getPublishedTopics

java.util.List<java.lang.Object> getPublishedTopics(java.lang.String callerId,
                                                    java.lang.String subgraph)
Get list of topics that can be subscribed to. This does not return topics that have no publishers. See getSystemState() to get more comprehensive list.

Parameters:
callerId - ROS caller ID
subgraph - 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.
Returns:
Topics is in list representation [[topic, message type], [topic, message type] ...]

getTopicTypes

java.util.List<java.lang.Object> getTopicTypes(java.lang.String callerId)
Get a list of all topic types.

Parameters:
callerId - ROS caller ID
Returns:
The types are in the list representation [[topic, message type], [topic, message type] ...]

getSystemState

java.util.List<java.lang.Object> getSystemState(java.lang.String callerId)
Retrieve list representation of system state (i.e. publishers, subscribers, and services).

Parameters:
callerId - ROS caller ID
Returns:
System state is in list representation [publishers, subscribers, services] publishers is of the form [ [topic1, [topic1Publisher1...topic1PublisherN]] ... ] subscribers is of the form [ [topic1, [topic1Subscriber1...topic1SubscriberN]] ... ] services is of the form [ [service1, [service1Provider1...service1ProviderN]] ... ]

getUri

java.util.List<java.lang.Object> getUri(java.lang.String callerId)
Get the URI of the the master.

Parameters:
callerId - ROS caller ID
Returns:
URI of the the master

lookupService

java.util.List<java.lang.Object> lookupService(java.lang.String callerId,
                                               java.lang.String service)
Lookup all provider of a particular service.

Parameters:
callerId - ROS caller ID
service - Fully-qualified name of service
Returns:
service URL is provides address and port of the service. Fails if there is no provider.