Fawkes API Fawkes Development Version

blocked_timing.h

00001 
00002 /***************************************************************************
00003  *  blocked_timing.h - Blocked timing aspect for Fawkes
00004  *
00005  *  Created: Thu Jan 11 16:49:25 2007
00006  *  Copyright  2006-2007  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 #ifndef __ASPECT_BLOCKED_TIMING_H_
00025 #define __ASPECT_BLOCKED_TIMING_H_
00026 
00027 namespace fawkes {
00028 
00029 class Thread;
00030 
00031 class BlockedTimingAspect
00032 {
00033  public:
00034   /** Type to define at which hook the thread is woken up.
00035    * See FawkesMainThread for information when and in which order the hooks
00036    * are called.
00037    * @see FawkesMainThread::loop()
00038    */
00039   typedef enum {
00040     WAKEUP_HOOK_PRE_LOOP,       /**< before each loop */
00041     WAKEUP_HOOK_SENSOR,         /**< sensor thread, recording and processing */
00042     WAKEUP_HOOK_SENSOR_PROCESS, /**< sensor data processing thread */
00043     WAKEUP_HOOK_WORLDSTATE,     /**< world state thread */
00044     WAKEUP_HOOK_THINK,          /**< think thread (agent) */
00045     WAKEUP_HOOK_SKILL,          /**< skill thread (skill module) */
00046     WAKEUP_HOOK_ACT,            /**< act thread (motor module etc.) */
00047     WAKEUP_HOOK_ACT_EXEC,       /**< act execution thread */
00048     WAKEUP_HOOK_POST_LOOP       /**< run after loop */
00049   } WakeupHook;
00050 
00051   BlockedTimingAspect(WakeupHook wakeup_hook);
00052   virtual ~BlockedTimingAspect();
00053 
00054   WakeupHook blockedTimingAspectHook() const;
00055 
00056  private:
00057   WakeupHook wakeup_hook;
00058 };
00059 
00060 } // end namespace fawkes
00061 
00062 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends