MovingEar7.h

Go to the documentation of this file.
00001 //
00002 // Copyright 2003 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 MovingEar7_h_DEFINED
00013 #define MovingEar7_h_DEFINED
00014 
00015 #include <OPENR/OObject.h>
00016 #include <OPENR/OSubject.h>
00017 #include <OPENR/OObserver.h>
00018 #include "def.h"
00019 
00020 enum MovingEar7State {
00021     MES_IDLE,
00022     MES_START
00023 };
00024 
00025 static const char* const EAR_LOCATOR[] = {
00026     "PRM:/r1/c1/c2/c3/e5-Joint4:15",
00027     "PRM:/r1/c1/c2/c3/e6-Joint4:16",
00028 };
00029 
00030 class MovingEar7 : public OObject {
00031 public:
00032     MovingEar7();
00033     virtual ~MovingEar7() {}
00034 
00035     OSubject*  subject[numOfSubject];
00036     OObserver* observer[numOfObserver];
00037 
00038     virtual OStatus DoInit   (const OSystemEvent& event);
00039     virtual OStatus DoStart  (const OSystemEvent& event);
00040     virtual OStatus DoStop   (const OSystemEvent& event);
00041     virtual OStatus DoDestroy(const OSystemEvent& event);
00042 
00043     void Ready(const OReadyEvent& event);
00044 
00045 private:
00046     void OpenPrimitives();
00047     void NewCommandVectorData();
00048     void MoveEar();
00049 
00050     static const size_t NUM_COMMAND_VECTOR = 2;
00051     static const size_t NUM_EARS           = 2;
00052 
00053     MovingEar7State  movingEarState;
00054     OPrimitiveID     earID[NUM_EARS];
00055     RCRegion*        region[NUM_COMMAND_VECTOR];
00056 };
00057 
00058 #endif // MovingEar7_h_DEFINED

Generated on Sun Dec 2 23:04:29 2007 for openSDK by  doxygen 1.3.9.1