IDL-friendly object state, used in YARP to set up a port association. More...
#include <yarp/os/WireLink.h>
Classes | |
class | Private |
Public Member Functions | |
WireLink () | |
~WireLink () | |
bool | isValid () const |
Check if there is an association of some kind set up for this WireLink. | |
bool | setOwner (yarp::os::PortReader &owner) |
Set the owner of this WireLink. | |
bool | attachAsClient (yarp::os::UnbufferedContactable &port) |
Tag this WireLink as a client, sending data via the specified port. | |
bool | attachAsClient (yarp::os::PortReader &reader) |
Tag this WireLink as a client, sending data via the specified reader. | |
bool | attachAsServer (yarp::os::UnbufferedContactable &port) |
Tag this WireLink as a server, receiving commands via the specified port. | |
bool | setStreamingMode (bool streaming) |
For a client WireLink, control whether replies to commands are expected. | |
bool | write (PortWriter &writer) |
Write a message to the associated port or reader. | |
bool | write (const PortWriter &writer, PortReader &reader) const |
Write a message to the associated port or reader, and read a reply. | |
bool | callback (PortWriter &writer, PortReader &reader, const std::string &tag="") |
Put a message in a stack to call later, asynchronously. | |
bool | canWrite () const |
bool | canRead () const |
IDL-friendly object state, used in YARP to set up a port association.
Definition at line 22 of file WireLink.h.
WireLink::WireLink | ( | ) |
Definition at line 59 of file WireLink.cpp.
WireLink::~WireLink | ( | ) |
Definition at line 64 of file WireLink.cpp.
bool WireLink::attachAsClient | ( | yarp::os::PortReader & | reader | ) |
Tag this WireLink as a client, sending data via the specified reader.
reader | the reader to use when sending data. |
Definition at line 89 of file WireLink.cpp.
bool WireLink::attachAsClient | ( | yarp::os::UnbufferedContactable & | port | ) |
Tag this WireLink as a client, sending data via the specified port.
port | the port to use when sending data. |
Definition at line 80 of file WireLink.cpp.
bool WireLink::attachAsServer | ( | yarp::os::UnbufferedContactable & | port | ) |
Tag this WireLink as a server, receiving commands via the specified port.
port | the port to monitor for commands. |
Definition at line 98 of file WireLink.cpp.
bool WireLink::callback | ( | PortWriter & | writer, |
PortReader & | reader, | ||
const std::string & | tag = "" |
||
) |
Put a message in a stack to call later, asynchronously.
Used in implementation of thrift "oneway" messages.
writer | message to send |
reader | where to send the message |
tag | string to prefix the message with |
Definition at line 146 of file WireLink.cpp.
bool WireLink::canRead | ( | ) | const |
Definition at line 158 of file WireLink.cpp.
bool WireLink::canWrite | ( | ) | const |
Definition at line 153 of file WireLink.cpp.
bool WireLink::isValid | ( | ) | const |
Check if there is an association of some kind set up for this WireLink.
If not, data has nowhere to go.
Definition at line 69 of file WireLink.cpp.
bool WireLink::setOwner | ( | yarp::os::PortReader & | owner | ) |
Set the owner of this WireLink.
Data sent to this link will be passed on to the owner.
owner | owner of this WireLink |
Definition at line 74 of file WireLink.cpp.
For a client WireLink, control whether replies to commands are expected.
streaming | true if replies are unnecessary. |
Definition at line 108 of file WireLink.cpp.
bool WireLink::write | ( | const PortWriter & | writer, |
PortReader & | reader | ||
) | const |
Write a message to the associated port or reader, and read a reply.
writer | the message to send. |
reader | a recipient for the reply. |
Definition at line 127 of file WireLink.cpp.
bool WireLink::write | ( | PortWriter & | writer | ) |
Write a message to the associated port or reader.
writer | the message to send. |
Definition at line 114 of file WireLink.cpp.