YARP
Yet Another Robot Platform
yarp::wire_rep_utils::RosWireImage Class Reference

As far as YARP is concerned, on the wire to/from ROS a raw image has: More...

#include <yarp/wire_rep_utils/WireImage.h>

+ Inheritance diagram for yarp::wire_rep_utils::RosWireImage:

Public Member Functions

 RosWireImage ()
 
void init (const yarp::sig::FlexImage &img, const std::string &frame)
 
void update (const yarp::sig::FlexImage *img, int seq, double t)
 
size_t length () const override
 
size_t headerLength () const override
 
size_t length (size_t index) const override
 
const char * data (size_t index) const override
 
yarp::os::PortReadergetReplyHandler () override
 
yarp::os::PortablegetReference () override
 
bool dropRequested () override
 
void startWrite () const override
 Call when writing is about to begin. More...
 
void stopWrite () const override
 Call when all writing is finished. More...
 
- Public Member Functions inherited from yarp::os::SizedWriter
virtual ~SizedWriter ()
 
virtual void write (OutputStream &os)
 
bool write (ConnectionWriter &connection) const override
 Write this object to a network connection. More...
 
virtual void clear ()
 
- Public Member Functions inherited from yarp::os::PortWriter
virtual ~PortWriter ()
 Destructor. More...
 
virtual void onCompletion () const
 This is called when the port has finished all writing operations. More...
 
virtual void onCommencement () const
 This is called when the port is about to begin writing operations. More...
 
virtual yarp::os::Type getWriteType () const
 

Detailed Description

As far as YARP is concerned, on the wire to/from ROS a raw image has:

  • a variable 12 byte header: seq secs nsecs
  • a constant byte sequence with information about the image source
  • a 4 byte header with the length of the binary image payload
  • the binary image payload The "constant" sequence should change if image size or other details change but we optimize for the truly constant case.

Definition at line 61 of file WireImage.h.

Constructor & Destructor Documentation

◆ RosWireImage()

yarp::wire_rep_utils::RosWireImage::RosWireImage ( )
inline

Definition at line 67 of file WireImage.h.

Member Function Documentation

◆ data()

const char* yarp::wire_rep_utils::RosWireImage::data ( size_t  index) const
inlineoverridevirtual

Implements yarp::os::SizedWriter.

Definition at line 148 of file WireImage.h.

◆ dropRequested()

bool yarp::wire_rep_utils::RosWireImage::dropRequested ( )
inlineoverridevirtual

Implements yarp::os::SizedWriter.

Definition at line 168 of file WireImage.h.

◆ getReference()

yarp::os::Portable* yarp::wire_rep_utils::RosWireImage::getReference ( )
inlineoverridevirtual

Implements yarp::os::SizedWriter.

Definition at line 166 of file WireImage.h.

◆ getReplyHandler()

yarp::os::PortReader* yarp::wire_rep_utils::RosWireImage::getReplyHandler ( )
inlineoverridevirtual

Implements yarp::os::SizedWriter.

Definition at line 164 of file WireImage.h.

◆ headerLength()

size_t yarp::wire_rep_utils::RosWireImage::headerLength ( ) const
inlineoverridevirtual

Implements yarp::os::SizedWriter.

Definition at line 127 of file WireImage.h.

◆ init()

void yarp::wire_rep_utils::RosWireImage::init ( const yarp::sig::FlexImage img,
const std::string &  frame 
)
inline

Definition at line 72 of file WireImage.h.

◆ length() [1/2]

size_t yarp::wire_rep_utils::RosWireImage::length ( ) const
inlineoverridevirtual

Implements yarp::os::SizedWriter.

Definition at line 125 of file WireImage.h.

◆ length() [2/2]

size_t yarp::wire_rep_utils::RosWireImage::length ( size_t  index) const
inlineoverridevirtual

Implements yarp::os::SizedWriter.

Definition at line 129 of file WireImage.h.

◆ startWrite()

void yarp::wire_rep_utils::RosWireImage::startWrite ( ) const
inlineoverridevirtual

Call when writing is about to begin.

Implements yarp::os::SizedWriter.

Definition at line 170 of file WireImage.h.

◆ stopWrite()

void yarp::wire_rep_utils::RosWireImage::stopWrite ( ) const
inlineoverridevirtual

Call when all writing is finished.

Implements yarp::os::SizedWriter.

Definition at line 172 of file WireImage.h.

◆ update()

void yarp::wire_rep_utils::RosWireImage::update ( const yarp::sig::FlexImage img,
int  seq,
double  t 
)
inline

Definition at line 118 of file WireImage.h.


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