org.ros.internal.node.xmlrpc
Class SlaveXmlRpcEndpointImpl

java.lang.Object
  extended by org.ros.internal.node.xmlrpc.SlaveXmlRpcEndpointImpl
All Implemented Interfaces:
SlaveXmlRpcEndpoint, XmlRpcEndpoint

public class SlaveXmlRpcEndpointImpl
extends java.lang.Object
implements SlaveXmlRpcEndpoint


Constructor Summary
SlaveXmlRpcEndpointImpl(SlaveServer slave)
           
 
Method Summary
 java.util.List<java.lang.Object> getBusInfo(java.lang.String callerId)
          Retrieve transport/topic connection information.
 java.util.List<java.lang.Object> getBusStats(java.lang.String callerId)
          Retrieve transport/topic statistics.
 java.util.List<java.lang.Object> getMasterUri(java.lang.String callerId)
           
 java.util.List<java.lang.Object> getPid(java.lang.String callerId)
           
 java.util.List<java.lang.Object> getPublications(java.lang.String callerId)
          Retrieve a list of topics that this node publishes.
 java.util.List<java.lang.Object> getSubscriptions(java.lang.String callerId)
           
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, boolean value)
          Callback from master with updated value of subscribed parameter.
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, byte value)
           
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, char value)
           
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, double value)
           
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, int value)
           
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, java.util.List<?> value)
           
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, java.util.Map<?,?> value)
           
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, short value)
           
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, java.lang.String value)
           
 java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId, java.lang.String key, java.util.Vector<?> value)
           
 java.util.List<java.lang.Object> publisherUpdate(java.lang.String callerId, java.lang.String topicName, java.lang.Object[] publishers)
           
 java.util.List<java.lang.Object> requestTopic(java.lang.String callerId, java.lang.String topic, java.lang.Object[] protocols)
          Publisher node API method called by a subscriber node.
 java.util.List<java.lang.Object> shutdown(java.lang.String callerId, java.lang.String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlaveXmlRpcEndpointImpl

public SlaveXmlRpcEndpointImpl(SlaveServer slave)
Method Detail

getBusStats

public java.util.List<java.lang.Object> getBusStats(java.lang.String callerId)
Description copied from interface: SlaveXmlRpcEndpoint
Retrieve transport/topic statistics.

Specified by:
getBusStats in interface SlaveXmlRpcEndpoint
Parameters:
callerId - ROS caller ID.
Returns:
stats in the form of
[publishStats, subscribeStats, serviceStats]

where
publishStats: [[topicName, messageDataSent, pubConnectionData]...]
subscribeStats: [[topicName, subConnectionData]...]
serviceStats: (proposed) [numRequests, bytesReceived, bytesSent]
pubConnectionData: [connectionId, bytesSent, numSent, connected]
subConnectionData: [connectionId, bytesReceived, dropEstimate, connected]
dropEstimate: -1 if no estimate.


getBusInfo

public java.util.List<java.lang.Object> getBusInfo(java.lang.String callerId)
Description copied from interface: SlaveXmlRpcEndpoint
Retrieve transport/topic connection information.

Specified by:
getBusInfo in interface SlaveXmlRpcEndpoint
Parameters:
callerId - ROS caller ID.
Returns:
busInfo in the form of:
[[connectionId1, destinationId1, direction1, transport1, topic1, connected1]... ]

connectionId is defined by the node and is opaque. destinationId is the XMLRPC URI of the destination.

direction is one of 'i', 'o', or 'b' (in, out, both).

transport is the transport type (e.g. 'TCPROS'). topic is the topic name.

connected1 indicates connection status. Note that this field is only provided by slaves written in Python at the moment (cf. rospy/masterslave.py in _TopicImpl.get_stats_info() vs. roscpp/publication.cpp in Publication::getInfo()).


getMasterUri

public java.util.List<java.lang.Object> getMasterUri(java.lang.String callerId)
Specified by:
getMasterUri in interface SlaveXmlRpcEndpoint

shutdown

public java.util.List<java.lang.Object> shutdown(java.lang.String callerId,
                                                 java.lang.String message)
Specified by:
shutdown in interface SlaveXmlRpcEndpoint

getPid

public java.util.List<java.lang.Object> getPid(java.lang.String callerId)
Specified by:
getPid in interface SlaveXmlRpcEndpoint

getSubscriptions

public java.util.List<java.lang.Object> getSubscriptions(java.lang.String callerId)
Specified by:
getSubscriptions in interface SlaveXmlRpcEndpoint

getPublications

public java.util.List<java.lang.Object> getPublications(java.lang.String callerId)
Description copied from interface: SlaveXmlRpcEndpoint
Retrieve a list of topics that this node publishes.

Specified by:
getPublications in interface SlaveXmlRpcEndpoint
Parameters:
callerId - ROS caller ID.
Returns:
topicList is a list of topics published by this node and is of the form [ [topic1, topicType1]...[topicN, topicTypeN]]]

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    boolean value)
Description copied from interface: SlaveXmlRpcEndpoint
Callback from master with updated value of subscribed parameter.

Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint
Parameters:
callerId - ROS caller ID.
key - parameter name, globally resolved
value - new parameter value
Returns:
ignore

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    char value)
Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    byte value)
Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    short value)
Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    int value)
Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    double value)
Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    java.lang.String value)
Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    java.util.List<?> value)
Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    java.util.Vector<?> value)
Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint

paramUpdate

public java.util.List<java.lang.Object> paramUpdate(java.lang.String callerId,
                                                    java.lang.String key,
                                                    java.util.Map<?,?> value)
Specified by:
paramUpdate in interface SlaveXmlRpcEndpoint

publisherUpdate

public java.util.List<java.lang.Object> publisherUpdate(java.lang.String callerId,
                                                        java.lang.String topicName,
                                                        java.lang.Object[] publishers)
Specified by:
publisherUpdate in interface SlaveXmlRpcEndpoint

requestTopic

public java.util.List<java.lang.Object> requestTopic(java.lang.String callerId,
                                                     java.lang.String topic,
                                                     java.lang.Object[] protocols)
Description copied from interface: SlaveXmlRpcEndpoint
Publisher node API method called by a subscriber node. This requests that source allocate a channel for communication. Subscriber provides a list of desired protocols for communication. Publisher returns the selected protocol along with any additional params required for establishing connection. For example, for a TCP/IP-based connection, the source node may return a port number of TCP/IP server.

Specified by:
requestTopic in interface SlaveXmlRpcEndpoint
Parameters:
callerId - ROS caller ID
topic - topic name
protocols - list of desired protocols for communication in order of preference
Returns:
protocolParams or empty list if there are no compatible protocols