8 #ifndef PSYLLID_FREQUENCY_MASK_TRIGGER_HH_ 9 #define PSYLLID_FREQUENCY_MASK_TRIGGER_HH_ 11 #include "transformer.hh" 17 #include "member_variables.hh" 84 public midge::_transformer< midge::type_list< freq_data >, midge::type_list< trigger_flag > >
136 mv_accessible( uint64_t, length );
137 mv_accessible_noset(
unsigned, n_packets_for_mask );
138 mv_accessible(
double, threshold_snr );
139 mv_accessible(
double, threshold_snr_high);
140 mv_accessible(
double, threshold_sigma );
141 mv_accessible(
double, threshold_sigma_high);
143 mv_accessible(
unsigned, n_spline_points );
144 mv_accessible_noset(
status_t, status );
146 mv_accessible(
unsigned, n_excluded_bins );
152 void write_mask(
const std::string& a_filename );
155 void execute( midge::diptera* a_midge =
nullptr );
187 return static_cast< uint32_t
>( a_trigger_mode );
196 return static_cast< uint32_t
>( a_threshold );
233 virtual bool do_run_command(
frequency_mask_trigger* a_node,
const std::string& a_cmd,
const scarab::param_node& a_args )
const;
void calculate_sigma_mask_spline_points(std::vector< double > &t_x_vals, std::vector< double > &t_y_vals, double threshold)
static threshold_t uint_to_threshold(uint32_t a_threshold_uint)
static uint32_t threshold_to_uint(threshold_t a_threshold)
std::string get_trigger_mode_str() const
void exe_add_to_mask(exe_func_context &a_ctx)
void set_threshold_power_sigma_high(double a_power_sigma)
static std::string trigger_mode_to_string(trigger_mode_t a_trigger_mode)
static uint32_t trigger_mode_to_uint(trigger_mode_t a_trigger_mode)
void set_threshold_ampl_snr(double a_ampl_snr)
static trigger_mode_t uint_to_trigger_mode(uint32_t a_trigger_mode_uint)
std::vector< double > f_variance_data
void set_mask_parameters_from_node(const scarab::param_node &a_mask_and_data_values)
void write_mask(const std::string &a_filename)
void set_threshold_power_snr_high(double a_power_snr)
std::string get_threshold_type_str() const
void switch_to_apply_trigger()
std::mutex f_exe_func_mutex
void(frequency_mask_trigger::* f_exe_func)(exe_func_context &a_ctx)
midge::enum_t f_in_command
static std::string threshold_to_string(threshold_t a_threshold)
void set_n_packets_for_mask(unsigned a_n_pkts)
static trigger_mode_t string_to_trigger_mode(const std::string &a_trigger_mode)
void exe_apply_threshold(exe_func_context &a_ctx)
std::vector< double > f_mask2
void set_threshold_power_snr(double a_power_snr)
void calculate_snr_mask_spline_points(std::vector< double > &t_x_vals, std::vector< double > &t_y_vals, double threshold)
std::vector< double > f_average_data
void set_threshold_dB(double a_dB)
virtual ~frequency_mask_trigger()
void set_threshold_type(const std::string &a_threshold_type)
static threshold_t string_to_threshold(const std::string &a_threshold_string)
void set_trigger_mode(const std::string &a_trigger_mode)
bool f_first_packet_after_start
std::atomic< bool > f_break_exe_func
std::vector< double > f_mask
void exe_apply_two_thresholds(exe_func_context &a_ctx)
void set_threshold_power_sigma(double a_power_sigma)
void execute(midge::diptera *a_midge=nullptr)
void switch_to_update_mask()