Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Examples  

gadget::Speech Class Reference

#include <Speech.h>

List of all members.

Public Types

enum  Mode { DICTATE, COMMAND, ON, OFF }

Public Methods

 Speech ()
 Constructs using element. More...

 ~Speech ()
 Destructor. More...

virtual std::string getWord ()
virtual int getId ()
virtual void setMode (Mode mode)
virtual std::list< asdfjlk > & getList ()
virtual void config ()
virtual bool startSampling ()=0
virtual bool stopSampling ()=0
virtual bool sample ()=0
virtual void updateData ()=0

Protected Methods

void startThread ()

Static Protected Methods

void controlLoop (Speech &currentInstance)

Protected Attributes

std::list< asdfjlk_wordQueue
Mode _currentMode
std::string _filename
std::string _dragonIP
int _dragonPort
std::string _user


Member Enumeration Documentation

enum gadget::Speech::Mode
 

Enumeration values:
DICTATE 
COMMAND 
ON 
OFF 

Definition at line 56 of file Speech.h.

00057    {
00058       DICTATE,COMMAND,ON,OFF
00059    };


Constructor & Destructor Documentation

gadget::Speech::Speech  
 

Constructs using element.

gadget::Speech::~Speech  
 

Destructor.


Member Function Documentation

std::string gadget::Speech::getWord   [inline, virtual]
 

Definition at line 90 of file Speech.h.

References _wordQueue.

00091 {
00092    std::string word = "";
00093 
00094    if (_wordQueue.size > 0)
00095    {
00096       word = (*_wordQueue.begin()).word;
00097       _wordQueue.pop_front();
00098    }
00099 
00100    return word;
00101 }

int gadget::Speech::getId   [inline, virtual]
 

Definition at line 103 of file Speech.h.

References _wordQueue.

00104 {
00105    int id = -1;
00106 
00107    if (_wordQueue.size > 0)
00108    {
00109       id = (*_wordQueue.begin()).id;
00110       _wordQueue.pop_front();
00111    }
00112 
00113    return id;
00114 }

void gadget::Speech::setMode Mode    mode [inline, virtual]
 

Definition at line 116 of file Speech.h.

00117 {
00118    _mode = mode;
00119    // TODO: tell dragon about the mode change.
00120 }

std::list< asdfjlk > & gadget::Speech::getList   [inline, virtual]
 

Definition at line 122 of file Speech.h.

References _wordQueue.

00123 {
00124    return _wordQueue;
00125 }

void gadget::Speech::config   [inline, virtual]
 

Definition at line 128 of file Speech.h.

References _dragonIP, _dragonPort, _filename, and _user.

00129 {
00130    _filename = "somefile.vjs";
00131    _dragonIP = "129.186.232.70";
00132    _dragonPort = 5600;
00133    _user = "kevin";
00134 }

virtual bool gadget::Speech::startSampling   [pure virtual]
 

virtual bool gadget::Speech::stopSampling   [pure virtual]
 

virtual bool gadget::Speech::sample   [pure virtual]
 

virtual void gadget::Speech::updateData   [pure virtual]
 

void gadget::Speech::startThread   [protected]
 

void gadget::Speech::controlLoop Speech &    currentInstance [static, protected]
 


Member Data Documentation

std::list<asdfjlk> gadget::Speech::_wordQueue [protected]
 

Definition at line 75 of file Speech.h.

Referenced by getId, getList, and getWord.

Mode gadget::Speech::_currentMode [protected]
 

Definition at line 76 of file Speech.h.

std::string gadget::Speech::_filename [protected]
 

Definition at line 79 of file Speech.h.

Referenced by config.

std::string gadget::Speech::_dragonIP [protected]
 

Definition at line 80 of file Speech.h.

Referenced by config.

int gadget::Speech::_dragonPort [protected]
 

Definition at line 81 of file Speech.h.

Referenced by config.

std::string gadget::Speech::_user [protected]
 

Definition at line 82 of file Speech.h.

Referenced by config.


The documentation for this class was generated from the following file:
Generated on Sun May 2 14:27:03 2004 for Gadgeteer by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002