Fawkes API Fawkes Development Version

fawkes::SpeechRecognitionInterface Class Reference

SpeechRecognitionInterface Fawkes BlackBoard Interface. More...

#include <>>

Inheritance diagram for fawkes::SpeechRecognitionInterface:

List of all members.

Classes

class  ResetMessage
 ResetMessage Fawkes BlackBoard Interface Message. More...
class  SetEnabledMessage
 SetEnabledMessage Fawkes BlackBoard Interface Message. More...
struct  SpeechRecognitionInterface_data_t
 Internal data storage, do NOT modify!

Public Member Functions

virtual bool message_valid (const Message *message) const
 Check if message is valid and can be enqueued.
char * text () const
 Get text value.
void set_text (const char *new_text)
 Set text value.
size_t maxlenof_text () const
 Get maximum length of text value.
uint32_t counter () const
 Get counter value.
void set_counter (const uint32_t new_counter)
 Set counter value.
size_t maxlenof_counter () const
 Get maximum length of counter value.
bool is_processing () const
 Get processing value.
void set_processing (const bool new_processing)
 Set processing value.
size_t maxlenof_processing () const
 Get maximum length of processing value.
bool is_enabled () const
 Get enabled value.
void set_enabled (const bool new_enabled)
 Set enabled value.
size_t maxlenof_enabled () const
 Get maximum length of enabled value.
virtual Messagecreate_message (const char *type) const
 Create message based on type name.
virtual void copy_values (const Interface *other)
 Copy values from other interface.
virtual const char * enum_tostring (const char *enumtype, int val) const
 Convert arbitrary enum value to string.

Detailed Description

SpeechRecognitionInterface Fawkes BlackBoard Interface.

The interface provides access to a spech recognition facility.

Definition at line 33 of file SpeechRecognitionInterface.h.


Member Function Documentation

void fawkes::SpeechRecognitionInterface::copy_values ( const Interface other) [virtual]

Copy values from other interface.

Parameters:
otherother interface to copy values from

Implements fawkes::Interface.

Definition at line 226 of file SpeechRecognitionInterface.cpp.

References fawkes::Interface::type().

uint32_t fawkes::SpeechRecognitionInterface::counter ( ) const

Get counter value.

Counter for messages. Increased after each new recognized string.

Returns:
counter value

Definition at line 109 of file SpeechRecognitionInterface.cpp.

Message * fawkes::SpeechRecognitionInterface::create_message ( const char *  type) const [virtual]

Create message based on type name.

This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.

Parameters:
typemessage type
Returns:
message of the given type, empty
Exceptions:
UnknownTypeExceptionthrown if this interface cannot create a message of the given type.

Implements fawkes::Interface.

Definition at line 209 of file SpeechRecognitionInterface.cpp.

const char * fawkes::SpeechRecognitionInterface::enum_tostring ( const char *  enumtype,
int  val 
) const [virtual]

Convert arbitrary enum value to string.

Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.

Parameters:
enumtypeenum type as string
valvalue to convert
Returns:
string representation of value
Exceptions:
UnknownTypeExceptionthrown if enumtype is not specified for interface.

Implements fawkes::Interface.

Definition at line 237 of file SpeechRecognitionInterface.cpp.

bool fawkes::SpeechRecognitionInterface::is_enabled ( ) const

Get enabled value.

True, if speech processing is currently enabled, false otherwise.

Returns:
enabled value

Definition at line 179 of file SpeechRecognitionInterface.cpp.

bool fawkes::SpeechRecognitionInterface::is_processing ( ) const

Get processing value.

True, if the the speech recognition is currently processing.

Returns:
processing value

Definition at line 144 of file SpeechRecognitionInterface.cpp.

size_t fawkes::SpeechRecognitionInterface::maxlenof_counter ( ) const

Get maximum length of counter value.

Returns:
length of counter value, can be length of the array or number of maximum number of characters for a string

Definition at line 119 of file SpeechRecognitionInterface.cpp.

size_t fawkes::SpeechRecognitionInterface::maxlenof_enabled ( ) const

Get maximum length of enabled value.

Returns:
length of enabled value, can be length of the array or number of maximum number of characters for a string

Definition at line 189 of file SpeechRecognitionInterface.cpp.

size_t fawkes::SpeechRecognitionInterface::maxlenof_processing ( ) const

Get maximum length of processing value.

Returns:
length of processing value, can be length of the array or number of maximum number of characters for a string

Definition at line 154 of file SpeechRecognitionInterface.cpp.

size_t fawkes::SpeechRecognitionInterface::maxlenof_text ( ) const

Get maximum length of text value.

Returns:
length of text value, can be length of the array or number of maximum number of characters for a string

Definition at line 84 of file SpeechRecognitionInterface.cpp.

bool fawkes::SpeechRecognitionInterface::message_valid ( const Message message) const [virtual]

Check if message is valid and can be enqueued.

Parameters:
messageMessage to check
Returns:
true if the message is valid, false otherwise.

Implements fawkes::Interface.

Definition at line 388 of file SpeechRecognitionInterface.cpp.

void fawkes::SpeechRecognitionInterface::set_counter ( const uint32_t  new_counter)

Set counter value.

Counter for messages. Increased after each new recognized string.

Parameters:
new_counternew counter value

Definition at line 131 of file SpeechRecognitionInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::SpeechRecognitionInterface::set_enabled ( const bool  new_enabled)

Set enabled value.

True, if speech processing is currently enabled, false otherwise.

Parameters:
new_enablednew enabled value

Definition at line 201 of file SpeechRecognitionInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::SpeechRecognitionInterface::set_processing ( const bool  new_processing)

Set processing value.

True, if the the speech recognition is currently processing.

Parameters:
new_processingnew processing value

Definition at line 166 of file SpeechRecognitionInterface.cpp.

References fawkes::Interface::data_changed.

void fawkes::SpeechRecognitionInterface::set_text ( const char *  new_text)

Set text value.

Last spoken string. Must be properly null-terminated.

Parameters:
new_textnew text value

Definition at line 96 of file SpeechRecognitionInterface.cpp.

References fawkes::Interface::data_changed.

char * fawkes::SpeechRecognitionInterface::text ( ) const

Get text value.

Last spoken string. Must be properly null-terminated.

Returns:
text value

Definition at line 74 of file SpeechRecognitionInterface.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends