ImageCapture/MoNetTest/MoNetTest.h

Go to the documentation of this file.
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 MoNetTest_h_DEFINED
00013 #define MoNetTest_h_DEFINED
00014 
00015 #include <OPENR/OObject.h>
00016 #include <OPENR/OSubject.h>
00017 #include <OPENR/OObserver.h>
00018 #include <OPENR/ODataArchive.h>
00019 #include <MoNetData.h>
00020 #include "def.h"
00021 
00022 #include <list>
00023 using namespace std;
00024 
00025 enum MoNetTestState {
00026     MNTS_IDLE,
00027     MNTS_START,
00028     MNTS_WAITING_RESULT,
00029     MNTS_SHUTDOWN
00030 };
00031 
00032 const MoNetCommandID SLEEP2SLEEP_NULL = 0; // see MONETCMD.CFG
00033 const MoNetCommandID STAND2STAND_NULL = 2; // see MONETCMD.CFG
00034 
00035 class MoNetTest : public OObject {
00036 public:
00037     MoNetTest();
00038     virtual ~MoNetTest() {}
00039 
00040     OSubject*  subject[numOfSubject];
00041     OObserver* observer[numOfObserver];
00042 
00043     virtual OStatus DoInit   (const OSystemEvent& event);
00044     virtual OStatus DoStart  (const OSystemEvent& event);
00045     virtual OStatus DoStop   (const OSystemEvent& event);
00046     virtual OStatus DoDestroy(const OSystemEvent& event);
00047 
00048     void ReadyCommand(const OReadyEvent& event);
00049     void NotifyResult(const ONotifyEvent& event);
00050 
00051 private:
00052     void ParseCommandLine(char* cmdline);
00053     void Execute(MoNetCommandID cmdID);
00054 
00055     MoNetTestState moNetTestState;
00056     list<MoNetCommandID> commandQueue;
00057 };
00058 
00059 #endif // MoNetTest_h_DEFINED

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