YARP
Yet Another Robot Platform
yarp::os::impl::NameserTwoWayStream Class Reference

Communicating between two ports via a variant plain-text protocol originally designed for the yarp name server. More...

#include <yarp/os/impl/NameserCarrier.h>

+ Inheritance diagram for yarp::os::impl::NameserTwoWayStream:

Public Member Functions

 NameserTwoWayStream (TwoWayStream *delegate)
 
virtual ~NameserTwoWayStream ()
 
InputStreamgetInputStream () override
 Get an InputStream to read from. More...
 
OutputStreamgetOutputStream () override
 Get an OutputStream to write to. More...
 
const ContactgetLocalAddress () const override
 Get the address of the local side of the stream. More...
 
const ContactgetRemoteAddress () const override
 Get the address of the remote side of the stream. More...
 
bool isOk () const override
 Check if the stream is ok or in an error state. More...
 
void reset () override
 Reset the stream. More...
 
void close () override
 Terminate the stream. More...
 
void beginPacket () override
 Mark the beginning of a logical packet. More...
 
void endPacket () override
 Mark the end of a logical packet (see beginPacket). More...
 
yarp::conf::ssize_t read (yarp::os::Bytes &b) override
 Read a block of data from the stream. More...
 
- Public Member Functions inherited from yarp::os::TwoWayStream
virtual ~TwoWayStream ()
 Destructor. More...
 

Detailed Description

Communicating between two ports via a variant plain-text protocol originally designed for the yarp name server.

For backwards compatibility

Definition at line 26 of file NameserCarrier.h.

Constructor & Destructor Documentation

◆ NameserTwoWayStream()

yarp::os::impl::NameserTwoWayStream::NameserTwoWayStream ( TwoWayStream delegate)

Definition at line 21 of file NameserCarrier.cpp.

◆ ~NameserTwoWayStream()

yarp::os::impl::NameserTwoWayStream::~NameserTwoWayStream ( )
virtual

Definition at line 28 of file NameserCarrier.cpp.

Member Function Documentation

◆ beginPacket()

void yarp::os::impl::NameserTwoWayStream::beginPacket ( )
overridevirtual

Mark the beginning of a logical packet.

This is a unit that should be treated in an atomic fashion by YARP. If any part is corrupted, the whole should be dropped.

Implements yarp::os::TwoWayStream.

Definition at line 71 of file NameserCarrier.cpp.

◆ close()

void yarp::os::impl::NameserTwoWayStream::close ( )
overridevirtual

Terminate the stream.

Implements yarp::os::InputStream.

Definition at line 66 of file NameserCarrier.cpp.

◆ endPacket()

void yarp::os::impl::NameserTwoWayStream::endPacket ( )
overridevirtual

Mark the end of a logical packet (see beginPacket).

Implements yarp::os::TwoWayStream.

Definition at line 76 of file NameserCarrier.cpp.

◆ getInputStream()

yarp::os::InputStream & yarp::os::impl::NameserTwoWayStream::getInputStream ( )
overridevirtual

Get an InputStream to read from.

Returns
the InputStream associated with this object.

Implements yarp::os::TwoWayStream.

Definition at line 36 of file NameserCarrier.cpp.

◆ getLocalAddress()

const Contact & yarp::os::impl::NameserTwoWayStream::getLocalAddress ( ) const
overridevirtual

Get the address of the local side of the stream.

Returns
the address of the local side of the stream. The address will be tagged as invalid if the stream is not set up.

Implements yarp::os::TwoWayStream.

Definition at line 46 of file NameserCarrier.cpp.

◆ getOutputStream()

yarp::os::OutputStream & yarp::os::impl::NameserTwoWayStream::getOutputStream ( )
overridevirtual

Get an OutputStream to write to.

Returns
the InputStream associated with this object.

Implements yarp::os::TwoWayStream.

Definition at line 41 of file NameserCarrier.cpp.

◆ getRemoteAddress()

const Contact & yarp::os::impl::NameserTwoWayStream::getRemoteAddress ( ) const
overridevirtual

Get the address of the remote side of the stream.

Returns
the address of the remote side of the stream. The address will be tagged as invalid if the stream is not set up.

Implements yarp::os::TwoWayStream.

Definition at line 51 of file NameserCarrier.cpp.

◆ isOk()

bool yarp::os::impl::NameserTwoWayStream::isOk ( ) const
overridevirtual

Check if the stream is ok or in an error state.

Returns
true iff the stream is ok

Implements yarp::os::InputStream.

Definition at line 56 of file NameserCarrier.cpp.

◆ read()

yarp::conf::ssize_t yarp::os::impl::NameserTwoWayStream::read ( yarp::os::Bytes b)
overridevirtual

Read a block of data from the stream.

Should block and wait for data.

Parameters
b[out]the block of data to read to
Returns
the number of bytes read, or -1 upon error

Implements yarp::os::InputStream.

Definition at line 81 of file NameserCarrier.cpp.

◆ reset()

void yarp::os::impl::NameserTwoWayStream::reset ( )
overridevirtual

Reset the stream.

Implements yarp::os::TwoWayStream.

Definition at line 61 of file NameserCarrier.cpp.


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