The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
fw_t Class Reference
Inheritance diagram for fw_t:
Inheritance graph

Public Member Functions

 fw_t ()
 
 ~fw_t ()
 
bool exit_request () const
 
- Public Member Functions inherited from MHAParser::parser_t
 parser_t (const std::string &help_text="")
 Construct detached node to be used in the configuration tree. More...
 
 ~parser_t ()
 
void insert_item (const std::string &, base_t *)
 Register a parser item into this sub-parser. More...
 
void remove_item (const std::string &)
 Remove an item by name. More...
 
void force_remove_item (const std::string &)
 Remove an item by name. More...
 
void remove_item (const base_t *)
 Remove an item by address. More...
 
- Public Member Functions inherited from MHAParser::base_t
 base_t (const std::string &)
 Constructor for base class of all parser nodes. More...
 
 base_t (const base_t &)
 Copy constructor for base_t. More...
 
base_toperator= (const base_t &)=default
 
 base_t (base_t &&)=delete
 
base_toperator= (base_t &&)=delete
 
virtual ~base_t ()
 
virtual std::string parse (const std::string &)
 Causes this node to process a command in the openMHA configuration language. More...
 
virtual void parse (const char *, char *, unsigned int)
 This function parses a command and writes the parsing result into a C character array. More...
 
virtual void parse (const std::vector< std::string > &, std::vector< std::string > &)
 
virtual std::string query_perm (const std::string &)
 
virtual std::string query_range (const std::string &)
 
std::string query_version (const std::string &)
 
std::string query_id (const std::string &)
 
std::string query_subst (const std::string &)
 
std::string query_addsubst (const std::string &)
 
std::string query_help (const std::string &)
 
std::string query_cmds (const std::string &)
 
void set_node_id (const std::string &)
 Set the identification string of this parser node. More...
 
void set_help (const std::string &)
 Set the help comment of a variable or parser. More...
 
void add_parent_on_insert (parser_t *, std::string)
 
void rm_parent_on_remove (parser_t *)
 
const std::string & fullname () const
 Return the full dot-separated path name of this parser node in the openMHA configuration tree. More...
 

Protected Attributes

io_lib_tio_lib
 
int proc_error
 
int io_error
 
- Protected Attributes inherited from MHAParser::base_t
query_map_t queries
 
bool data_is_initialized
 

Private Types

enum  state_t {
  fw_unprepared , fw_stopped , fw_starting , fw_running ,
  fw_stopping , fw_exiting
}
 

Private Member Functions

void prepare ()
 preparation for processing More...
 
void start ()
 start of processing More...
 
void stop ()
 stop/pause of processing More...
 
void release ()
 release of IO device More...
 
void quit ()
 controlled quit More...
 
void stopped (int, int)
 
void started ()
 
int process (mha_wave_t *, mha_wave_t **)
 
void exec_fw_command ()
 
void load_proc_lib ()
 
void load_io_lib ()
 
void fw_sleep_cmd ()
 
void fw_until_cmd ()
 
void get_input_signal_dimension ()
 
void async_read ()
 
void async_poll_msg ()
 
void get_parserstate ()
 

Static Private Member Functions

static void stopped (void *h, int proc_err, int io_err)
 
static void started (void *h)
 
static int process (void *h, mha_wave_t *sIn, mha_wave_t **sOut)
 

Private Attributes

fw_vars_t prepare_vars
 
MHAParser::int_mon_t nchannels_out
 
MHAParser::string_t proc_name
 
MHAParser::string_t io_name
 
MHAParser::bool_t exit_on_stop
 
MHAParser::int_t fw_sleep
 
MHAParser::string_t fw_until
 
MHAParser::kw_t fw_cmd
 
MHAParser::string_mon_t parserstate
 
MHAParser::string_t errorlog
 
MHAParser::string_t fatallog
 
MHAParser::vstring_t plugins
 
MHAParser::vstring_t plugin_paths
 
MHAParser::bool_t dump_mha
 
MHAParser::string_t inst_name
 A variable for naming MHA instances. More...
 
MHA_AC::algo_comm_class_t ac
 
PluginLoader::mhapluginloader_tproc_lib
 
mhaconfig_t cfin
 
mhaconfig_t cfout
 
state_t state
 
bool b_exit_request
 
MHAParser::string_mon_t proc_error_string
 
MHAEvents::patchbay_t< fw_tpatchbay
 

Additional Inherited Members

- Public Attributes inherited from MHAParser::base_t
MHAEvents::emitter_t writeaccess
 Event emitted on write access. More...
 
MHAEvents::emitter_t valuechanged
 Event emitted if the value has changed. More...
 
MHAEvents::emitter_t readaccess
 Event emitted on read access. More...
 
MHAEvents::emitter_t prereadaccess
 Event emitted on read access, before the data field is accessed. More...
 
- Protected Member Functions inherited from MHAParser::parser_t
std::string op_subparse (expression_t &)
 
