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

Runtime configuration class of the ac2lsl plugin. More...

Public Member Functions

 cfg_t (MHA_AC::algo_comm_t &ac_, unsigned skip_, const std::string &source_id, const std::vector< std::string > &varnames_, double rate)
 C'tor of ac2lsl run time configuration. More...
 
void process ()
 

Private Member Functions

void create_or_replace_var (const std::string &name, const MHA_AC::comm_var_t &v)
 
void check_and_send ()
 

Private Attributes

std::map< std::string, std::unique_ptr< save_var_base_t > > varlist
 Maps variable name to unique ptr's of ac to lsl bridges. More...
 
unsigned skipcnt
 Counter of frames to skip. More...
 
const unsigned skip
 Number of frames to skip after each send. More...
 
const double srate
 Sampling rate of the stream. More...
 
const std::string source_id
 User configurable source id. More...
 
const MHA_AC::algo_comm_tac
 Handle to the ac space. More...
 

Detailed Description

Runtime configuration class of the ac2lsl plugin.

Constructor & Destructor Documentation

◆ cfg_t()

cfg_t::cfg_t ( MHA_AC::algo_comm_t ac_,
unsigned  skip_,
const std::string &  source_id,
const std::vector< std::string > &  varnames_,
double  rate 
)

C'tor of ac2lsl run time configuration.

Parameters
ac_AC space, source of data to send over LSL
skip_Number of frames to skip after each send
source_id_LSL identifier for this data stream
varnames_Names of AC variables to send over LSL
rateRate with wich chunks of data are sent to the LSL stream. Usually the rate with which process calls happen, but may be lower due to the subsampling caused by skip_

Member Function Documentation

◆ create_or_replace_var()

void cfg_t::create_or_replace_var ( const std::string &  name,
const MHA_AC::comm_var_t v 
)
private

◆ check_and_send()

void cfg_t::check_and_send ( )
private

◆ process()

void cfg_t::process ( void  )

Member Data Documentation

◆ varlist

std::map<std::string, std::unique_ptr<save_var_base_t> > ac2lsl::cfg_t::varlist
private

Maps variable name to unique ptr's of ac to lsl bridges.

◆ skipcnt

unsigned ac2lsl::cfg_t::skipcnt
private

Counter of frames to skip.

◆ skip

const unsigned ac2lsl::cfg_t::skip
private

Number of frames to skip after each send.

◆ srate

const double ac2lsl::cfg_t::srate
private

Sampling rate of the stream.

◆ source_id

const std::string ac2lsl::cfg_t::source_id
private

User configurable source id.

◆ ac

const MHA_AC::algo_comm_t& ac2lsl::cfg_t::ac
private

Handle to the ac space.


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