Interface MasterXmlRpcEndpoint

All Superinterfaces:
XmlRpcEndpoint
All Known Implementing Classes:
MasterXmlRpcEndpointImpl

public interface MasterXmlRpcEndpoint extends XmlRpcEndpoint
An XML-RPC endpoint description of a ROS master.
Author:
damonkohler@google.com (Damon Kohler)
  • Method Details

    • getPid

      List<Object> getPid(String callerId)
      Get the PID for the master process.
      Parameters:
      callerId - ROS caller ID
      Returns:
      The pid of the process.
    • registerService

      List<Object> registerService(String callerId, String service, String serviceApi, 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

      List<Object> unregisterService(String callerId, String service, 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

      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 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

      List<Object> unregisterSubscriber(String callerId, String topicName, 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

      List<Object> registerPublisher(String callerId, String topicName, String topicType, 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

      List<Object> unregisterPublisher(String callerId, String topicName, 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

      List<Object> lookupNode(String callerId, 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

      List<Object> getPublishedTopics(String callerId, 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

      List<Object> getTopicTypes(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

      List<Object> getSystemState(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

      List<Object> getUri(String callerId)
      Get the URI of the the master.
      Parameters:
      callerId - ROS caller ID
      Returns:
      URI of the the master
    • lookupService

      List<Object> lookupService(String callerId, 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.