Fawkes API  Fawkes Development Version
tf_example_thread.h
1 
2 /***************************************************************************
3  * tf_example_thread.h - tf example thread
4  *
5  * Created: Tue Oct 25 17:59:56 2011
6  * Copyright 2011 Tim Niemueller [www.niemueller.de]
7  ****************************************************************************/
8 
9 /* This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU Library General Public License for more details.
18  *
19  * Read the full text in the LICENSE.GPL file in the doc directory.
20  */
21 
22 #ifndef _PLUGINS_TF_EXAMPLE_TF_EXAMPLE_THREAD_H_
23 #define _PLUGINS_TF_EXAMPLE_TF_EXAMPLE_THREAD_H_
24 
25 #include <aspect/blackboard.h>
26 #include <aspect/blocked_timing.h>
27 #include <aspect/configurable.h>
28 #include <aspect/logging.h>
29 #include <aspect/tf.h>
30 #include <core/threading/thread.h>
31 
32 namespace fawkes {
33 namespace tf {
34 class TransformListener;
35 }
36 } // namespace fawkes
37 
40  public fawkes::LoggingAspect,
44 {
45 public:
47  virtual ~TfExampleThread();
48 
49  virtual void init();
50  virtual void loop();
51  virtual void finalize();
52 
53  /** Stub to see name in backtrace for easier debugging. @see Thread::run() */
54 protected:
55  virtual void
56  run()
57  {
58  Thread::run();
59  }
60 
61 private:
62  float angle_;
63 };
64 
65 #endif
Main thread of tf example plugin.
virtual void run()
Stub to see name in backtrace for easier debugging.
virtual ~TfExampleThread()
Destructor.
virtual void init()
Initialize the thread.
virtual void loop()
Code to execute in the thread.
TfExampleThread()
Constructor.
virtual void finalize()
Finalize the thread.
Thread aspect to access to BlackBoard.
Definition: blackboard.h:34
Thread aspect to use blocked timing.
Thread aspect to access configuration data.
Definition: configurable.h:33
Thread aspect to log output.
Definition: logging.h:33
Thread class encapsulation of pthreads.
Definition: thread.h:46
Thread aspect to access the transform system.
Definition: tf.h:39
Fawkes library namespace.