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. More... | |
bool | setOwner (yarp::os::PortReader &owner) |
Set the owner of this WireLink. More... | |
bool | attachAsClient (yarp::os::UnbufferedContactable &port) |
Tag this WireLink as a client, sending data via the specified port. More... | |
bool | attachAsClient (yarp::os::PortReader &reader) |
Tag this WireLink as a client, sending data via the specified reader. More... | |
bool | attachAsServer (yarp::os::UnbufferedContactable &port) |
Tag this WireLink as a server, receiving commands via the specified port. More... | |
bool | setStreamingMode (bool streaming) |
For a client WireLink, control whether replies to commands are expected. More... | |
bool | write (PortWriter &writer) |
Write a message to the associated port or reader. More... | |
bool | write (PortWriter &writer, PortReader &reader) |
Write a message to the associated port or reader, and read a reply. More... | |
bool | callback (PortWriter &writer, PortReader &reader, const std::string &tag="") |
Put a message in a stack to call later, asynchronously. More... | |
bool | canWrite () const |
bool | canRead () const |
IDL-friendly object state, used in YARP to set up a port association.
Definition at line 26 of file WireLink.h.
WireLink::WireLink | ( | ) |
Definition at line 62 of file WireLink.cpp.
WireLink::~WireLink | ( | ) |
Definition at line 67 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 92 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 83 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 101 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 149 of file WireLink.cpp.
bool WireLink::canRead | ( | ) | const |
Definition at line 161 of file WireLink.cpp.
bool WireLink::canWrite | ( | ) | const |
Definition at line 156 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 72 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 77 of file WireLink.cpp.
bool WireLink::setStreamingMode | ( | bool | streaming | ) |
For a client WireLink, control whether replies to commands are expected.
streaming | true if replies are unnecessary. |
Definition at line 111 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 117 of file WireLink.cpp.
bool WireLink::write | ( | PortWriter & | writer, |
PortReader & | reader | ||
) |
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 130 of file WireLink.cpp.