00001 // 00002 // Copyright 2002,2004 Sony Corporation 00003 // 00004 // Permission to use, copy, modify, and redistribute this software for 00005 // non-commercial use is hereby granted. 00006 // 00007 // This software is provided "as is" without warranty of any kind, 00008 // either expressed or implied, including but not limited to the 00009 // implied warranties of fitness for a particular purpose. 00010 // 00011 00012 #ifndef MotionAgents_h_DEFINED 00013 #define MotionAgents_h_DEFINED 00014 00015 #include <OPENR/OObject.h> 00016 #include <OPENR/OSubject.h> 00017 #include <OPENR/OObserver.h> 00018 #include "def.h" 00019 #include "MoNetAgentManager.h" 00020 #include "NeutralAgent.h" 00021 #include "MTNAgent.h" 00022 #include "NeutralAgent7.h" 00023 #include "MTNAgent7.h" 00024 #include "MTNWALKAgent7.h" 00025 00026 enum MotionAgentsState { 00027 MAS_IDLE, 00028 MAS_START 00029 }; 00030 00031 class MotionAgents : public OObject { 00032 public: 00033 MotionAgents(); 00034 virtual ~MotionAgents() {} 00035 00036 OSubject* subject[numOfSubject]; 00037 OObserver* observer[numOfObserver]; 00038 00039 virtual OStatus DoInit (const OSystemEvent& event); 00040 virtual OStatus DoStart (const OSystemEvent& event); 00041 virtual OStatus DoStop (const OSystemEvent& event); 00042 virtual OStatus DoDestroy(const OSystemEvent& event); 00043 00044 void NotifyCommand(const ONotifyEvent& event); 00045 void ReadyEffector(const OReadyEvent& event); 00046 00047 private: 00048 MotionAgentsState motionAgentsState; 00049 MoNetAgentManager moNetAgentManager; 00050 NeutralAgent neutralAgent; 00051 MTNAgent mtnAgent; 00052 NeutralAgent7 neutralAgent7; 00053 MTNAgent7 mtnAgent7; 00054 MTNWALKAgent7 mtnwalkAgent7; 00055 }; 00056 00057 #endif // MotionAgents_h_DEFINED