Simple Readable and Writable object representing a command to a YARP port. More...
#include <yarp/os/impl/PortCommand.h>
Public Member Functions | |
PortCommand () | |
PortCommand (char ch, const std::string &str) | |
bool | write (yarp::os::ConnectionWriter &writer) const override |
Write this object to a network connection. | |
bool | read (yarp::os::ConnectionReader &reader) override |
Read this object from a network connection. | |
char | getKey () |
std::string | getText () |
![]() | |
virtual Type | getType () const |
![]() | |
virtual | ~PortReader () |
Destructor. | |
virtual Type | getReadType () const |
![]() | |
virtual | ~PortWriter () |
Destructor. | |
virtual void | onCompletion () const |
This is called when the port has finished all writing operations. | |
virtual void | onCommencement () const |
This is called when the port is about to begin writing operations. | |
virtual yarp::os::Type | getWriteType () const |
Public Attributes | |
char | ch |
std::string | str |
yarp::os::ManagedBytes | header |
Additional Inherited Members | |
![]() | |
static bool | copyPortable (const PortWriter &writer, PortReader &reader) |
Copy one portable to another, via writing and reading. | |
Simple Readable and Writable object representing a command to a YARP port.
Definition at line 22 of file PortCommand.h.
|
inline |
Definition at line 26 of file PortCommand.h.
Definition at line 33 of file PortCommand.h.
|
inline |
Definition at line 43 of file PortCommand.h.
|
inline |
Definition at line 48 of file PortCommand.h.
|
overridevirtual |
Read this object from a network connection.
Override this for your particular class.
reader | an interface to the network connection for reading |
Implements yarp::os::Portable.
Definition at line 20 of file PortCommand.cpp.
|
overridevirtual |
Write this object to a network connection.
Override this for your particular class. Be aware that depending on the nature of the connections a port has, and what protocol they use, and how efficient the YARP implementation is, this method may be called once, twice, or many times, as the result of a single call to Port::write
writer | an interface to the network connection for writing |
Implements yarp::os::Portable.
Definition at line 58 of file PortCommand.cpp.
char yarp::os::impl::PortCommand::ch |
Definition at line 54 of file PortCommand.h.
|
mutable |
Definition at line 56 of file PortCommand.h.
std::string yarp::os::impl::PortCommand::str |
Definition at line 55 of file PortCommand.h.