Public Member Functions | Static Public Attributes
org.ros.node.topic.Subscriber< T > Interface Reference
Inheritance diagram for org.ros.node.topic.Subscriber< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void addMessageListener (MessageListener< T > messageListener, int limit)
void addMessageListener (MessageListener< T > messageListener)
void addSubscriberListener (SubscriberListener< T > listener)
boolean getLatchMode ()
void shutdown (long timeout, TimeUnit unit)
void shutdown ()

Static Public Attributes

static final String TOPIC_MESSAGE_TYPE_WILDCARD = "*"

Detailed Description

Subscribes to messages of a given type on a given ROS topic.

Author:
ethan.rublee@gmail.com (Ethan Rublee)
damonkohler@google.com (Damon Kohler)
Parameters:
<T>the Subscriber may only subscribe to messages of this type

Definition at line 33 of file Subscriber.java.


Member Function Documentation

void org.ros.node.topic.Subscriber< T >.addMessageListener ( MessageListener< T >  messageListener,
int  limit 
)

Adds a MessageListener to be called when new messages are received.

The MessageListener will be executed serially in its own thread. If the MessageListener processes new messages slower than they arrive, new messages will be queued up to the specified limit. Older messages are removed from the buffer when the buffer limit is exceeded.

Parameters:
messageListenerthis MessageListener will be called when new messages are received
limitthe maximum number of messages to buffer
void org.ros.node.topic.Subscriber< T >.addMessageListener ( MessageListener< T >  messageListener)

Adds a MessageListener with a limit of 1.

See also:
#addMessageListener(MessageListener, int)
void org.ros.node.topic.Subscriber< T >.addSubscriberListener ( SubscriberListener< T >  listener)

Add a new lifecycle listener to the subscriber.

Parameters:
listenerThe listener to add.
boolean org.ros.node.topic.Subscriber< T >.getLatchMode ( )
Returns:
 true 
if the Publisher of this Subscriber's topic is latched,
 false 
otherwise
void org.ros.node.topic.Subscriber< T >.shutdown ( long  timeout,
TimeUnit  unit 
)

Shuts down and unregisters the Subscriber. using the default timeout Shutdown is delayed by at most the specified timeout to allow SubscriberListener#onShutdown(Subscriber) callbacks to complete.

SubscriberListener#onShutdown(Subscriber) callbacks are executed in separate threads.

void org.ros.node.topic.Subscriber< T >.shutdown ( )

Shuts down and unregisters the Subscriber using the default timeout for SubscriberListener#onShutdown(Subscriber) callbacks.

SubscriberListener#onShutdown(Subscriber) callbacks are executed in separate threads.

See also:
Subscriber::shutdown(long, TimeUnit)

Member Data Documentation

final String org.ros.node.topic.Subscriber< T >.TOPIC_MESSAGE_TYPE_WILDCARD = "*" [static]

The message type given when a Subscriber chooses not to commit to a specific message type.

Definition at line 39 of file Subscriber.java.


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


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