Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
node_thread.h
1 
2 /***************************************************************************
3  * node_thread.h - ROS node handle providing thread
4  *
5  * Created: Thu May 05 18:35:12 2011
6  * Copyright 2006-2011 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Library General Public License for more details.
19  *
20  * Read the full text in the LICENSE.GPL file in the doc directory.
21  */
22 
23 #ifndef __PLUGINS_ROS_NODE_THREAD_H_
24 #define __PLUGINS_ROS_NODE_THREAD_H_
25 
26 #include <core/threading/thread.h>
27 #include <core/utils/lockptr.h>
28 #include <aspect/logging.h>
29 #include <aspect/configurable.h>
30 #include <aspect/clock.h>
31 #include <aspect/blocked_timing.h>
32 #include <aspect/aspect_provider.h>
33 #include <plugins/ros/aspect/ros_inifin.h>
34 #include <utils/time/time.h>
35 
36 #include <sys/types.h>
37 
38 namespace ros {
39  class NodeHandle;
40 }
41 
43 : public fawkes::Thread,
45  public fawkes::LoggingAspect,
47  public fawkes::ClockAspect,
49 {
50  public:
51  ROSNodeThread();
52  virtual ~ROSNodeThread();
53 
54  virtual void init();
55  virtual void loop();
56  virtual void finalize();
57 
58  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
59  protected: virtual void run() { Thread::run(); }
60 
61  private:
63  fawkes::ROSAspectIniFin __ros_aspect_inifin;
64 
65 };
66 
67 #endif