The output side of an active connection between two ports. More...
#include <yarp/os/OutputProtocol.h>
Public Member Functions | |
virtual | ~OutputProtocol ()=default |
Destructor. More... | |
virtual bool | open (const Route &route)=0 |
Start negotiating a carrier, using the given route (this should generally match the name of the sending port, the receiving port, and the desired carrier. More... | |
virtual void | rename (const Route &route)=0 |
Relabel the route after the fact (e.g. More... | |
virtual void | close ()=0 |
Negotiate an end to operations. More... | |
virtual const Route & | getRoute () const =0 |
virtual bool | isOk () const =0 |
Check if the connection is valid and can be used. More... | |
virtual Connection & | getConnection ()=0 |
Get the connection whose protocol operations we are managing. More... | |
virtual Connection & | getReceiver ()=0 |
It is possible to chain a basic connection with a modifier. More... | |
virtual Connection & | getSender ()=0 |
It is possible to chain a basic connection with a modifier. More... | |
virtual bool | write (SizedWriter &writer)=0 |
Write a message on the connection. More... | |
virtual void | interrupt ()=0 |
virtual InputProtocol & | getInput ()=0 |
Get an interface for doing read operations on the connection. More... | |
virtual OutputStream & | getOutputStream ()=0 |
Access the output stream associated with the connection. More... | |
virtual InputStream & | getInputStream ()=0 |
Access the input stream associated with the connection. More... | |
virtual bool | setTimeout (double timeout)=0 |
Set the timeout to be used for network operations. More... | |
virtual void | attachPort (Contactable *port)=0 |
Set the port to be associated with the connection. More... | |
virtual void | beginWrite ()=0 |
Notify connection that we intend to write to it. More... | |
The output side of an active connection between two ports.
Definition at line 32 of file OutputProtocol.h.
|
virtualdefault |
Destructor.
|
pure virtual |
Set the port to be associated with the connection.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Notify connection that we intend to write to it.
This only needs to get called once. There is no endWrite().
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Negotiate an end to operations.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Get the connection whose protocol operations we are managing.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Get an interface for doing read operations on the connection.
Not all types of connections will support this, check yarp::os::InputProtocol::isOk() on the result.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Access the input stream associated with the connection.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Access the output stream associated with the connection.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
It is possible to chain a basic connection with a modifier.
If there is a receiver modifier, this call returns it, otherwise it will return a connection for which yarp::os::Connection::isValid() returns false.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
It is possible to chain a basic connection with a modifier.
If there is a sender modifier, this call returns it, otherwise it will return a connection for which yarp::os::Connection::isValid() returns false.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Check if the connection is valid and can be used.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Start negotiating a carrier, using the given route (this should generally match the name of the sending port, the receiving port, and the desired carrier.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Relabel the route after the fact (e.g.
if the direction of initiative switches and the route essentially reverses)
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Set the timeout to be used for network operations.
Implemented in yarp::os::impl::Protocol.
|
pure virtual |
Write a message on the connection.
If a reply is expected, we wait for one. If an acknowledgement is expected, we wait for one. Replies and acknowledgements are similar, except: replies are at the client payload level, acknowledgements are low-level protocol elements that the client doesn't need to know about.
Implemented in yarp::os::impl::Protocol.