![JAR search and dependency download from the Maven repository](/logo.png)
net.sf.jrtps.udds.DataReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jrtps Show documentation
Show all versions of jrtps Show documentation
jRTPS - An implementation of RTPS protocol by OMG
package net.sf.jrtps.udds;
import net.sf.jrtps.rtps.RTPSReader;
import net.sf.jrtps.rtps.SampleListener;
/**
* This class represents a strongly typed DataReader in spirit of DDS
* specification.
*
* @author mcr70
*
* @param
* Type of the DataReader. 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 DataReader extends Entity {
private RTPSReader rtps_reader;
/**
* Package access. This class is only instantiated by Participant class.
*
* @param topicName
*/
DataReader(Participant p, Class type, RTPSReader reader) {
super(p, type, reader.getTopicName());
this.rtps_reader = reader;
}
/**
* Adds a new listener for this DataReader.
*
* @param listener
* a DataListener to add.
*/
public void addListener(SampleListener listener) {
rtps_reader.addListener(listener);
}
/**
* Removes a listener.
*
* @param listener
* DataListener to remove
*/
public void removeListener(SampleListener listener) {
rtps_reader.removeListener(listener);
}
RTPSReader getRTPSReader() {
return rtps_reader;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy