BcPOC
SF-HRP ASM implementation
|
00001 #ifndef _SFHRPPLAN_ 00002 #define _SFHRPPLAN_ 00003 00004 #include "i_engine_descriptor.hpp" 00005 #include "i_releaseable.hpp" 00006 00007 #include "reactive_planner.hpp" 00008 #include "init_phase.hpp" 00009 #include "term_phase.hpp" 00010 00011 class CSFHRPASM; 00012 class CCondition; 00013 00017 class CSFHRPPlan : public IReleaseable { 00018 public: 00019 00023 CSFHRPPlan(CSFHRPASM*, IEngineDescriptor *, int, CCondition*, InitPhase*, ReactivePlanner*, TermPhase*); 00024 00028 ~CSFHRPPlan(); 00032 int GetAction(); 00033 00037 int GetPriority(); 00038 00042 void Activate(); 00043 00047 void Deactivate(); 00048 00052 bool IsSwitched(); 00053 00059 void SwitchOut(); 00060 00066 void SwitchIn(); 00067 00071 bool IsActive(); 00072 00073 private: 00074 00078 int m_state; 00079 00083 int m_prio; 00084 00085 00089 InitPhase* m_init; 00090 00094 ReactivePlanner* m_rplanner; 00095 00099 TermPhase* m_term; 00100 00104 CCondition* m_condition; 00105 00109 CSFHRPASM* m_agent; 00110 00114 IEngineDescriptor* m_engineDescriptor; 00115 00119 enum { 00120 INITIALIZATION, 00121 EXECUTION, 00122 TERMINATION, 00123 FINISHED, 00124 SWITCHING_OUT, 00125 SWITCHING_IN, 00126 SWITCHED 00127 } states; 00128 00129 00130 00131 }; 00132 00133 #endif