YARP  2.3.70.1
Yet Another Robot Platform
yarp::os::PortWriter Class Referenceabstract

Interface implemented by all objects that can write themselves to the network, such as Bottle objects. More...

#include <yarp/os/PortWriter.h>

+ Inheritance diagram for yarp::os::PortWriter:

Public Member Functions

virtual ~PortWriter ()
 Destructor. More...
 
virtual bool write (ConnectionWriter &writer)=0
 Write this object to a network connection. More...
 
virtual void onCompletion ()
 This is called when the port has finished all writing operations. More...
 
virtual void onCommencement ()
 This is called when the port is about to begin writing operations. More...
 
virtual Type getWriteType ()
 

Detailed Description

Interface implemented by all objects that can write themselves to the network, such as Bottle objects.

See also
Port, PortReader

Definition at line 24 of file PortWriter.h.

Constructor & Destructor Documentation

◆ ~PortWriter()

yarp::os::PortWriter::~PortWriter ( )
virtual

Destructor.

Definition at line 10 of file PortWriter.cpp.

Member Function Documentation

◆ getWriteType()

virtual Type yarp::os::PortWriter::getWriteType ( )
inlinevirtual

Definition at line 57 of file PortWriter.h.

◆ onCommencement()

void yarp::os::PortWriter::onCommencement ( )
virtual

This is called when the port is about to begin writing operations.

After this point, the write method may be called zero, once, or many times by YARP depending on the mix of formats and protocols in use.

Reimplemented in yarp::os::impl::BottleImpl, and yarp::os::Bottle.

Definition at line 16 of file PortWriter.cpp.

◆ onCompletion()

void yarp::os::PortWriter::onCompletion ( )
virtual

This is called when the port has finished all writing operations.

Reimplemented in yarp::os::PortablePair< HEAD, BODY >.

Definition at line 13 of file PortWriter.cpp.

◆ write()

virtual bool yarp::os::PortWriter::write ( ConnectionWriter writer)
pure virtual

Write this object to a network connection.

Override this for your particular class. Be aware that depending on the nature of the connections a port has, and what protocol they use, and how efficient the YARP implementation is, this method may be called once, twice, or many times, as the result of a single call to Port::write

Parameters
writeran interface to the network connection for writing
Returns
true iff the object is successfully written

Implemented in yarp::os::impl::ConnectionRecorder, jointData::Editor, yarp::sig::Vector, yarp::os::impl::BottleImpl, visualization_msgs_Marker, sensor_msgs_CameraInfo, yarp::os::Property, yarp::sig::Matrix, sensor_msgs_LaserScan, yarp::sig::Image, yarp::os::impl::BufferedConnectionWriter, yarp::os::Bottle, yarp::dev::MapGrid2D, yarp::os::Value, sensor_msgs_Imu, sensor_msgs_JointState, sensor_msgs_Image, sensor_msgs_PointCloud2, sensor_msgs_RegionOfInterest, nav_msgs_MapMetaData, geometry_msgs_Quaternion, std_msgs_ColorRGBA, nav_msgs_OccupancyGrid, sensor_msgs_PointField, yarp::os::ManagedBytes, yarp::math::Quaternion, std_msgs_Header, geometry_msgs_TransformStamped, geometry_msgs_Vector3, geometry_msgs_Point, jointData, yarp::sig::Sound, yarp::math::Vec2D< T >, TickDuration, geometry_msgs_Transform, visualization_msgs_MarkerArray, geometry_msgs_Wrench, geometry_msgs_WrenchStamped, geometry_msgs_Pose, tf_tfMessage, tf2_msgs_TFMessage, yarp::os::Stamp, TickTime, yarp::os::impl::Storable, yarp::math::Vec2D< T >, yarp::os::PortablePair< HEAD, BODY >, JoyData, yarp::math::Vec2D< T >, yarp::sig::VectorBase, yarp::os::BinPortable< T >, yarp::os::SizedWriter, yarp::os::idl::UnwrappedView< T >, yarp::os::SystemInfoSerializer, yarp::os::impl::PortCommand, yarp::os::idl::Unwrapped< T >, and yarp::os::Portable.


The documentation for this class was generated from the following files: