A dummy connection to test yarp::os::Portable implementations. More...
#include <yarp/os/DummyConnector.h>
Public Member Functions | |
| DummyConnector () | |
| Default constructor. More... | |
| virtual | ~DummyConnector () |
| Destructor. More... | |
| void | setTextMode (bool textmode) |
| Set the textMode of the dummy connection. More... | |
| ConnectionWriter & | getCleanWriter () |
| Get a clean/empty dummy ConnectionWriter. More... | |
| ConnectionWriter & | getWriter () |
| Get the dummy ConnectionWriter loaded with whatever was written the ConnectionWriter since it was last reset. More... | |
| ConnectionReader & | getReader (ConnectionWriter *replyWriter=nullptr) |
| Get the dummy ConnectionReader loaded with whatever was written the ConnectionWriter since it was last reset. More... | |
| void | reset () |
| Reset and clear the current ConnectionWriter. More... | |
A dummy connection to test yarp::os::Portable implementations.
This class provides simple means to test read and write methods of the Portable interface.
Pseudocode for a test should look something like this:
Definition at line 34 of file DummyConnector.h.
| DummyConnector::DummyConnector | ( | ) |
|
virtual |
Destructor.
Definition at line 97 of file DummyConnector.cpp.
| ConnectionWriter & DummyConnector::getCleanWriter | ( | ) |
Get a clean/empty dummy ConnectionWriter.
This will reset the connection each time.
Definition at line 107 of file DummyConnector.cpp.
| ConnectionReader & DummyConnector::getReader | ( | ConnectionWriter * | replyWriter = nullptr | ) |
Get the dummy ConnectionReader loaded with whatever was written the ConnectionWriter since it was last reset.
| replyWriter | A writer to be used for replies received on the connection. |
Definition at line 117 of file DummyConnector.cpp.
| ConnectionWriter & DummyConnector::getWriter | ( | ) |
Get the dummy ConnectionWriter loaded with whatever was written the ConnectionWriter since it was last reset.
Definition at line 112 of file DummyConnector.cpp.
| void DummyConnector::reset | ( | ) |
Reset and clear the current ConnectionWriter.
Definition at line 122 of file DummyConnector.cpp.
| void DummyConnector::setTextMode | ( | bool | textmode | ) |
Set the textMode of the dummy connection.
| textmode | new textmode value |
Definition at line 102 of file DummyConnector.cpp.