The Open Master Hearing Aid (openMHA)  openMHA
Open community platform for hearing aid algorithm research
matlab_wrapper::callback Class Reference

Utility class connecting a user_config_t instance to its corresponding configuration parser. More...

Public Member Functions

 callback (matlab_wrapper_t *parent_, user_config_t *user_config_, MHAParser::mfloat_t *var_)
 Ctor. More...
 
void on_writeaccess ()
 Write access callback. More...
 

Private Attributes

user_config_t * user_config
 Ptr to user_config_t. More...
 
MHAParser::mfloat_tvar
 Ptr to parser. More...
 
matlab_wrapper_tparent
 Ptr to parent plugin. More...
 

Detailed Description

Utility class connecting a user_config_t instance to its corresponding configuration parser.

Provides the callback. Every time the a user defined configuration parser is changed, this class makes sure that the corresponding 'matlab-side' struct is also changed and a new real time config is created and pushed.

Constructor & Destructor Documentation

◆ callback()

matlab_wrapper::callback::callback ( matlab_wrapper_t parent_,
user_config_t *  user_config_,
MHAParser::mfloat_t var_ 
)

Ctor.

Parameters
parent_Ptr to the parent parser. Used to signal finished change.
user_config_Ptr to user_config_t struct holding the 'matlab side' of the configuration variable
var_Ptr to the configuration parser corresponding to user_config_

Member Function Documentation

◆ on_writeaccess()

void matlab_wrapper::callback::on_writeaccess ( )

Write access callback.

To be called on every writeaccess of *var. Synchronises *var and *user_config.

Member Data Documentation

◆ user_config

user_config_t* matlab_wrapper::callback::user_config
private

Ptr to user_config_t.

◆ var

MHAParser::mfloat_t* matlab_wrapper::callback::var
private

Ptr to parser.

◆ parent

matlab_wrapper_t* matlab_wrapper::callback::parent
private

Ptr to parent plugin.


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