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

#include <yarp/os/Connection.h>

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

Public Member Functions

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

Detailed Description

Definition at line 266 of file Connection.h.

Member Function Documentation

◆ acceptIncomingData()

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

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 288 of file Connection.h.

◆ acceptOutgoingData()

virtual bool yarp::os::NullConnection::acceptOutgoingData ( PortWriter writer)
inlinevirtual

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 304 of file Connection.h.

◆ canEscape()

virtual bool yarp::os::NullConnection::canEscape ( )
inlinevirtual

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 271 of file Connection.h.

◆ getCarrierParams()

virtual void yarp::os::NullConnection::getCarrierParams ( yarp::os::Property params)
inlinevirtual

Get carrier configuration and deliver it by port administrative commands.

Parameters
paramsoutput carrier properties

Implements yarp::os::Connection.

Definition at line 325 of file Connection.h.

◆ getHeader()

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

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

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

Implements yarp::os::Connection.

Definition at line 330 of file Connection.h.

◆ getName()

virtual yarp::os::ConstString yarp::os::NullConnection::getName ( )
inlinevirtual

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

Returns
the name of this connection type

Implements yarp::os::Connection.

Definition at line 339 of file Connection.h.

◆ handleEnvelope()

virtual void yarp::os::NullConnection::handleEnvelope ( const yarp::os::ConstString envelope)
inlinevirtual

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 272 of file Connection.h.

◆ isActive()

virtual bool yarp::os::NullConnection::isActive ( )
inlinevirtual

Check if carrier is alive and error free.

Returns
true if carrier is active.

Implements yarp::os::Connection.

Definition at line 279 of file Connection.h.

◆ isBroadcast()

virtual bool yarp::os::NullConnection::isBroadcast ( )
inlinevirtual

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 278 of file Connection.h.

◆ isConnectionless()

virtual bool yarp::os::NullConnection::isConnectionless ( )
inlinevirtual

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 277 of file Connection.h.

◆ isLocal()

virtual bool yarp::os::NullConnection::isLocal ( )
inlinevirtual

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 275 of file Connection.h.

◆ isPush()

virtual bool yarp::os::NullConnection::isPush ( )
inlinevirtual

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 276 of file Connection.h.

◆ isTextMode()

virtual bool yarp::os::NullConnection::isTextMode ( )
inlinevirtual

Check if carrier is textual in nature.

Returns
true if carrier is text-based

Implements yarp::os::Connection.

Definition at line 270 of file Connection.h.

◆ isValid()

virtual bool yarp::os::NullConnection::isValid ( )
inlinevirtual

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 269 of file Connection.h.

◆ modifiesIncomingData()

virtual bool yarp::os::NullConnection::modifiesIncomingData ( )
inlinevirtual

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 281 of file Connection.h.

◆ modifiesOutgoingData()

virtual bool yarp::os::NullConnection::modifiesOutgoingData ( )
inlinevirtual

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 294 of file Connection.h.

◆ modifiesReply()

virtual bool yarp::os::NullConnection::modifiesReply ( )
inlinevirtual

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 310 of file Connection.h.

◆ modifyIncomingData()

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

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 283 of file Connection.h.

◆ modifyOutgoingData()

virtual PortWriter& yarp::os::NullConnection::modifyOutgoingData ( PortWriter writer)
inlinevirtual

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 299 of file Connection.h.

◆ modifyReply()

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

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 315 of file Connection.h.

◆ prepareDisconnect()

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

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

Implements yarp::os::Connection.

Definition at line 337 of file Connection.h.

◆ requireAck()

virtual bool yarp::os::NullConnection::requireAck ( )
inlinevirtual

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 273 of file Connection.h.

◆ setCarrierParams()

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

Configure carrier from port administrative commands.

Parameters
paramscarrier properties

Implements yarp::os::Connection.

Definition at line 320 of file Connection.h.

◆ supportReply()

virtual bool yarp::os::NullConnection::supportReply ( )
inlinevirtual

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 274 of file Connection.h.


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