icub-client
src
modules
reactiveLayer
sensationManager
src
test.cpp
Go to the documentation of this file.
1
#include "
test.h
"
2
3
using namespace
std
;
4
using namespace
yarp::os
;
5
using namespace
yarp::sig
;
6
using namespace
icubclient
;
7
8
void
TestSensation::configure
()
9
{
10
in.open(
"/Sensation/test/in"
);
11
out.open(
"/Sensation/test/out"
);
12
cout<<
"Configuration done."
<<endl;
13
}
14
15
void
TestSensation::publish
()
16
{
17
Bottle *res = in.read(
false
);
18
if
(res != NULL) {
19
on = (res->get(0).asString() ==
"ON"
);
20
cout <<
"TEST is "
<< on << endl;
21
}
22
23
yarp::os::Bottle &tosend = out.prepare();
24
tosend.clear();
25
tosend.addInt(
int
(on));
26
out.write();
27
}
28
test.h
std
STL namespace.
TestSensation::publish
void publish()
send sensation data to port
Definition:
test.cpp:15
TestSensation::configure
void configure()
Definition:
test.cpp:8
icubclient
Definition:
icubClient.h:40
os
sig
Generated on Wed Feb 19 2020 23:45:26 for icub-client by
1.8.13