00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __PLUGINS_XABSL_ENGINE_THREAD_H_
00024 #define __PLUGINS_XABSL_ENGINE_THREAD_H_
00025
00026 #include "iface_field_wrapper.h"
00027
00028 #include <core/threading/thread.h>
00029 #include <aspect/blocked_timing.h>
00030 #include <aspect/logging.h>
00031 #include <aspect/configurable.h>
00032 #include <aspect/clock.h>
00033 #include <aspect/blackboard.h>
00034
00035 #include <map>
00036 #include <string>
00037
00038 namespace xabsl {
00039 class Engine;
00040 }
00041
00042 namespace fawkes {
00043 class Time;
00044 class ObjectPositionInterface;
00045 class SkillerInterface;
00046 }
00047
00048 class XabslLoggingErrorHandler;
00049 class XabslFileInputSource;
00050 class XabslSkillWrapper;
00051
00052 class XabslEngineThread
00053 : public fawkes::Thread,
00054 public fawkes::BlockedTimingAspect,
00055 public fawkes::LoggingAspect,
00056 public fawkes::ConfigurableAspect,
00057 public fawkes::ClockAspect,
00058 public fawkes::BlackBoardAspect
00059 {
00060 public:
00061 XabslEngineThread();
00062
00063 virtual void init();
00064 virtual void finalize();
00065 virtual void once();
00066 virtual void loop();
00067
00068 unsigned long int current_time();
00069
00070
00071 protected: virtual void run() { Thread::run(); }
00072
00073 private:
00074 xabsl::Engine *__xe;
00075 XabslLoggingErrorHandler *__xleh;
00076
00077 fawkes::Time *__now;
00078
00079 fawkes::SkillerInterface *__skiller_if;
00080 fawkes::ObjectPositionInterface *__wm_ball_if;
00081 fawkes::ObjectPositionInterface *__wm_ball_w_if;
00082
00083 XabslInterfaceFieldWrapper<double, float> *__ball_rx;
00084 XabslInterfaceFieldWrapper<double, float> *__ball_ry;
00085
00086 std::map<std::string, XabslSkillWrapper *> __wrappers;
00087 std::map<std::string, XabslSkillWrapper *>::iterator __wit;
00088 };
00089
00090
00091 #endif