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 |
![]() | |
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 66 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 122 of file PortWriterBuffer.h.
|
inlineoverridevirtual |
Implements yarp::os::PortWriterBufferBase.
Definition at line 143 of file PortWriterBuffer.h.
|
inline |
A synonym of PortWriterBuffer::prepare.
Definition at line 99 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 113 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 78 of file PortWriterBuffer.h.
|
inline |
Give the last prepared object back to YARP without writing it.
Definition at line 90 of file PortWriterBuffer.h.
|
inline |
Wait until any pending writes are done.
Definition at line 138 of file PortWriterBuffer.h.
|
inline |
Try to write the last buffer returned by PortWriterBuffer::get.
Definition at line 130 of file PortWriterBuffer.h.