#include <yarp/os/impl/PortCoreAdapter.h>
Public Member Functions | |
PortCoreAdapter (Port &owner) | |
void | openable () |
void | alertOnRead () |
void | alertOnWrite () |
void | alertOnRpc () |
void | setReadOnly () |
void | setWriteOnly () |
void | setRpc () |
void | finishReading () |
void | finishWriting () |
void | resumeFull () |
bool | read (ConnectionReader &reader) override |
Callback for data. | |
bool | read (PortReader &reader, bool willReply=false) |
bool | reply (PortWriter &writer, bool drop, bool interrupted) |
void | configReader (PortReader &reader) |
void | configAdminReader (PortReader &reader) |
void | configReadCreator (PortReaderCreator &creator) |
void | configWaitAfterSend (bool waitAfterSend) |
bool | configCallbackLock (std::mutex *lock) |
bool | unconfigCallbackLock () |
PortReader * | checkPortReader () |
PortReader * | checkAdminPortReader () |
PortReaderCreator * | checkReadCreator () |
int | checkWaitAfterSend () |
bool | isOpened () |
void | setOpen (bool opened) |
void | includeNodeInName (bool flag) |
Public Member Functions inherited from yarp::os::impl::PortCore | |
PortCore () | |
Constructor. | |
~PortCore () | |
Destructor. | |
bool | addOutput (const std::string &dest, void *id, yarp::os::OutputStream *os, bool onlyIfNeeded=false) |
Add an output connection to this port. | |
void | addOutput (OutputProtocol *op) |
Add another output to the port. | |
void | removeInput (const std::string &src, void *id, yarp::os::OutputStream *os) |
Remove an input connection. | |
void | removeOutput (const std::string &dest, void *id, yarp::os::OutputStream *os) |
Remove an output connection. | |
bool | removeIO (const Route &route, bool synch=false) |
Remove any connection matching the supplied route. | |
void | describe (void *id, yarp::os::OutputStream *os) |
Produce a text description of the port and its connections. | |
void | describe (yarp::os::PortReport &reporter) |
Generate a description of the connections associated with the port. | |
bool | readBlock (ConnectionReader &reader, void *id, yarp::os::OutputStream *os) |
Read a block of regular payload data. | |
bool | adminBlock (ConnectionReader &reader, void *id) |
Read a block of administrative data. | |
void | setName (const std::string &name) |
Set the name of this port. | |
std::string | getName () |
void | setEnvelope (const std::string &envelope) |
Set some envelope information to pass along with a message without actually being part of the message. | |
bool | setEnvelope (yarp::os::PortWriter &envelope) |
Set some extra meta data to pass along with the message. | |
std::string | getEnvelope () |
bool | getEnvelope (yarp::os::PortReader &envelope) |
Get any meta data associated with the last message received. | |
void | report (const yarp::os::PortInfo &info) |
Handle a port event (connection, disconnection, etc) Generate a description of the connections associated with the port. | |
void | reportUnit (PortCoreUnit *unit, bool active) |
Called by a connection handler with active=true just after it is fully configured, and with active=false just before it shuts itself down. | |
void | setFlags (unsigned int flags) |
Configure the port to meet certain restrictions in behavior. | |
void | setContactable (Contactable *contactable) |
unsigned int | getFlags () |
Check current configuration of port. | |
bool | listen (const Contact &address, bool shouldAnnounce=true) |
Begin service at a given address. | |
bool | isWriting () |
Check if a message is currently being sent. | |
int | getInputCount () |
Check how many input connections there are. | |
int | getOutputCount () |
Check how many output connections there are. | |
void | setReadHandler (yarp::os::PortReader &reader) |
Set a callback for incoming data. | |
void | setAdminReadHandler (yarp::os::PortReader &reader) |
Set a callback for incoming administrative messages. | |
void | setReadCreator (yarp::os::PortReaderCreator &creator) |
Set a callback for creating callbacks for incoming data. | |
void | setWaitBeforeSend (bool waitBeforeSend) |
Upon being asked to send a message, should we wait for any existing message to be sent to all destinations? | |
void | setWaitAfterSend (bool waitAfterSend) |
After sending a message, should we wait for it to be sent to all destinations before returning? | |
bool | start () override |
Begin main thread. | |
bool | manualStart (const char *sourceName) |
Start up the port, but without a main thread. | |
bool | send (const yarp::os::PortWriter &writer, yarp::os::PortReader *reader=nullptr, const yarp::os::PortWriter *callback=nullptr) |
Send a normal message. | |
bool | sendHelper (const yarp::os::PortWriter &writer, int mode, yarp::os::PortReader *reader=nullptr, const yarp::os::PortWriter *callback=nullptr) |
Send a message with a specific mode (normal or log). | |
void | close () override |
Shut down port. | |
void | run () override |
The body of the main thread. | |
int | getEventCount () |
A diagnostic for testing purposes. | |
const Contact & | getAddress () const |
Get the address associated with the port. | |
void | resetPortName (const std::string &str) |
yarp::os::PortReaderCreator * | getReadCreator () |
Get the creator of callbacks. | |
void | notifyCompletion (void *tracker) |
Call the right onCompletion() after sending message. | |
void | setControlRegistration (bool flag) |
Normally the port will unregister its name with the name server when shutting down. | |
void | interrupt () |
Prepare the port to be shut down. | |
void | resume () |
Undo an interrupt() | |
void | setReportCallback (yarp::os::PortReport *reporter) |
Set a callback to be notified of changes in port status. | |
void | resetReportCallback () |
Reset the callback to be notified of changes in port status. | |
bool | isListening () const |
bool | isManual () const |
bool | isInterrupted () const |
void | setTimeout (float timeout) |
Property * | acquireProperties (bool readOnly) |
void | releaseProperties (Property *prop) |
bool | setCallbackLock (std::mutex *mutex=nullptr) |
bool | removeCallbackLock () |
bool | lockCallback () |
bool | tryLockCallback () |
void | unlockCallback () |
yarp::os::impl::PortDataModifier & | getPortModifier () |
void | checkType (PortReader &reader) |
yarp::os::Type | getType () |
void | promiseType (const Type &typ) |
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 () |
Public Member Functions inherited from yarp::os::PortReader | |
virtual | ~PortReader () |
Destructor. | |
virtual Type | getReadType () const |
Public Attributes | |
bool | includeNode { false } |
bool | commitToRead { false } |
bool | commitToWrite { false } |
bool | commitToRpc { false } |
bool | active { false } |
std::mutex * | recCallbackLock { nullptr } |
bool | haveCallbackLock { false } |
Public Attributes inherited from yarp::os::impl::ThreadImpl | |
long | tid {-1} |
std::thread::id | id |
Additional Inherited Members | |
Static Public Member Functions inherited from yarp::os::impl::ThreadImpl | |
static int | getCount () |
static long int | getKeyOfCaller () |
static void | yield () |
Definition at line 17 of file PortCoreAdapter.h.
yarp::os::impl::PortCoreAdapter::PortCoreAdapter | ( | Port & | owner | ) |
Definition at line 17 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::alertOnRead | ( | ) |
Definition at line 30 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::alertOnRpc | ( | ) |
Definition at line 40 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::alertOnWrite | ( | ) |
Definition at line 35 of file PortCoreAdapter.cpp.
yarp::os::PortReader * yarp::os::impl::PortCoreAdapter::checkAdminPortReader | ( | ) |
Definition at line 286 of file PortCoreAdapter.cpp.
yarp::os::PortReader * yarp::os::impl::PortCoreAdapter::checkPortReader | ( | ) |
Definition at line 281 of file PortCoreAdapter.cpp.
yarp::os::PortReaderCreator * yarp::os::impl::PortCoreAdapter::checkReadCreator | ( | ) |
Definition at line 291 of file PortCoreAdapter.cpp.
int yarp::os::impl::PortCoreAdapter::checkWaitAfterSend | ( | ) |
Definition at line 296 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::configAdminReader | ( | PortReader & | reader | ) |
Definition at line 244 of file PortCoreAdapter.cpp.
bool yarp::os::impl::PortCoreAdapter::configCallbackLock | ( | std::mutex * | lock | ) |
Definition at line 267 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::configReadCreator | ( | PortReaderCreator & | creator | ) |
Definition at line 252 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::configReader | ( | PortReader & | reader | ) |
Definition at line 232 of file PortCoreAdapter.cpp.
Definition at line 258 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::finishReading | ( | ) |
Definition at line 60 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::finishWriting | ( | ) |
Definition at line 71 of file PortCoreAdapter.cpp.
Definition at line 312 of file PortCoreAdapter.cpp.
bool yarp::os::impl::PortCoreAdapter::isOpened | ( | ) |
Definition at line 302 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::openable | ( | ) |
Definition at line 22 of file PortCoreAdapter.cpp.
|
overridevirtual |
Callback for data.
Reimplemented from yarp::os::impl::PortCore.
Definition at line 97 of file PortCoreAdapter.cpp.
bool yarp::os::impl::PortCoreAdapter::read | ( | PortReader & | reader, |
bool | willReply = false |
||
) |
Definition at line 173 of file PortCoreAdapter.cpp.
bool yarp::os::impl::PortCoreAdapter::reply | ( | PortWriter & | writer, |
bool | drop, | ||
bool | interrupted | ||
) |
Definition at line 211 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::resumeFull | ( | ) |
Definition at line 87 of file PortCoreAdapter.cpp.
Definition at line 307 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::setReadOnly | ( | ) |
Definition at line 45 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::setRpc | ( | ) |
Definition at line 55 of file PortCoreAdapter.cpp.
void yarp::os::impl::PortCoreAdapter::setWriteOnly | ( | ) |
Definition at line 50 of file PortCoreAdapter.cpp.
bool yarp::os::impl::PortCoreAdapter::unconfigCallbackLock | ( | ) |
Definition at line 274 of file PortCoreAdapter.cpp.
Definition at line 49 of file PortCoreAdapter.h.
Definition at line 46 of file PortCoreAdapter.h.
Definition at line 48 of file PortCoreAdapter.h.
Definition at line 47 of file PortCoreAdapter.h.
Definition at line 51 of file PortCoreAdapter.h.
Definition at line 45 of file PortCoreAdapter.h.
std::mutex* yarp::os::impl::PortCoreAdapter::recCallbackLock { nullptr } |
Definition at line 50 of file PortCoreAdapter.h.