00001 /* 00002 * SystemBehaviorContainer.hpp 00003 * 00004 * Created on: Nov 12, 2011 00005 * Author: mriedel 00006 */ 00007 00008 #ifndef SYSTEMBEHAVIORCONTAINER_HPP_ 00009 #define SYSTEMBEHAVIORCONTAINER_HPP_ 00010 00011 #include <telekyb_defines/telekyb_defines.hpp> 00012 00013 #include <tk_behavior/BehaviorContainer.hpp> 00014 00015 // Ok it's a little bit confusing that behavior plugin path and include are different. 00016 // I should rename this. 00017 // ros_package name != include folder != behavior namespace :( 00018 #include <behaviors/NormalBrake.hpp> 00019 #include <behaviors/Hover.hpp> 00020 #include <behaviors/Ground.hpp> 00021 #include <behaviors/TakeOff.hpp> 00022 #include <behaviors/Land.hpp> 00023 #include <behaviors/EmergencyLand.hpp> 00024 00025 using namespace telekyb_behavior; 00026 00027 namespace TELEKYB_NAMESPACE { 00028 00029 class SystemBehaviorContainer : public BehaviorContainer { 00030 protected: 00031 // map 00032 std::map<std::string, Behavior*> systemBehaviorMap; 00033 00034 NormalBrake* normalBrake; 00035 Hover* hover; 00036 Ground* ground; 00037 EmergencyLand* emergencyLand; 00038 00039 // These are never interfaced by the controller. 00040 //TakeOff* takeOff; 00041 //Land* land; 00042 00043 // called by Constructor. Loads System Behaviors. 00044 void loadSystemBehaviors(); 00045 00046 // Overwrite to use Map 00047 Behavior* loadBehavior(const std::string& behaviorClassName); 00048 00049 public: 00050 SystemBehaviorContainer(); 00051 virtual ~SystemBehaviorContainer(); 00052 00053 // Accessor System Behaviors 00054 NormalBrake* getNormalBrake() const; 00055 Hover* getHover() const; 00056 Ground* getGround() const; 00057 EmergencyLand* getEmergencyLand() const; 00058 //TakeOff* getTakeOff() const; 00059 //Land* getLand() const; 00060 00061 Behavior* getBehaviorByName(const std::string& behaviorClassName) const; 00062 }; 00063 00064 } /* namespace telekyb */ 00065 #endif /* SYSTEMBEHAVIORCONTAINER_HPP_ */