karma
All Modules
utils.cpp
1 /*
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
3  * Author: Vadim Tikhanoff Ugo Pattacini
4  * email: vadim.tikhanoff@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 <yarp/os/Time.h>
19 
20 #include "iCub/utils.h"
21 #include "iCub/module.h"
22 
23 using namespace std;
24 using namespace yarp::os;
25 
26 /**********************************************************/
27 MotionFeatures::MotionFeatures()
28 {
29  manager=NULL;
30  useCallback();
31 }
32 void MotionFeatures::setManager(Manager *manager)
33 {
34  this->manager=manager;
35 }
36 /**********************************************************/
37 void MotionFeatures::onRead(Bottle &target)
38 {
39  if (target.size()>1)
40  {
41  //fprintf( stdout, "got something throught the port with size: %d\n",target.size() );
42  manager->processMotionPoints(target);
43  //manager->processBlobs(target);
44  }
45 }
46