Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
org.ros.internal.node.server.master.MasterServer Class Reference
Inheritance diagram for org.ros.internal.node.server.master.MasterServer:
Inheritance graph
[legend]

List of all members.

Public Member Functions

List< Object > getPublishedTopics (GraphName caller, GraphName subgraph)
List< Object > getSystemState ()
List< List< String > > getTopicTypes (GraphName calledId)
URI lookupNode (GraphName nodeName)
URI lookupService (GraphName serviceName)
 MasterServer (BindAddress bindAddress, AdvertiseAddress advertiseAddress)
void onNodeReplacement (NodeRegistrationInfo nodeInfo)
List< URI > registerPublisher (GraphName nodeName, URI nodeSlaveUri, GraphName topicName, String topicMessageType)
void registerService (GraphName nodeName, URI nodeSlaveUri, GraphName serviceName, URI serviceUri)
List< URI > registerSubscriber (GraphName nodeName, URI nodeSlaveUri, GraphName topicName, String topicMessageType)
void start ()
boolean unregisterPublisher (GraphName nodeName, GraphName topicName)
boolean unregisterService (GraphName nodeName, GraphName serviceName, URI serviceUri)
boolean unregisterSubscriber (GraphName nodeName, GraphName topicName)

Static Public Attributes

static final int SYSTEM_STATE_PUBLISHERS = 0
static final int SYSTEM_STATE_SERVICES = 2
static final int SYSTEM_STATE_SUBSCRIBERS = 1

Protected Member Functions

void contactSubscriberForPublisherUpdate (URI subscriberSlaveUri, GraphName topicName, List< URI > publisherUris)

Private Member Functions

List< Object > getSystemStatePublishers (Collection< TopicRegistrationInfo > topics)
List< Object > getSystemStateServices ()
List< Object > getSystemStateSubscribers (Collection< TopicRegistrationInfo > topics)
void publisherUpdate (TopicRegistrationInfo topicInfo, List< URI > subscriberSlaveUris)

Private Attributes

final MasterRegistrationManagerImpl masterRegistrationManager

Static Private Attributes

static final boolean DEBUG = false
static final Log log = LogFactory.getLog(MasterServer.class)
static final GraphName MASTER_NODE_NAME = GraphName.of("/master")

Detailed Description

The MasterServer provides naming and registration services to the rest of the Nodes in the ROS system. It tracks Publishers and Subscribers to TopicSystemStates as well as ServiceServers. The role of the MasterServer is to enable individual ROS Nodes to locate one another. Once these Nodes have located each other they communicate with each other peer-to-peer.

See also:
Master documentation
Author:
damonkohler@google.com (Damon Kohler)
khughes@google.com (Keith M. Hughes)

Definition at line 56 of file MasterServer.java.


Constructor & Destructor Documentation

Definition at line 87 of file MasterServer.java.


Member Function Documentation

void org.ros.internal.node.server.master.MasterServer.contactSubscriberForPublisherUpdate ( URI  subscriberSlaveUri,
GraphName  topicName,
List< URI >  publisherUris 
) [inline, protected]

Contact a subscriber and send it a publisher update.

Parameters:
subscriberSlaveUrithe slave URI of the subscriber to contact
topicNamethe name of the topic whose publisher URIs are being updated
publisherUristhe new list of publisher URIs to be sent to the subscriber

Definition at line 266 of file MasterServer.java.

Get a list of all topics published for the give subgraph.

Parameters:
callername of the caller
subgraphsubgraph containing the requested TopicSystemStates, relative to caller
Returns:
a List of Lists where the nested Lists contain, in order, the TopicSystemState name and TopicSystemState message type

Definition at line 462 of file MasterServer.java.

Get the state of the ROS graph.

This includes information about publishers, subscribers, and services.

Returns:
TODO(keith): Fill in.

Definition at line 339 of file MasterServer.java.

Get the system state for Publishers.

Parameters:
topicsall topics known by the master
Returns:
a List of the form [ [topic1, [topic1Publisher1...topic1PublisherN]] ... ] where the topicPublisherI instances are Node names

Definition at line 361 of file MasterServer.java.

Get the system state for ServiceServers.

Returns:
a List of the form [ [service1, [serviceProvider1...serviceProviderN]] ... ] where the serviceProviderI instances are Node names

Definition at line 416 of file MasterServer.java.

Get the system state for Subscribers.

Parameters:
topicsall topics known by the master
Returns:
a List of the form [ [topic1, [topic1Subscriber1...topic1SubscriberN]] ... ] where the topicSubscriberI instances are Node names

Definition at line 390 of file MasterServer.java.

Get a List of all TopicSystemState message types.

Parameters:
calledIdthe Node name of the caller
Returns:
a list of the form [[topic 1 name, topic 1 message type], [topic 2 name, topic 2 message type], ...]

Definition at line 321 of file MasterServer.java.

Returns a NodeIdentifier for the Node with the given name. This API is for looking information about Publishers and Subscribers. Use lookupService(GraphName) instead to lookup ROS-RPC URIs for ServiceServers.

Parameters:
nodeNamename of Node to lookup
Returns:
the URI for the Node slave server with the given name, or
 null 
if there is no Node with the given name

Definition at line 302 of file MasterServer.java.

Lookup the provider of a particular service.

Parameters:
serviceNamename of service
Returns:
URI of the SlaveServer with the provided name, or
 null 
if there is no such service.

Definition at line 438 of file MasterServer.java.

A node is being replaced.

The information object is about to be trashed, so it should not be hung onto.

Parameters:
nodeInfothe node being replaced

Implements org.ros.internal.node.server.master.MasterRegistrationListener.

Definition at line 476 of file MasterServer.java.

void org.ros.internal.node.server.master.MasterServer.publisherUpdate ( TopicRegistrationInfo  topicInfo,
List< URI >  subscriberSlaveUris 
) [inline, private]

Something has happened to the publishers for a topic. Tell every subscriber about the current set of publishers.

Parameters:
topicInfothe topic information for the update
subscriberSlaveUrisIRIs for all subscribers

Definition at line 240 of file MasterServer.java.

List<URI> org.ros.internal.node.server.master.MasterServer.registerPublisher ( GraphName  nodeName,
URI  nodeSlaveUri,
GraphName  topicName,
String  topicMessageType 
) [inline]

Register the caller as a Publisher of the specified topic.

Parameters:
nodeNamethe GraphName of the Node offering the service
nodeSlaveUrithe URI of the Node's SlaveServer
topicNamethe GraphName of the subscribed TopicParticipant
topicMessageTypethe message type of the topic
Returns:
a List of the current Subscribers to the Publisher's TopicSystemState in the form of XML-RPC URIs for each Subscriber's SlaveServer

Definition at line 207 of file MasterServer.java.

void org.ros.internal.node.server.master.MasterServer.registerService ( GraphName  nodeName,
URI  nodeSlaveUri,
GraphName  serviceName,
URI  serviceUri 
) [inline]

Register a service with the master.

Parameters:
nodeNamethe GraphName of the Node offering the service
nodeSlaveUrithe URI of the Node's SlaveServer
serviceNamethe GraphName of the service
serviceUrithe URI of the service

Definition at line 114 of file MasterServer.java.

List<URI> org.ros.internal.node.server.master.MasterServer.registerSubscriber ( GraphName  nodeName,
URI  nodeSlaveUri,
GraphName  topicName,
String  topicMessageType 
) [inline]

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:
nodeNamethe GraphName of the Node offering the service
nodeSlaveUrithe URI of the Node's SlaveServer
topicNamethe GraphName of the subscribed TopicParticipant
topicMessageTypethe message type of the topic
Returns:
A List of XMLRPC API URIs for nodes currently publishing the specified topic

Definition at line 154 of file MasterServer.java.

Start the MasterServer.

Definition at line 95 of file MasterServer.java.

Unregister a Publisher.

Parameters:
nodeNamethe GraphName of the Node offering the service
topicNamethe GraphName of the subscribed TopicParticipant
Returns:
 true 
if the Publisher was unregistered

Definition at line 281 of file MasterServer.java.

boolean org.ros.internal.node.server.master.MasterServer.unregisterService ( GraphName  nodeName,
GraphName  serviceName,
URI  serviceUri 
) [inline]

Unregister a service from the master.

Parameters:
nodeNamethe GraphName of the Node offering the service
serviceNamethe GraphName of the service
serviceUrithe URI of the service
Returns:
 true 
if the service was registered

Definition at line 132 of file MasterServer.java.

Unregister a Subscriber.

Parameters:
nodeNamethe GraphName of the Node offering the service
topicNamethe GraphName of the subscribed TopicParticipant
Returns:
 true 
if the Subscriber was registered

Definition at line 183 of file MasterServer.java.


Member Data Documentation

final boolean org.ros.internal.node.server.master.MasterServer.DEBUG = false [static, private]

Reimplemented from org.ros.internal.node.server.XmlRpcServer.

Definition at line 58 of file MasterServer.java.

final Log org.ros.internal.node.server.master.MasterServer.log = LogFactory.getLog(MasterServer.class) [static, private]

Reimplemented from org.ros.internal.node.server.XmlRpcServer.

Definition at line 59 of file MasterServer.java.

The node name (i.e. the callerId XML-RPC field) used when the MasterServer contacts a SlaveServer.

Definition at line 80 of file MasterServer.java.

The manager for handling master registration information.

Definition at line 85 of file MasterServer.java.

Position in the getSystemState() for publisher information.

Definition at line 64 of file MasterServer.java.

Position in the getSystemState() for service information.

Definition at line 74 of file MasterServer.java.

Position in the getSystemState() for subscriber information.

Definition at line 69 of file MasterServer.java.


The documentation for this class was generated from the following file:


rosjava_core
Author(s):
autogenerated on Wed Aug 26 2015 16:06:51