EmergencyLand.hpp
Go to the documentation of this file.
00001 /*
00002  * EmergencyLand.hpp
00003  *
00004  *  Created on: Dec 14, 2011
00005  *      Author: mriedel
00006  */
00007 
00008 #ifndef EMERGENCYLAND_HPP_
00009 #define EMERGENCYLAND_HPP_
00010 
00011 #include <telekyb_defines/telekyb_defines.hpp>
00012 #include <tk_behavior/Behavior.hpp>
00013 
00014 using namespace TELEKYB_NAMESPACE;
00015 
00016 namespace telekyb_behavior {
00017 
00022 class EmergencyLand : public Behavior {
00023 protected:
00024         Position3D landingPosition;
00025 
00026 public:
00027         EmergencyLand();
00028 
00029         virtual void initialize();
00030         virtual void destroy();
00031 
00032         // Called directly after Change Event is registered.
00033         virtual bool willBecomeActive(const TKState& currentState, const Behavior& previousBehavior);
00034         // Called after actual Switch. Note: During execution trajectoryStepCreation is used
00035         virtual void didBecomeActive(const TKState& currentState, const Behavior& previousBehavior);
00036         // Called directly after Change Event is registered: During execution trajectoryStepTermination is used
00037         virtual void willBecomeInActive(const TKState& currentState, const Behavior& nextBehavior);
00038         // Called after actual Switch. Runs in seperate Thread.
00039         virtual void didBecomeInActive(const TKState& currentState, const Behavior& nextBehavior);
00040 
00041         // called everytime a new TKState is available AND it is the NEW Behavior of an active Switch
00042         virtual void trajectoryStepCreation(const TKState& currentState, TKTrajectory& generatedTrajInput);
00043 
00044         // called everytime a new TKState is available. Should return false if invalid (swtich to next behavior, or Hover if undef).
00045         virtual void trajectoryStepActive(const TKState& currentState, TKTrajectory& generatedTrajInput);
00046 
00047         // called everytime a new TKState is available AND it is the OLD Behavior of an active Switch
00048         virtual void trajectoryStepTermination(const TKState& currentState, TKTrajectory& generatedTrajInput);
00049 
00050         // Return true if the active Behavior is (still) valid. Initiate Switch otherwise
00051         virtual bool isValid(const TKState& currentState) const;
00052 
00053 };
00054 
00055 } /* namespace telekyb_behavior */
00056 #endif /* EMERGENCYLAND_HPP_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines


tk_behavior
Author(s): Dr. Antonio Franchi and Martin Riedel
autogenerated on Mon Nov 11 2013 11:13:36