Buffer outgoing data to a port. More...
#include <yarp/os/PortWriterBuffer.h>
Public Member Functions | |
T & | prepare () |
Access the object which will be transmitted by the next call to PortWriterBuffer::write. More... | |
bool | unprepare () |
Give the last prepared object back to YARP without writing it. More... | |
T & | get () |
A synonym of PortWriterBuffer::prepare. More... | |
int | getCount () |
Check the number of buffers currently in use for communication. More... | |
void | attach (Port &port) |
Set the Port to which objects will be written. More... | |
void | write (bool forceStrict=false) |
Try to write the last buffer returned by PortWriterBuffer::get. More... | |
void | waitForWrite () |
Wait until any pending writes are done. More... | |
virtual PortWriterWrapper * | create (PortWriterBufferManager &man, void *tracker) override |
Public Member Functions inherited from yarp::os::PortWriterBufferBase | |
PortWriterBufferBase () | |
virtual | ~PortWriterBufferBase () |
const void * | getContent () const |
bool | releaseContent () |
int | getCount () |
void | attach (Port &port) |
void | detach () |
void | write (bool strict) |
void | waitForWrite () |
Buffer outgoing data to a port.
An instance of this class can be associated with a Port by calling attach(). "T" should be a PortWriter class, such as Bottle.
Definition at line 69 of file PortWriterBuffer.h.
|
inline |
Set the Port to which objects will be written.
port | the Port to which objects will be written |
Definition at line 125 of file PortWriterBuffer.h.
|
inlineoverridevirtual |
Implements yarp::os::PortWriterBufferBase.
Definition at line 146 of file PortWriterBuffer.h.
|
inline |
A synonym of PortWriterBuffer::prepare.
Definition at line 102 of file PortWriterBuffer.h.
|
inline |
Check the number of buffers currently in use for communication.
This may increase as PortWriterBuffer::read is called. It can decrease at any time as buffers are successfully transmitted and made available for reuse.
Definition at line 116 of file PortWriterBuffer.h.
|
inline |
Access the object which will be transmitted by the next call to PortWriterBuffer::write.
The object can safely be modified by the user of this class, to prepare it. Extra objects will be created or reused as necessary depending on the state of communication with the output(s) of the port.
Definition at line 81 of file PortWriterBuffer.h.
|
inline |
Give the last prepared object back to YARP without writing it.
Definition at line 93 of file PortWriterBuffer.h.
|
inline |
Wait until any pending writes are done.
Definition at line 141 of file PortWriterBuffer.h.
|
inline |
Try to write the last buffer returned by PortWriterBuffer::get.
Definition at line 133 of file PortWriterBuffer.h.