Package org.ros.internal.node.xmlrpc
Interface MasterXmlRpcEndpoint
- All Superinterfaces:
XmlRpcEndpoint
- All Known Implementing Classes:
MasterXmlRpcEndpointImpl
An XML-RPC endpoint description of a ROS master.
- Author:
- damonkohler@google.com (Damon Kohler)
-
Method Summary
Modifier and TypeMethodDescriptionGet the PID for the master process.getPublishedTopics(String callerId, String subgraph) Get list of topics that can be subscribed to.getSystemState(String callerId) Retrieve list representation of system state (i.e.getTopicTypes(String callerId) Get a list of all topic types.Get the URI of the the master.lookupNode(String callerId, String nodeName) Get the XML-RPC URI of the node with the associated name/caller_id.lookupService(String callerId, String service) Lookup all provider of a particular service.registerPublisher(String callerId, String topicName, String topicType, String callerApi) Register the caller as a publisher the topic.registerService(String callerId, String service, String serviceApi, String callerApi) Register the caller as a provider of the specified service.registerSubscriber(String callerId, String topicName, String topicType, String callerApi) Subscribe the caller to the specified topic.unregisterPublisher(String callerId, String topicName, String callerApi) Unregister the caller as a publisher of the topic.unregisterService(String callerId, String service, String serviceApi) Unregister the caller as a provider of the specified service.unregisterSubscriber(String callerId, String topicName, String callerApi) Unregister the caller as a publisher of the topic.
-
Method Details
-
getPid
Get the PID for the master process.- Parameters:
callerId- ROS caller ID- Returns:
- The pid of the process.
-
registerService
Register the caller as a provider of the specified service.- Parameters:
callerId- ROS caller IDservice- Fully-qualified name of serviceserviceApi- XML-RPC URI of caller nodecallerApi-- Returns:
- ignore
-
unregisterService
Unregister the caller as a provider of the specified service.- Parameters:
callerId- ROS caller IDservice- Fully-qualified name of serviceserviceApi- 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
List<Object> registerSubscriber(String callerId, String topicName, String topicType, 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 IDtopicName- Fully-qualified name of topictopicType- topic type, must be a package-resource name, i.e. the .msg namecallerApi- 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
Unregister the caller as a publisher of the topic.- Parameters:
callerId- ROS caller IDtopicName- 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
List<Object> registerPublisher(String callerId, String topicName, String topicType, String callerApi) Register the caller as a publisher the topic.- Parameters:
callerId- ROS caller IDtopicName- fully-qualified name of topic to registertopicType- 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
Unregister the caller as a publisher of the topic.- Parameters:
callerId- ROS caller IDtopicName- 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
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 IDnodeName- Name of node to lookup- Returns:
- URI of the node
-
getPublishedTopics
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 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.- Returns:
- Topics is in list representation [[topic, message type], [topic, message type] ...]
-
getTopicTypes
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
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
Get the URI of the the master.- Parameters:
callerId- ROS caller ID- Returns:
- URI of the the master
-
lookupService
Lookup all provider of a particular service.- Parameters:
callerId- ROS caller IDservice- Fully-qualified name of service- Returns:
- service URL is provides address and port of the service. Fails if there is no provider.
-