YARP  2.3.68+225-20170329.5+gitb0d3289
Yet Another Robot Platform
yarp::os::Face Class Referenceabstract

The initial point-of-contact with a port. More...

#include <yarp/os/Face.h>

+ Inheritance diagram for yarp::os::Face:

Public Member Functions

 Face ()
 Constructor. More...
 
virtual ~Face ()
 Destructor. More...
 
virtual bool open (const Contact &address)=0
 Start listening to the given address. More...
 
virtual void close ()=0
 Stop listening. More...
 
virtual InputProtocolread ()=0
 Block and wait for someone to talk to us. More...
 
virtual OutputProtocolwrite (const Contact &address)=0
 Try to reach out and talk to someone. More...
 
virtual Contact getLocalAddress ()
 Get address after open(), if more specific that the address provided to open() - otherwise an invalid address is returned. More...
 

Detailed Description

The initial point-of-contact with a port.

Definition at line 23 of file Face.h.

Constructor & Destructor Documentation

◆ Face()

yarp::os::Face::Face ( )
inline

Constructor.

Definition at line 28 of file Face.h.

◆ ~Face()

virtual yarp::os::Face::~Face ( )
inlinevirtual

Destructor.

Definition at line 33 of file Face.h.

Member Function Documentation

◆ close()

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

Stop listening.

Implemented in yarp::os::impl::TcpFace, and yarp::os::impl::FakeFace.

◆ getLocalAddress()

virtual Contact yarp::os::Face::getLocalAddress ( )
inlinevirtual

Get address after open(), if more specific that the address provided to open() - otherwise an invalid address is returned.

Returns
an address

Reimplemented in yarp::os::impl::TcpFace.

Definition at line 85 of file Face.h.

◆ open()

virtual bool yarp::os::Face::open ( const Contact address)
pure virtual

Start listening to the given address.

Parameters
addressthe parameters needed for listening. E.g. for TCP, this would contain a socket number.
Returns
true on success.

Implemented in yarp::os::impl::TcpFace, and yarp::os::impl::FakeFace.

◆ read()

virtual InputProtocol* yarp::os::Face::read ( )
pure virtual

Block and wait for someone to talk to us.

Returns
a protocol object for talking to someone, or YARP_NULLPTR on failure.

Implemented in yarp::os::impl::TcpFace, and yarp::os::impl::FakeFace.

◆ write()

virtual OutputProtocol* yarp::os::Face::write ( const Contact address)
pure virtual

Try to reach out and talk to someone.

Parameters
addressparameters describing destination. For example, for TCP this would contain a machine name/IP address, and a socket number.
Returns
a protocol object to talk with, or YARP_NULLPTR on failure.

Implemented in yarp::os::impl::TcpFace, and yarp::os::impl::FakeFace.


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