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

A dummy Face for testing purposes. More...

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

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

Public Member Functions

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

Detailed Description

A dummy Face for testing purposes.

Definition at line 22 of file FakeFace.h.

Member Function Documentation

◆ close()

void FakeFace::close ( )
overridevirtual

Stop listening.

Implements yarp::os::Face.

Definition at line 25 of file FakeFace.cpp.

◆ open()

bool FakeFace::open ( const Contact address)
overridevirtual

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.

Implements yarp::os::Face.

Definition at line 18 of file FakeFace.cpp.

◆ read()

InputProtocol * FakeFace::read ( )
overridevirtual

Block and wait for someone to talk to us.

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

Implements yarp::os::Face.

Definition at line 29 of file FakeFace.cpp.

◆ write()

OutputProtocol * FakeFace::write ( const Contact address)
overridevirtual

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 nullptr on failure.

Implements yarp::os::Face.

Definition at line 35 of file FakeFace.cpp.


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