YARP
Yet Another Robot Platform
FakeFace.cpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
8 
10 #include <yarp/os/impl/Protocol.h>
11 
12 using namespace yarp::os::impl;
13 using namespace yarp::os;
14 
15 bool FakeFace::open(const Contact& address)
16 {
17  YARP_UNUSED(address);
18  // happy to open without fuss
19  return true;
20 }
21 
23 {
24 }
25 
27 {
28  fprintf(stderr, "not implemented\n");
29  return nullptr;
30 }
31 
33 {
34  YARP_UNUSED(address);
35  auto* prot = new Protocol(new FakeTwoWayStream());
36  return prot;
37 }
Represents how to reach a part of a YARP network.
Definition: Contact.h:36
The input side of an active connection between two ports.
Definition: InputProtocol.h:35
The output side of an active connection between two ports.
InputProtocol * read() override
Block and wait for someone to talk to us.
Definition: FakeFace.cpp:26
void close() override
Stop listening.
Definition: FakeFace.cpp:22
bool open(const Contact &address) override
Start listening to the given address.
Definition: FakeFace.cpp:15
OutputProtocol * write(const Contact &address) override
Try to reach out and talk to someone.
Definition: FakeFace.cpp:32
A dummy two way stream for testing purposes.
Connection choreographer.
Definition: Protocol.h:31
The components from which ports and connections are built.
An interface to the operating system, including Port based communication.
#define YARP_UNUSED(var)
Definition: api.h:162