YARP
Yet Another Robot Platform
yarp::os::NullConnection Class Reference

#include <yarp/os/Connection.h>

+ Inheritance diagram for yarp::os::NullConnection:

Detailed Description

Definition at line 269 of file Connection.h.

Public Member Functions

virtual bool isValid () const override
 Check if this object is really a connection, or just an empty placeholder. More...
 
virtual bool isTextMode () const override
 Check if carrier is textual in nature. More...
 
virtual bool canEscape () const override
 Check if carrier can encode administrative messages, as opposed to just user data. More...
 
virtual void handleEnvelope (const std::string &envelope) override
 Carriers that do not distinguish data from administrative headers (i.e. More...
 
virtual bool requireAck () const override
 Check if carrier has flow control, requiring sent messages to be acknowledged by recipient. More...
 
virtual bool supportReply () const override
 This flag is used by YARP to determine whether the connection can carry RPC traffic, that is, messages with replies. More...
 
virtual bool isLocal () const override
 Check if carrier operates within a single process. More...
 
virtual bool isPush () const override
 Check if carrier is "push" or "pull" style. More...
 
virtual bool isConnectionless () const override
 Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp). More...
 
virtual bool isBroadcast () const override
 Check if this carrier uses a broadcast mechanism. More...
 
virtual bool isActive () const override
 Check if carrier is alive and error free. More...
 
virtual bool modifiesIncomingData () const override
 Check if this carrier modifies incoming data through the Carrier::modifyIncomingData method. More...
 
virtual yarp::os::ConnectionReadermodifyIncomingData (yarp::os::ConnectionReader &reader) override
 Modify incoming payload data, if appropriate. More...
 
virtual bool acceptIncomingData (yarp::os::ConnectionReader &reader) override
 Determine whether incoming data should be accepted. More...
 
virtual bool modifiesOutgoingData () const override
 Check if this carrier modifies outgoing data through the Carrier::modifyOutgoingData method. More...
 
virtual const PortWritermodifyOutgoingData (const PortWriter &writer) override
 Modify outgoing payload data, if appropriate. More...
 
virtual bool acceptOutgoingData (const PortWriter &writer) override
 Determine whether outgoing data should be accepted. More...
 
virtual bool modifiesReply () const override
 Check if this carrier modifies outgoing data through the Carrier::modifyReply method. More...
 
virtual PortReadermodifyReply (PortReader &reader) override
 Modify reply payload data, if appropriate. More...
 
virtual void setCarrierParams (const yarp::os::Property &params) override
 Configure carrier from port administrative commands. More...
 
virtual void getCarrierParams (yarp::os::Property &params) const override
 Get carrier configuration and deliver it by port administrative commands. More...
 
virtual void getHeader (yarp::os::Bytes &header) const override
 Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to select it. More...
 
virtual void prepareDisconnect () override
 Do cleanup and preparation for the coming disconnect, if necessary. More...
 
virtual std::string getName () const override
 Get the name of this connection type ("tcp", "mcast", "shmem", ...) More...
 
- Public Member Functions inherited from yarp::os::Connection
virtual ~Connection ()
 Destructor. More...
 
virtual bool isBareMode () const
 Check if carrier excludes type information from payload. More...
 

Member Function Documentation

◆ acceptIncomingData()

virtual bool yarp::os::NullConnection::acceptIncomingData ( yarp::os::ConnectionReader reader)
inlineoverridevirtual

Determine whether incoming data should be accepted.

Parameters
readerfor incoming data.
Returns
true if data should be accepted, false if it should be discarded.

Implements yarp::os::Connection.

Definition at line 291 of file Connection.h.

◆ acceptOutgoingData()

virtual bool yarp::os::NullConnection::acceptOutgoingData ( const PortWriter writer)
inlineoverridevirtual

Determine whether outgoing data should be accepted.

Parameters
writerfor outgoing data.
Returns
true if data should be accepted, false if it should be discarded.

Implements yarp::os::Connection.

Definition at line 307 of file Connection.h.

◆ canEscape()

virtual bool yarp::os::NullConnection::canEscape ( ) const
inlineoverridevirtual

