00001 #ifndef _SPEECHCONTROLMODULE_HEADER 00002 #define _SPEECHCONTROLMODULE_HEADER 00003 00004 00005 #include <OpenTracker/input/SpeechModule.h> 00006 00007 00008 namespace ot 00009 { 00010 00011 // class *SpeechControlModule* 00012 // ******************************************************************************************* 00013 // - sub class of SpeechModule 00014 // - hardcodes SpeechSet including commands for controlling the MRI scanner 00015 // - pushes event each 200 milliseconds for continuous movements 00016 00017 class SpeechControlModule : public SpeechModule 00018 { 00019 public: 00020 SpeechControlModule(); 00021 virtual ~SpeechControlModule(); 00022 00023 Node* createNode(const std::string &name, StringTable &attributes); 00024 void pushEvent(); 00025 void init(StringTable& attributes, ConfigNode *localTree); 00026 void stopAppl() { stopOt = true; }; 00027 int stop() { return stopOt ? 1 : 0; }; 00028 00029 00030 protected: 00031 bool stopOt; 00032 double lastPushTime; 00033 }; 00034 OT_MODULE(SpeechControlModule); 00035 } // namespace ot 00036 00037 00038 #endif
1.4.6