YARP
Yet Another Robot Platform
yarp::os::OutputProtocol Class Referenceabstract

The output side of an active connection between two ports. More...

#include <yarp/os/OutputProtocol.h>

+ Inheritance diagram for yarp::os::OutputProtocol:

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 RoutegetRoute () const =0
 
virtual bool isOk () const =0
 Check if the connection is valid and can be used. More...
 
virtual ConnectiongetConnection ()=0
 Get the connection whose protocol operations we are managing. More...
 
virtual ConnectiongetReceiver ()=0
 It is possible to chain a basic connection with a modifier. More...
 
virtual ConnectiongetSender ()=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 InputProtocolgetInput ()=0
 Get an interface for doing read operations on the connection. More...
 
virtual OutputStreamgetOutputStream ()=0
 Access the output stream associated with the connection. More...
 
virtual InputStreamgetInputStream ()=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...
 

Detailed Description

The output side of an active connection between two ports.

Definition at line 32 of file OutputProtocol.h.

Constructor & Destructor Documentation

◆ ~OutputProtocol()

virtual yarp::os::OutputProtocol::~OutputProtocol ( )
virtualdefault

Destructor.

Member Function Documentation

◆ attachPort()

virtual void yarp::os::OutputProtocol::attachPort ( Contactable port)
pure virtual

Set the port to be associated with the connection.

Implemented in yarp::os::impl::Protocol.

◆ beginWrite()

virtual void yarp::os::OutputProtocol::beginWrite ( )
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.

◆ close()

virtual void yarp::os::OutputProtocol::close ( )
pure virtual

Negotiate an end to operations.

Implemented in yarp::os::impl::Protocol.

◆ getConnection()

virtual Connection& yarp::os::OutputProtocol::getConnection ( )
pure virtual

Get the connection whose protocol operations we are managing.

Implemented in yarp::os::impl::Protocol.

◆ getInput()

virtual InputProtocol& yarp::os::OutputProtocol::getInput ( )
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.

◆ getInputStream()

virtual InputStream& yarp::os::OutputProtocol::getInputStream ( )
pure virtual

Access the input stream associated with the connection.

Implemented in yarp::os::impl::Protocol.

◆ getOutputStream()

virtual OutputStream& yarp::os::OutputProtocol::getOutputStream ( )
pure virtual

Access the output stream associated with the connection.

Implemented in yarp::os::impl::Protocol.

◆ getReceiver()

virtual Connection& yarp::os::OutputProtocol::getReceiver ( )
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.

◆ getRoute()

virtual const Route& yarp::os::OutputProtocol::getRoute ( ) const
pure virtual

Implemented in yarp::os::impl::Protocol.

◆ getSender()

virtual Connection& yarp::os::OutputProtocol::getSender ( )
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.

◆ interrupt()

virtual void yarp::os::OutputProtocol::interrupt ( )
pure virtual

Implemented in yarp::os::impl::Protocol.

◆ isOk()

virtual bool yarp::os::OutputProtocol::isOk ( ) const
pure virtual

Check if the connection is valid and can be used.

Implemented in yarp::os::impl::Protocol.

◆ open()

virtual bool yarp::os::OutputProtocol::open ( const Route route)
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.

◆ rename()

virtual void yarp::os::OutputProtocol::rename ( const Route route)
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.

◆ setTimeout()

virtual bool yarp::os::OutputProtocol::setTimeout ( double  timeout)
pure virtual

Set the timeout to be used for network operations.

Implemented in yarp::os::impl::Protocol.

◆ write()

virtual bool yarp::os::OutputProtocol::write ( SizedWriter writer)
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.


The documentation for this class was generated from the following file: