A callback for typed data from a port. More...
#include <yarp/os/TypedReaderCallback.h>
Public Member Functions | |
virtual | ~TypedReaderCallback () |
Destructor. More... | |
virtual void | onRead (T &datum) |
Callback method. More... | |
virtual void | onRead (T &datum, const yarp::os::TypedReader< T > &reader) |
Callback method. More... | |
A callback for typed data from a port.
If you want to get your data while leaving the port free to read more in the background, you can create a callback that implements this interface, and tell the port about it using BufferedPort::useCallback(callback) or PortReaderBuffer::useCallback(callback)
Definition at line 30 of file TypedReaderCallback.h.
|
virtual |
Destructor.
Definition at line 19 of file TypedReaderCallback-inl.h.
|
virtual |
Callback method.
datum | data read from a port |
Reimplemented in yarp::os::BufferedPort< yarp::sig::VectorOf >, yarp::os::BufferedPort< yarp::sig::Vector >, yarp::os::BufferedPort< yarp::sig::Sound >, yarp::os::BufferedPort< yarp::sig::ImageOf< yarp::sig::PixelFloat > >, yarp::os::BufferedPort< yarp::sig::FlexImage >, yarp::os::BufferedPort< yarp::rosmsg::visualization_msgs::MarkerArray >, yarp::os::BufferedPort< yarp::rosmsg::tf2_msgs::TFMessage >, yarp::os::BufferedPort< yarp::rosmsg::sensor_msgs::Temperature >, yarp::os::BufferedPort< yarp::rosmsg::sensor_msgs::MagneticField >, yarp::os::BufferedPort< yarp::rosmsg::sensor_msgs::LaserScan >, yarp::os::BufferedPort< yarp::rosmsg::sensor_msgs::JointState >, yarp::os::BufferedPort< yarp::rosmsg::sensor_msgs::Imu >, yarp::os::BufferedPort< yarp::rosmsg::sensor_msgs::Image >, yarp::os::BufferedPort< yarp::rosmsg::sensor_msgs::CameraInfo >, yarp::os::BufferedPort< yarp::rosmsg::nav_msgs::Odometry >, yarp::os::BufferedPort< yarp::rosmsg::nav_msgs::OccupancyGrid >, yarp::os::BufferedPort< yarp::rosmsg::nav_msgs::MapMetaData >, yarp::os::BufferedPort< yarp::rosmsg::geometry_msgs::WrenchStamped >, yarp::os::BufferedPort< yarp::rosmsg::geometry_msgs::PoseStamped >, yarp::os::BufferedPort< yarp::os::PortablePair >, yarp::os::BufferedPort< yarp::os::Bottle >, yarp::os::BufferedPort< yarp::dev::OdometryData >, yarp::os::BufferedPort< yarp::dev::Nav2D::Map2DLocation >, yarp::os::BufferedPort< yarp::dev::LaserScan2D >, yarp::os::BufferedPort< yarp::dev::impl::jointData >, yarp::os::Subscriber< T >, yarp::os::BufferedPort< T >, JoypadControl::JoyPort< T >, yarp::os::BufferedPort< SensorStreamingData >, yarp::os::BufferedPort< ROS_MSG >, yarp::os::BufferedPort< JoyData >, yarp::os::BufferedPort< ImageType >, and yarp::os::BufferedPort< DepthImage >.
Definition at line 24 of file TypedReaderCallback-inl.h.
|
virtual |
Callback method.
Passes along source of callback. By default, this calls the version of onRead that just takes a datum.
datum | data read from a port |
reader | the original port (or delegate object) |
Definition at line 31 of file TypedReaderCallback-inl.h.