Package org.ros.internal.node.client
Class MasterClient
java.lang.Object
org.ros.internal.node.client.MasterClient
Provides access to the XML-RPC API exposed by a
MasterServer.- Author:
- damonkohler@google.com (Damon Kohler)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMasterClient(URI uri) Create a newMasterClientconnected to the specifiedMasterServerURI. -
Method Summary
Modifier and TypeMethodDescriptiongetPublishedTopics(GraphName callerName, String subgraph) getSystemState(GraphName callerName) getTopicTypes(GraphName callerName) Get aListof allTopicSystemStatemessage types.lookupNode(GraphName slaveName, String nodeName) lookupService(GraphName callerName, String serviceName) registerPublisher(PublisherDeclaration publisherDeclaration) Registers the specifiedPublisherDeclaration.registerService(NodeIdentifier slave, ServiceServer<?, ?> service) Registers the givenServiceServer.registerSubscriber(NodeIdentifier slave, Subscriber<?> subscriber) Registers the givenSubscriber.unregisterPublisher(PublisherIdentifier publisherIdentifier) Unregisters the specifiedPublisherDeclaration.unregisterService(NodeIdentifier slave, ServiceServer<?, ?> service) Unregisters the specifiedServiceServer.unregisterSubscriber(NodeIdentifier slave, Subscriber<?> subscriber) Unregisters the specifiedSubscriber.
-
Field Details
-
xmlRpcEndpoint
-
-
Constructor Details
-
MasterClient
Create a newMasterClientconnected to the specifiedMasterServerURI.- Parameters:
uri- theURIof theMasterServerto connect to
-
-
Method Details
-
registerService
Registers the givenServiceServer.- Parameters:
slave- theNodeIdentifierwhere theServiceServeris runningservice- theServiceServerto register- Returns:
- a void
Response
-
unregisterService
Unregisters the specifiedServiceServer.- Parameters:
slave- theNodeIdentifierwhere theServiceServeris runningservice- theServiceServerto unregister- Returns:
- the number of unregistered services
-
registerSubscriber
Registers the givenSubscriber. In addition to receiving a list of currentPublishers, theSubscribersSlaveServerwill also receive notifications of newPublishers via the publisherUpdate API.- Parameters:
slave- theNodeIdentifierthat theSubscriberis running onsubscriber- theSubscriberto register- Returns:
- a
ListorSlaveServerXML-RPC API URIs for nodes currently publishing the specified topic
-
unregisterSubscriber
Unregisters the specifiedSubscriber.- Parameters:
slave- theNodeIdentifierwhere the subscriber is runningsubscriber- theSubscriberto unregister- Returns:
- the number of unregistered
Subscribers
-
registerPublisher
Registers the specifiedPublisherDeclaration.- Parameters:
publisherDeclaration- thePublisherDeclarationof thePublisherto register- Returns:
- a
Listof the currentSlaveServerURIs which haveSubscribers for the publishedTopicSystemState
-
unregisterPublisher
Unregisters the specifiedPublisherDeclaration.- Parameters:
publisherIdentifier- thePublisherIdentifierof thePublisherto unregister- Returns:
- the number of unregistered
Publishers
-
lookupNode
- Parameters:
slaveName- theGraphNameof the callernodeName- the name of theSlaveServerto lookup- Returns:
- the
URIof theSlaveServerwith the given name
-
getUri
- Parameters:
slaveName- theNodeIdentifierof the caller- Returns:
- the
URIof theMasterServer
-
lookupService
- Parameters:
callerName- theGraphNameof the callerserviceName- the name of theServiceServerto look up- Returns:
- the
URIof theServiceServerwith the given name.ServiceServeras a result
-
getPublishedTopics
- Parameters:
callerName- theGraphNameof the callersubgraph- the subgraph of the topics- Returns:
- the list of published
TopicDeclarations
-
getTopicTypes
Get aListof allTopicSystemStatemessage types. -
getSystemState
- Parameters:
callerName- theGraphNameof the caller- Returns:
- the current
SystemState
-
getRemoteUri
- Returns:
- the
URIof the remoteXmlRpcServer
-