Loading [MathJax]/extensions/tex2jax.js
iCub-main
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
a
b
c
d
e
h
i
j
l
m
n
p
r
s
t
w
z
Typedefs
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
p
q
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
a
b
c
e
g
i
l
n
p
r
s
t
u
Enumerator
a
b
c
d
e
f
g
i
l
m
p
r
s
t
u
Properties
Related Symbols
a
b
c
g
i
l
o
q
r
s
t
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
x
y
z
Typedefs
Enumerations
Enumerator
_
a
c
d
e
g
j
m
n
p
s
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
icub-main
src
libraries
perceptiveModels
src
ports.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
3
* Author: Ugo Pattacini
4
* email: ugo.pattacini@iit.it
5
* Permission is granted to copy, distribute, and/or modify this program
6
* under the terms of the GNU General Public License, version 2 or any
7
* later version published by the Free Software Foundation.
8
*
9
* A copy of the license can be found at
10
* http://www.robotcub.org/icub/license/gpl.txt
11
*
12
* This program is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15
* Public License for more details
16
*/
17
18
#include <
iCub/perception/private/ports.h
>
19
20
using namespace
std;
21
using namespace
yarp::os;
22
using namespace
iCub::perception
;
23
24
25
/************************************************************************/
26
iCub::perception::Port::Port
()
27
{
28
useCallback();
29
}
26
iCub::perception::Port::Port
() {
…
}
30
31
32
/************************************************************************/
33
void
iCub::perception::Port::onRead
(Bottle &bottle)
34
{
35
lock_guard<mutex> lck(mtx);
36
this->bottle=bottle;
37
}
33
void
iCub::perception::Port::onRead
(Bottle &bottle) {
…
}
38
39
40
/************************************************************************/
41
Value
iCub::perception::Port::getValue
(
const
int
index)
42
{
43
lock_guard<mutex> lck(mtx);
44
45
Value ret;
46
if
((index>=0) && (index<bottle.size()))
47
ret=Value(bottle.get(index).asFloat64());
48
return
ret;
49
}
41
Value
iCub::perception::Port::getValue
(
const
int
index) {
…
}
50
51
52
53
iCub::perception::Port::getValue
yarp::os::Value getValue(const int index)
Definition
ports.cpp:41
iCub::perception::Port::Port
Port()
Definition
ports.cpp:26
iCub::perception::Port::onRead
void onRead(yarp::os::Bottle &bottle)
Definition
ports.cpp:33
iCub::perception
Definition
models.h:53
ports.h
Generated on Tue May 6 2025 15:42:05 for iCub-main by
1.9.8