Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * tf_example_thread.h - tf example thread 00004 * 00005 * Created: Tue Oct 25 17:59:56 2011 00006 * Copyright 2011 Tim Niemueller [www.niemueller.de] 00007 ****************************************************************************/ 00008 00009 /* This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU Library General Public License for more details. 00018 * 00019 * Read the full text in the LICENSE.GPL file in the doc directory. 00020 */ 00021 00022 #ifndef __PLUGINS_TF_EXAMPLE_TF_EXAMPLE_THREAD_H_ 00023 #define __PLUGINS_TF_EXAMPLE_TF_EXAMPLE_THREAD_H_ 00024 00025 #include <core/threading/thread.h> 00026 #include <aspect/blocked_timing.h> 00027 #include <aspect/logging.h> 00028 #include <aspect/configurable.h> 00029 #include <aspect/blackboard.h> 00030 #include <aspect/tf.h> 00031 00032 namespace fawkes { 00033 namespace tf { 00034 class TransformListener; 00035 } 00036 } 00037 00038 class TfExampleThread 00039 : public fawkes::Thread, 00040 public fawkes::BlockedTimingAspect, 00041 public fawkes::LoggingAspect, 00042 public fawkes::ConfigurableAspect, 00043 public fawkes::BlackBoardAspect, 00044 public fawkes::TransformAspect 00045 { 00046 public: 00047 TfExampleThread(); 00048 virtual ~TfExampleThread(); 00049 00050 virtual void init(); 00051 virtual void loop(); 00052 virtual void finalize(); 00053 00054 /** Stub to see name in backtrace for easier debugging. @see Thread::run() */ 00055 protected: virtual void run() { Thread::run(); } 00056 00057 }; 00058 00059 #endif