Manager for a single output from a port. More...
#include <yarp/os/impl/PortCoreOutputUnit.h>
Public Member Functions | |
PortCoreOutputUnit (PortCore &owner, int index, OutputProtocol *op) | |
Constructor. | |
~PortCoreOutputUnit () override | |
Destructor. | |
bool | start () override |
Prepare to serve this output. | |
void | run () override |
The body of a thread managing background sends. | |
virtual void | runSingleThreaded () |
Perform send operations without a separate thread. | |
bool | isOutput () override |
void | close () override |
bool | isFinished () override |
const std::string & | getName () |
Route | getRoute () override |
void * | send (const yarp::os::PortWriter &writer, yarp::os::PortReader *reader, const yarp::os::PortWriter *callback, void *tracker, const std::string &envelopeString, bool waitAfter, bool waitBefore, bool *gotReply) override |
Send a message on the connection. | |
void * | takeTracker () override |
Reacquire a tracker previously passed via send(). | |
bool | isBusy () override |
void | setCarrierParams (const yarp::os::Property ¶ms) override |
Set arbitrary parameters for this connection. | |
void | getCarrierParams (yarp::os::Property ¶ms) override |
OutputProtocol * | getOutPutProtocol () |
Public Member Functions inherited from yarp::os::impl::PortCoreUnit | |
PortCoreUnit (PortCore &owner, int index) | |
Constructor. | |
virtual | ~PortCoreUnit () |
Destructor. | |
virtual bool | isInput () |
bool | isDoomed () |
void | setDoomed () |
Request that this connection be shut down as soon as possible. | |
virtual bool | interrupt () |
Interrupt the connection. | |
void | setMode () |
Check the carrier used for the connection, and see if it has a "log" modifier. | |
int | getIndex () |
std::string | getMode (bool *hasMode=nullptr) |
Read the "mode" of the connection - basically, whether it is used for logging or not. | |
bool | isPupped () const |
std::string | getPupString () const |
void | setPupped (const std::string &pupString) |
Tag this connection as having been created by a publisherUpdate message to the port's administrative interface, and record the name of the target it services exactly as described in that message. | |
Public Member Functions inherited from yarp::os::impl::ThreadImpl | |
virtual | ~ThreadImpl () |
int | join (double seconds=-1) |
void | askToClose () |
bool | isClosing () |
bool | isRunning () |
virtual void | beforeStart () |
virtual void | afterStart (bool success) |
virtual bool | threadInit () |
virtual void | threadRelease () |
long int | getKey () |
void | notify (bool s) |
void | notifyOpened (bool s) |
void | synchroWait () |
void | synchroPost () |
int | setPriority (int priority=-1, int policy=-1) |
int | getPriority () |
int | getPolicy () |
long | getTid () |
Additional Inherited Members | |
Static Public Member Functions inherited from yarp::os::impl::ThreadImpl | |
static int | getCount () |
static long int | getKeyOfCaller () |
static void | yield () |
Public Attributes inherited from yarp::os::impl::ThreadImpl | |
long | tid {-1} |
std::thread::id | id |
Protected Member Functions inherited from yarp::os::impl::PortCoreUnit | |
PortCore & | getOwner () |
Manager for a single output from a port.
Associated with a PortCore object.
Definition at line 23 of file PortCoreOutputUnit.h.
PortCoreOutputUnit::PortCoreOutputUnit | ( | PortCore & | owner, |
int | index, | ||
OutputProtocol * | op | ||
) |
Constructor.
owner | the port we call home |
index | an id for this connection |
op | the protocol object used to read/write to connection |
Definition at line 25 of file PortCoreOutputUnit.cpp.
|
override |
Destructor.
Definition at line 45 of file PortCoreOutputUnit.cpp.
|
inlineoverridevirtual |
Reimplemented from yarp::os::impl::ThreadImpl.
Definition at line 65 of file PortCoreOutputUnit.h.
|
overridevirtual |
[out] |
parameters set by setCarrierParams()
Reimplemented from yarp::os::impl::PortCoreUnit.
Definition at line 431 of file PortCoreOutputUnit.cpp.
|
inline |
Definition at line 76 of file PortCoreOutputUnit.h.
OutputProtocol * PortCoreOutputUnit::getOutPutProtocol | ( | ) |
Definition at line 438 of file PortCoreOutputUnit.cpp.
|
overridevirtual |
Reimplemented from yarp::os::impl::PortCoreUnit.
Definition at line 243 of file PortCoreOutputUnit.cpp.
|
overridevirtual |
Reimplemented from yarp::os::impl::PortCoreUnit.
Definition at line 419 of file PortCoreOutputUnit.cpp.
|
inlineoverridevirtual |
Reimplemented from yarp::os::impl::PortCoreUnit.
Definition at line 71 of file PortCoreOutputUnit.h.
|
inlineoverridevirtual |
Reimplemented from yarp::os::impl::PortCoreUnit.
Definition at line 59 of file PortCoreOutputUnit.h.
|
overridevirtual |
The body of a thread managing background sends.
Reimplemented from yarp::os::impl::ThreadImpl.
Definition at line 75 of file PortCoreOutputUnit.cpp.
|
virtual |
Perform send operations without a separate thread.
Definition at line 117 of file PortCoreOutputUnit.cpp.
|
overridevirtual |
Send a message on the connection.
Does nothing for an input connection.
writer | the message the send |
reader | an optional receiver for a reply |
callback | an optional receiver for PortWriter::onCommencement and PortWriter::onCompletion calls |
tracker | an opaque pointer to an object doing memory management for the message. Once this pointer is passed to the send() method, it is "owned" until returned by a future call to send(), or by a call to takeTracker(). |
envelope | some optional text to pass along with the message |
waitAfter | true if we should wait for the send to complete before the method returns |
waitBefore | true if we should wait for any in-progress send to complete before stating this one @parm gotReply if non-nullptr, this variable will be set to true if a reply was received |
Reimplemented from yarp::os::impl::PortCoreUnit.
Definition at line 344 of file PortCoreOutputUnit.cpp.
|
overridevirtual |
Set arbitrary parameters for this connection.
params | the parameters to set |
Reimplemented from yarp::os::impl::PortCoreUnit.
Definition at line 424 of file PortCoreOutputUnit.cpp.
|
overridevirtual |
Prepare to serve this output.
A thread will start if a call to send() has been made with options that require a thread.
Reimplemented from yarp::os::impl::ThreadImpl.
Definition at line 51 of file PortCoreOutputUnit.cpp.
|
overridevirtual |
Reacquire a tracker previously passed via send().
This method may need to wait a send operation to complete before the tracker can be safely accessed.
Reimplemented from yarp::os::impl::PortCoreUnit.
Definition at line 407 of file PortCoreOutputUnit.cpp.