iCub-main
SkinDiagnosticsReadThread.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Francesco Giovannini, iCub Facility - Istituto Italiano di Tecnologia
3  * Authors: Francesco Giovannini
4  * email: francesco.giovannini@iit.it
5  * website: www.robotcub.org
6  * Permission is granted to copy, distribute, and/or modify this program
7  * under the terms of the GNU General Public License, version 2 or any
8  * later version published by the Free Software Foundation.
9  *
10  * A copy of the license can be found at
11  * http://www.robotcub.org/icub/license/gpl.txt
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details
17  */
18 
19 
20 
21 #ifndef __SKINMANAGER_DIAGNOSTICSREAD_THREAD_H__
22 #define __SKINMANAGER_DIAGNOSTICSREAD_THREAD_H__
23 
24 #include <string>
25 #include <vector>
26 #include <deque>
27 
28 #include <yarp/os/PeriodicThread.h>
29 #include <yarp/os/ResourceFinder.h>
30 #include <yarp/os/BufferedPort.h>
31 #include <yarp/os/Bottle.h>
32 #include <yarp/sig/Vector.h>
33 
34 namespace iCub {
35  namespace skinManager {
36  class SkinDiagnosticsReadThread : public yarp::os::PeriodicThread {
37  private:
38  /* ****** Module attributes ****** */
40  int period;
41 
42  /* ******* Ports. ******* */
43  yarp::os::BufferedPort<yarp::sig::Vector> portSkinDiagnosticsErrorsIn;
44  yarp::os::BufferedPort<yarp::os::Bottle> portSkinManagerErrorsOut;
45 
46 
47  /* ****** Resource finder ****** */
48  yarp::os::ResourceFinder rf;
49 
50  /* ****** Debug attributes ****** */
51  std::string dbgTag;
52 
53  public:
54  SkinDiagnosticsReadThread(const int aPeriod, const yarp::os::ResourceFinder &aRf);
56 
57  virtual bool threadInit(void);
58  virtual void run(void);
59  virtual void threadRelease(void);
60  };
61  }
62 }
63 
64 #endif
65 
SkinDiagnosticsReadThread(const int aPeriod, const yarp::os::ResourceFinder &aRf)
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.