std::string op_setval (expression_t &)
 
std::string op_query (expression_t &)
 
std::string query_type (const std::string &)
 
std::string query_dump (const std::string &)
 
std::string query_entries (const std::string &)
 
std::string query_readfile (const std::string &)
 
std::string query_savefile (const std::string &)
 
std::string query_savefile_compact (const std::string &)
 
std::string query_savemons (const std::string &)
 
std::string query_val (const std::string &)
 
std::string query_listids (const std::string &)
 
void set_id_string (const std::string &)
 
bool has_entry (const std::string &)
 
- Protected Member Functions inherited from MHAParser::base_t
void activate_query (const std::string &, query_t)
 
void notify ()
 

Member Enumeration Documentation

◆ state_t

enum fw_t::state_t
private
Enumerator
fw_unprepared 
fw_stopped 
fw_starting 
fw_running 
fw_stopping 
fw_exiting 

Constructor & Destructor Documentation

◆ fw_t()

fw_t::fw_t ( )

◆ ~fw_t()

fw_t::~fw_t ( )

Member Function Documentation

◆ exit_request()

bool fw_t::exit_request ( ) const
inline

◆ prepare()

void fw_t::prepare ( void  )
private

preparation for processing

◆ start()

void fw_t::start ( )
private

start of processing

◆ stop()

void fw_t::stop ( )
private

stop/pause of processing

◆ release()

void fw_t::release ( )
private

release of IO device

◆ quit()

void fw_t::quit ( )
private

controlled quit

◆ stopped() [1/2]

static void fw_t::stopped ( void *  h,
int  proc_err,
int  io_err 
)
inlinestaticprivate

◆ started() [1/2]

static void fw_t::started ( void *  h)
inlinestaticprivate

◆ process() [1/2]

static int fw_t::process ( void *  h,
mha_wave_t sIn,
mha_wave_t **  sOut 
)
inlinestaticprivate

◆ stopped() [2/2]

void fw_t::stopped ( int  proc_err,
int  io_err 
)
private

◆ started() [2/2]

void fw_t::started ( )
private

◆ process() [2/2]

int fw_t::process ( mha_wave_t s_in,
mha_wave_t **  s_out 
)
private

◆ exec_fw_command()

void fw_t::exec_fw_command ( )
private

◆ load_proc_lib()

void fw_t::load_proc_lib ( )
private

◆ load_io_lib()

void fw_t::load_io_lib ( )
private

◆ fw_sleep_cmd()

void fw_t::fw_sleep_cmd ( )
private

◆ fw_until_cmd()

void fw_t::fw_until_cmd ( )
private

◆ get_input_signal_dimension()

void fw_t::get_input_signal_dimension ( )
private

◆ async_read()

void fw_t::async_read ( )
inlineprivate

◆ async_poll_msg()

void fw_t::async_poll_msg ( )
private

◆ get_parserstate()

void fw_t::get_parserstate ( )
private

Member Data Documentation

◆ prepare_vars

fw_vars_t fw_t::prepare_vars
private

◆ nchannels_out

MHAParser::int_mon_t fw_t::nchannels_out
private

◆ proc_name

MHAParser::string_t fw_t::proc_name
private

◆ io_name

MHAParser::string_t fw_t::io_name
private

◆ exit_on_stop

MHAParser::bool_t fw_t::exit_on_stop
private

◆ fw_sleep

MHAParser::int_t fw_t::fw_sleep
private

◆ fw_until

MHAParser::string_t fw_t::fw_until
private

◆ fw_cmd

MHAParser::kw_t fw_t::fw_cmd
private

◆ parserstate

MHAParser::string_mon_t fw_t::parserstate
private

◆ errorlog

MHAParser::string_t fw_t::errorlog
private

◆ fatallog

MHAParser::string_t fw_t::fatallog
private

◆ plugins

MHAParser::vstring_t fw_t::plugins
private

◆ plugin_paths

MHAParser::vstring_t fw_t::plugin_paths
private

◆ dump_mha

MHAParser::bool_t fw_t::dump_mha
private

◆ inst_name

MHAParser::string_t fw_t::inst_name
private

A variable for naming MHA instances.

◆ ac

MHA_AC::algo_comm_class_t fw_t::ac
private

◆ proc_lib

PluginLoader::mhapluginloader_t* fw_t::proc_lib
private

◆ cfin

mhaconfig_t fw_t::cfin
private

◆ cfout

mhaconfig_t fw_t::cfout
private

◆ state

state_t fw_t::state
private

◆ b_exit_request

bool fw_t::b_exit_request
private

◆ io_lib

io_lib_t* fw_t::io_lib
protected

◆ proc_error

int fw_t::proc_error
protected

◆ io_error

int fw_t::io_error
protected

◆ proc_error_string

MHAParser::string_mon_t fw_t::proc_error_string
private

◆ patchbay

MHAEvents::patchbay_t<fw_t> fw_t::patchbay
private

The documentation for this class was generated from the following files: