icub-client
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 
9 {
10  in.open("/Sensation/test/in");
11  out.open("/Sensation/test/out");
12  cout<<"Configuration done."<<endl;
13 }
14 
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 
STL namespace.
void publish()
send sensation data to port
Definition: test.cpp:15
void configure()
Definition: test.cpp:8