Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

module.h File Reference

Definitions for module communication. More...

#include <sent/tcpip.h>

Include dependency graph for module.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define DEFAULT_MODULEPORT   10500
 Default port number for module connection.

Functions

void main_module_loop ()
 Application main loop for module mode.
boolean module_disconnect ()
boolean module_is_connected ()
boolean module_is_active ()
 Return the process activity status.
boolean module_wants_terminate ()
 Return whether we currently has a request of immediate termination.
void module_reset_reload ()
void msock_exec_command (char *command)
 Process a module command.
void msock_process_command ()
void msock_check_and_process_command ()
int msock_check_in_adin ()
 callback function to process module command while input detection.


Detailed Description

Definitions for module communication.

Author:
Akinobu Lee
Date:
Sat Jun 18 23:43:15 2005
Revision
1.1.1.1

Definition in file module.h.


Function Documentation

void main_module_loop  ) 
 

Application main loop for module mode.

This function wait for a connection request from a client process, and when connected, it calls the recognition main loop for that. The established socket descriptor will be stored in the global variable "module_sd". In Win32, this process will not fork by the connection acceptance.

Definition at line 89 of file module.c.

Referenced by main().

boolean module_disconnect  ) 
 

Disconnect the current client.

Returns:
TRUE on success, or FALSE on failure.

Definition at line 152 of file module.c.

Referenced by m_errexit(), and m_exit().

boolean module_is_connected  ) 
 

Return whether a client process has been connected.

Returns:
TRUE if currently connected, or FALSE if not.

Definition at line 172 of file module.c.

Referenced by m_errexit(), and m_exit().

boolean module_is_active  ) 
 

Return the process activity status.

If TRUE, the process is currently activated, either monitoring an audio input or recognizing the current input. If FALSE, recognition is currently disabled, ignoring all the speech inputs.

Returns:
TRUE if process is currently activated, or FALSE if not.

Definition at line 563 of file module.c.

Referenced by adin_cut_callback_store_buffer(), and main_recognition_loop().

boolean module_wants_terminate  ) 
 

Return whether we currently has a request of immediate termination.

This function returns whether we now has an order for immediate termination. This status will be set by receiving "TERMINATE" command from module client, or when a grammar has been received with immediate update option. This function is typically called from several recognition functions and ad-in processing function to check if we should stop the current recognition process immediately.

Returns:
TRUE if we have a request of immediate termination, or FALSE if not.

Definition at line 592 of file module.c.

Referenced by adin_cut_callback_store_buffer(), get_back_trellis(), main_recognition_loop(), and wchmm_fbs().

void module_reset_reload  ) 
 

Clear the process_want_reload flag.

Definition at line 608 of file module.c.

Referenced by main_recognition_loop().

void msock_exec_command char *  command  ) 
 

Process a module command.

This function processes command string received from module client. This will be called whenever a command arrives from a client, interrupting the main recognition process. The status responses will be performed at this function immediately. On the whole, grammar modification (add/delete/(de)activation) will not be performed here. The received data are just stored in this function, and they will be processed later by calling multigram_exec() between the recognition process.

Parameters:
command [in] command string

Definition at line 326 of file module.c.

Referenced by main_recognition_loop().

void msock_process_command  ) 
 

Process one commands from client module. If no command is in the buffer, it will block until next command comes.

Definition at line 626 of file module.c.

Referenced by main_recognition_loop().

void msock_check_and_process_command  ) 
 

Process one commands from client module. If no command is in the buffer, it will return without blocking.

Definition at line 652 of file module.c.

Referenced by adin_cut_callback_store_buffer(), and main_recognition_loop().

int msock_check_in_adin  ) 
 

callback function to process module command while input detection.

This function will be called periodically from A/D-in function to check and process commands from module client. If some commands are found, it will be processed here. Also, if some termination or stop of recognition process is requested, this function returns to the caller as so.

Returns:
0 normally, -2 when there is immediate termination request, and -1 if there is recognition stop command.

Definition at line 707 of file module.c.

Referenced by main_recognition_loop().


Generated on Tue Mar 28 16:01:58 2006 for Julius by  doxygen 1.4.2