YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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.
 
void close () override
 Stop listening.
 
InputProtocolread () override
 Block and wait for someone to talk to us.
 
OutputProtocolwrite (const Contact &address) override
 Try to reach out and talk to someone.
 
- Public Member Functions inherited from yarp::os::Face
 Face ()=default
 Constructor.
 
virtual ~Face ()=default
 Destructor.
 
virtual Contact getLocalAddress () const
 Get address after open(), if more specific that the address provided to open() - otherwise an invalid address is returned.
 

Detailed Description

A dummy Face for testing purposes.

Definition at line 17 of file FakeFace.h.

Member Function Documentation

◆ close()

void FakeFace::close ( )
overridevirtual

Stop listening.

Implements yarp::os::Face.

Definition at line 22 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 15 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 26 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 32 of file FakeFace.cpp.


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