public class PublisherFactory
extends java.lang.Object
Publisher instances.| Constructor and Description |
|---|
PublisherFactory(NodeIdentifier nodeIdentifier,
TopicParticipantManager topicParticipantManager,
org.ros.message.MessageFactory messageFactory,
java.util.concurrent.ScheduledExecutorService executorService) |
| Modifier and Type | Method and Description |
|---|---|
<T> Publisher<T> |
newOrExisting(TopicDeclaration topicDeclaration,
org.ros.message.MessageSerializer<T> messageSerializer)
Gets or creates a
Publisher instance. |
public PublisherFactory(NodeIdentifier nodeIdentifier, TopicParticipantManager topicParticipantManager, org.ros.message.MessageFactory messageFactory, java.util.concurrent.ScheduledExecutorService executorService)
public <T> Publisher<T> newOrExisting(TopicDeclaration topicDeclaration, org.ros.message.MessageSerializer<T> messageSerializer)
Publisher instance. Publishers are cached
and reused per topic. When a new Publisher is generated, it is
registered with the master.T - the message type associated with the PublishertopicDeclaration - TopicDeclaration that is being publishedmessageSerializer - the MessageSerializer used for published messagesPublisher instance