YARP  2.3.72
Yet Another Robot Platform
yarp::os::Portable Class Referenceabstract

This is a base class for objects that can be both read from and be written to the YARP network. More...

#include <yarp/os/Portable.h>

+ Inheritance diagram for yarp::os::Portable:

Public Member Functions

virtual bool read (ConnectionReader &reader) override=0
 Read this object from a network connection. More...
virtual bool write (ConnectionWriter &writer) override=0
 Write this object to a network connection. More...
virtual Type getType ()
- Public Member Functions inherited from yarp::os::PortReader
virtual ~PortReader ()
 Destructor. More...
virtual Type getReadType ()
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
 Destructor. 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 ()

Static Public Member Functions

static bool copyPortable (PortWriter &writer, PortReader &reader)
 Copy one portable to another, via writing and reading. More...

Detailed Description

This is a base class for objects that can be both read from and be written to the YARP network.

It is a simple union of PortReader and PortWriter.

port_power/TargetVer2.h, and port_power/TargetVer3.h.

Definition at line 26 of file Portable.h.

Member Function Documentation

◆ copyPortable()

bool yarp::os::Portable::copyPortable ( PortWriter writer,
PortReader reader 

Copy one portable to another, via writing and reading.

true iff writer.write and reader.read both succeeded.

Definition at line 10 of file Portable.cpp.

◆ getType()

◆ read()

virtual bool yarp::os::Portable::read ( ConnectionReader reader)
overridepure virtual

◆ write()

virtual bool yarp::os::Portable::write ( ConnectionWriter writer)
overridepure 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

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

Implements yarp::os::PortWriter.

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

port_power/TargetVer2.h, and port_power/TargetVer3.h.

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