SpeechRecognitionInterface Fawkes BlackBoard Interface. More...
#include <>>
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 Message * | create_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. |
SpeechRecognitionInterface Fawkes BlackBoard Interface.
The interface provides access to a spech recognition facility.
Definition at line 33 of file SpeechRecognitionInterface.h.
void fawkes::SpeechRecognitionInterface::copy_values | ( | const Interface * | other | ) | [virtual] |
Copy values from other interface.
other | other 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.
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.
type | message type |
UnknownTypeException | thrown 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.
enumtype | enum type as string | |
val | value to convert |
UnknownTypeException | thrown 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.
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.
Definition at line 144 of file SpeechRecognitionInterface.cpp.
size_t fawkes::SpeechRecognitionInterface::maxlenof_counter | ( | ) | const |
Get maximum length of counter value.
Definition at line 119 of file SpeechRecognitionInterface.cpp.
size_t fawkes::SpeechRecognitionInterface::maxlenof_enabled | ( | ) | const |
Get maximum length of enabled value.
Definition at line 189 of file SpeechRecognitionInterface.cpp.
size_t fawkes::SpeechRecognitionInterface::maxlenof_processing | ( | ) | const |
Get maximum length of processing value.
Definition at line 154 of file SpeechRecognitionInterface.cpp.
size_t fawkes::SpeechRecognitionInterface::maxlenof_text | ( | ) | const |
Get maximum length of text value.
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.
message | Message to check |
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.
new_counter | new 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.
new_enabled | new 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.
new_processing | new 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.
new_text | new 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.
Definition at line 74 of file SpeechRecognitionInterface.cpp.