Check if carrier can encode administrative messages, as opposed to just user data.

The word escape is used in the sense of escape character or escape sequence here.

Returns
true if carrier can encode administrative messages

Implements yarp::os::Connection.

Definition at line 274 of file Connection.h.

◆ getCarrierParams()

virtual void yarp::os::NullConnection::getCarrierParams ( yarp::os::Property params) const
inlineoverridevirtual

Get carrier configuration and deliver it by port administrative commands.

Parameters
paramsoutput carrier properties

Implements yarp::os::Connection.

Definition at line 328 of file Connection.h.

◆ getHeader()

virtual void yarp::os::NullConnection::getHeader ( yarp::os::Bytes header) const
inlineoverridevirtual

Provide 8 bytes describing this connection sufficiently to allow the other side of a connection to select it.

Parameters
[out]headera buffer to hold the first 8 bytes to send on a connection

Implements yarp::os::Connection.

Definition at line 333 of file Connection.h.

◆ getName()

virtual std::string yarp::os::NullConnection::getName ( ) const
inlineoverridevirtual

Get the name of this connection type ("tcp", "mcast", "shmem", ...)

Returns
the name of this connection type

Implements yarp::os::Connection.

Definition at line 342 of file Connection.h.

◆ handleEnvelope()

virtual void yarp::os::NullConnection::handleEnvelope ( const std::string &  envelope)
inlineoverridevirtual

Carriers that do not distinguish data from administrative headers (i.e.

canEscape returns false), can overload this method to handle the envelope inside the stream. On the receiving side, the InputStream will have to overload the yarp::os::InputStream::setReadEnvelopeCallback method, and execute the callback as soon as the envelope is ready.

Parameters
envelopethe envelope to transmit bundled with data.

Implements yarp::os::Connection.

Definition at line 275 of file Connection.h.

◆ isActive()

virtual bool yarp::os::NullConnection::isActive ( ) const
inlineoverridevirtual

Check if carrier is alive and error free.

Returns
true if carrier is active.

Implements yarp::os::Connection.

Definition at line 282 of file Connection.h.

◆ isBroadcast()

virtual bool yarp::os::NullConnection::isBroadcast ( ) const
inlineoverridevirtual

Check if this carrier uses a broadcast mechanism.

This flag is used to determine whether it is appropriate to send "kill" messages using a carrier or whether they should be sent "out-of-band"

Returns
true if carrier uses a broadcast mechanism.

Implements yarp::os::Connection.

Definition at line 281 of file Connection.h.

◆ isConnectionless()

virtual bool yarp::os::NullConnection::isConnectionless ( ) const
inlineoverridevirtual

Check if this carrier is connectionless (like udp, mcast) or connection based (like tcp).

This flag is used by YARP to determine whether the connection can carry RPC traffic, that is, messages with replies. Replies are not supported by YARP on connectionless carriers.

Returns
true if carrier is connectionless

Implements yarp::os::Connection.

Definition at line 280 of file Connection.h.

◆ isLocal()

virtual bool yarp::os::NullConnection::isLocal ( ) const
inlineoverridevirtual

Check if carrier operates within a single process.

In such a case, YARP connections may get completely reorganized in order to optimize them.

Returns
true if carrier will only operate within a single process

Implements yarp::os::Connection.

Definition at line 278 of file Connection.h.

◆ isPush()

virtual bool yarp::os::NullConnection::isPush ( ) const
inlineoverridevirtual

Check if carrier is "push" or "pull" style.

Push means that the side that initiates a connection is also the one that will sending of data or commands. All native YARP connections are like this. A "pull" style is equivalent to automatically sending a "reverse connection" port command at the start of the connection.

Returns
true if carrier is "push" style, false if "pull" style

Implements yarp::os::Connection.

Definition at line 279 of file Connection.h.

◆ isTextMode()

virtual bool yarp::os::NullConnection::isTextMode ( ) const
inlineoverridevirtual

Check if carrier is textual in nature.

Returns
true if carrier is text-based

Implements yarp::os::Connection.

Definition at line 273 of file Connection.h.

◆ isValid()

virtual bool yarp::os::NullConnection::isValid ( ) const
inlineoverridevirtual

Check if this object is really a connection, or just an empty placeholder.

Returns
true if a valid connection

Reimplemented from yarp::os::Connection.

Definition at line 272 of file Connection.h.

◆ modifiesIncomingData()

virtual bool yarp::os::NullConnection::modifiesIncomingData ( ) const
inlineoverridevirtual

Check if this carrier modifies incoming data through the Carrier::modifyIncomingData method.

Returns
true if carrier wants Carrier::modifyIncomingData called.

Implements yarp::os::Connection.

Definition at line 284 of file Connection.h.

◆ modifiesOutgoingData()

virtual bool yarp::os::NullConnection::modifiesOutgoingData ( ) const
inlineoverridevirtual

Check if this carrier modifies outgoing data through the Carrier::modifyOutgoingData method.

Returns
true if carrier wants Carrier::modifyOutgoingData called.

Implements yarp::os::Connection.

Definition at line 297 of file Connection.h.

◆ modifiesReply()

virtual bool yarp::os::NullConnection::modifiesReply ( ) const
inlineoverridevirtual

Check if this carrier modifies outgoing data through the Carrier::modifyReply method.

Returns
true if carrier wants Carrier::modifyReply called.

Implements yarp::os::Connection.

Definition at line 313 of file Connection.h.

◆ modifyIncomingData()

virtual yarp::os::ConnectionReader& yarp::os::NullConnection::modifyIncomingData ( yarp::os::ConnectionReader reader)
inlineoverridevirtual

Modify incoming payload data, if appropriate.

Doesn't need to be done immediately, it is fine to hold onto a reference to the incoming data reader and use it on demand. This can be handy in order to avoid unnecessary copies.

Parameters
readerfor incoming data.
Returns
reader for modified version of incoming data.

Implements yarp::os::Connection.

Definition at line 286 of file Connection.h.

◆ modifyOutgoingData()

virtual const PortWriter& yarp::os::NullConnection::modifyOutgoingData ( const PortWriter writer)
inlineoverridevirtual

Modify outgoing payload data, if appropriate.

Doesn't need to be done immediately, it is fine to hold onto a reference to the outgoing data reader and use it on demand. This can be handy in order to avoid unnecessary copies.

Parameters
writerfor outgoing data.
Returns
writer for modified version of outgoing data.

Implements yarp::os::Connection.

Definition at line 302 of file Connection.h.

◆ modifyReply()

virtual PortReader& yarp::os::NullConnection::modifyReply ( PortReader reader)
inlineoverridevirtual

Modify reply payload data, if appropriate.

Parameters
readerfor the replied message.
Returns
reader for modified version of the replied message.

Implements yarp::os::Connection.

Definition at line 318 of file Connection.h.

◆ prepareDisconnect()

virtual void yarp::os::NullConnection::prepareDisconnect ( )
inlineoverridevirtual

Do cleanup and preparation for the coming disconnect, if necessary.

Implements yarp::os::Connection.

Definition at line 340 of file Connection.h.

◆ requireAck()

virtual bool yarp::os::NullConnection::requireAck ( ) const
inlineoverridevirtual

Check if carrier has flow control, requiring sent messages to be acknowledged by recipient.

Returns
true if carrier requires acknowledgement.

Implements yarp::os::Connection.

Definition at line 276 of file Connection.h.

◆ setCarrierParams()

virtual void yarp::os::NullConnection::setCarrierParams ( const yarp::os::Property params)
inlineoverridevirtual

Configure carrier from port administrative commands.

Parameters
paramscarrier properties

Implements yarp::os::Connection.

Definition at line 323 of file Connection.h.

◆ supportReply()

virtual bool yarp::os::NullConnection::supportReply ( ) const
inlineoverridevirtual

This flag is used by YARP to determine whether the connection can carry RPC traffic, that is, messages with replies.

Returns
true if carrier supports replies

Implements yarp::os::Connection.

Definition at line 277 of file Connection.h.


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