T
- Type of the DataWriter. Type may be obtained from an external tool
like IDL compiler, or it may be more dynamically constructed
Object that is used with uDDS.public class DataWriter<T> extends Entity<T,SubscriptionData>
DataWriter sets COM_LISTENER_TYPE of super class Entity to SubscriptionData.
Modifier and Type | Field and Description |
---|---|
protected HistoryCache<T> |
hCache
HistoryCache associated with this DataWriter
|
protected RTPSWriter<T> |
rtps_writer
RTPSWriter associated with this DataWriter
|
communicationListeners
Modifier | Constructor and Description |
---|---|
protected |
DataWriter(Participant p,
Class<T> type,
RTPSWriter<T> writer,
HistoryCache<T> hCache)
Constructor with null typeName.
|
protected |
DataWriter(Participant p,
Class<T> type,
String typeName,
RTPSWriter<T> writer,
HistoryCache<T> hCache)
Constructor for DataWriter.
|
Modifier and Type | Method and Description |
---|---|
void |
assertLiveliness()
Asserts liveliness of this DataWriter.
|
void |
close()
Closes this DataWriter.
|
void |
dispose(List<T> instances)
Dispose a List of instances.
|
void |
dispose(T instance)
Dispose a given instance.
|
Set<Instance<T>> |
getInstances()
Gets a Set of instances this DataWriter knows.
|
protected void |
notifyReaders()
Notifies readers of the changes available.
|
void |
registerContentFilter(ContentFilter<T> cf)
Registers a ContentFilter
|
String |
toString() |
void |
write(List<T> samples)
Writes a List of samples to subscribed data readers.
|
void |
write(T sample)
Writes a sample to subscribed data readers.
|
addCommunicationListener, getGuid, getParticipant, getTopicName, getType, getTypeName, removeCommunicationListener
protected final RTPSWriter<T> rtps_writer
protected final HistoryCache<T> hCache
protected DataWriter(Participant p, Class<T> type, RTPSWriter<T> writer, HistoryCache<T> hCache)
p
- Participanttype
- Class of the type this DataWriter manageswriter
- RTPSWriter usedhCache
- History cache usedprotected DataWriter(Participant p, Class<T> type, String typeName, RTPSWriter<T> writer, HistoryCache<T> hCache)
p
- Participant that created this DataWritertype
- Type of this DataWritertypeName
- typeNamewriter
- associated RTPSWriterhCache
- HistoryCache for DataWriterpublic void assertLiveliness()
QosLiveliness
public void write(T sample)
sample
- a Sample to writepublic void write(List<T> samples)
samples
- a List of samplespublic void dispose(T instance)
App Instance history changes to readers 1. write(S1) S1 S1 2. write(S2) S1,S2 S1,S2 3. dispose(S3) -- S1,S2,S3 4. write(S4) S4 S1,S2,S3,S4
instance
- a Sample of type T representing an Instance to disposepublic void dispose(List<T> instances)
instances
- a List of Instances to disposepublic Set<Instance<T>> getInstances()
public void close()
protected void notifyReaders()
public void registerContentFilter(ContentFilter<T> cf)
cf
- ContentFilter to registerCopyright © 2016. All rights reserved.