YARP
Yet Another Robot Platform
Contactable.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3
* Copyright (C) 2006-2010 RobotCub Consortium
4
* All rights reserved.
5
*
6
* This software may be modified and distributed under the terms of the
7
* BSD-3-Clause license. See the accompanying LICENSE file for details.
8
*/
9
10
#include <
yarp/os/Contactable.h
>
11
12
#include <
yarp/os/AbstractContactable.h
>
13
14
15
yarp::os::Contactable::~Contactable
() =
default
;
16
17
std::string
yarp::os::Contactable::getName
()
const
18
{
19
return
where
().
getName
();
20
}
21
22
void
yarp::os::Contactable::setReadOnly
()
23
{
24
setInputMode(
true
);
25
setOutputMode(
false
);
26
setRpcMode(
false
);
27
}
28
29
void
yarp::os::Contactable::setWriteOnly
()
30
{
31
setInputMode(
false
);
32
setOutputMode(
true
);
33
setRpcMode(
false
);
34
}
35
36
void
yarp::os::Contactable::setRpcServer
()
37
{
38
setInputMode(
true
);
39
setOutputMode(
false
);
40
setRpcMode(
true
);
41
}
42
43
void
yarp::os::Contactable::setRpcClient
()
44
{
45
setInputMode(
false
);
46
setOutputMode(
true
);
47
setRpcMode(
true
);
48
}
yarp::os::Contact::getName
std::string getName() const
Get the name associated with this Contact.
Definition:
Contact.cpp:208
yarp::os::Contactable::setRpcServer
void setRpcServer()
Shorthand for setInputMode(true), setOutputMode(false), setRpcMode(true)
Definition:
Contactable.cpp:36
yarp::os::Contactable::setWriteOnly
void setWriteOnly()
Shorthand for setInputMode(false), setOutputMode(true), setRpcMode(false)
Definition:
Contactable.cpp:29
yarp::os::Contactable::setRpcClient
void setRpcClient()
Shorthand for setInputMode(false), setOutputMode(true), setRpcMode(true)
Definition:
Contactable.cpp:43
yarp::os::Contactable::~Contactable
virtual ~Contactable()
Destructor.
yarp::os::Contactable::where
virtual Contact where() const =0
Returns information about how this port can be reached.
yarp::os::Contactable::getName
virtual std::string getName() const
Get name of port.
Definition:
Contactable.cpp:17
AbstractContactable.h
Contactable.h
yarp::os::Contactable::setReadOnly
void setReadOnly()
Shorthand for setInputMode(true), setOutputMode(false), setRpcMode(false)
Definition:
Contactable.cpp:22
YARP
3.4.100+20201223.2+gitb8ea4d712
src
libYARP_os
src
yarp
os
Contactable.cpp
Generated on Sun Jan 3 2021 02:46:24 for YARP by
1.8.20