YARP
Yet Another Robot Platform
Contactable.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 
7 #include <yarp/os/Contactable.h>
8 
10 
11 
13 
14 std::string yarp::os::Contactable::getName() const
15 {
16  return where().getName();
17 }
18 
20 {
21  setInputMode(true);
22  setOutputMode(false);
23  setRpcMode(false);
24 }
25 
27 {
28  setInputMode(false);
29  setOutputMode(true);
30  setRpcMode(false);
31 }
32 
34 {
35  setInputMode(true);
36  setOutputMode(false);
37  setRpcMode(true);
38 }
39 
41 {
42  setInputMode(false);
43  setOutputMode(true);
44  setRpcMode(true);
45 }
std::string getName() const
Get the name associated with this Contact.
Definition: Contact.cpp:205
virtual std::string getName() const
Get name of port.
Definition: Contactable.cpp:14
virtual Contact where() const =0
Returns information about how this port can be reached.
void setWriteOnly()
Shorthand for setInputMode(false), setOutputMode(true), setRpcMode(false)
Definition: Contactable.cpp:26
void setReadOnly()
Shorthand for setInputMode(true), setOutputMode(false), setRpcMode(false)
Definition: Contactable.cpp:19
void setRpcServer()
Shorthand for setInputMode(true), setOutputMode(false), setRpcMode(true)
Definition: Contactable.cpp:33
void setRpcClient()
Shorthand for setInputMode(false), setOutputMode(true), setRpcMode(true)
Definition: Contactable.cpp:40
virtual ~Contactable()
Destructor.