Radio Control  Control Software and GUI for the Panoradio SDR, by DC9ST 2016
Public Member Functions | Private Attributes | List of all members
WaterfallData Class Reference

holds a 2 dimensional array for display in a Waterfall Plot (instanciated by class WaterfallPlot) More...

#include <waterfalldata.h>

Public Member Functions

 WaterfallData (int data_array_xsize, int data_array_ysize)
 constructor: allocates memory, sets default background value to -200 More...
 
 ~WaterfallData ()
 destruktor: frees memory of 2 dim array
 
void set_background_value (double background_value)
 set the value for "background" areas with no information, which occurs e.g. at zoom out (a default value is set in code) More...
 
void set_next_data_line (double *array)
 sets a new line (first line) in the array and scrolls data in the array More...
 
double ** get_ptr_to_array ()
 accesses a pointer to the 2 dimensional data array returns pointer
 
void shift_data_array (int shift_value)
 shifts data, left-right (when waterfall is shifted) More...
 
void zoom_data_in (int center_idx)
 zooms one step into data array (when waterfall is zoomed in) More...
 
void zoom_data_out (int center_idx)
 zooms one step out of data array (when waterfall is zoomed out) More...
 
void delete_all_data ()
 sets all values in data array to background color (empty waterfall)
 

Private Attributes

double ** data_array_
 
double * scroll_pointer_temp_
 
int data_array_xsize_
 
int data_array_ysize_
 
double background_value_
 

Detailed Description

holds a 2 dimensional array for display in a Waterfall Plot (instanciated by class WaterfallPlot)

Constructor & Destructor Documentation

WaterfallData::WaterfallData ( int  data_array_xsize,
int  data_array_ysize 
)

constructor: allocates memory, sets default background value to -200

Parameters
data_array_xsizewidth of data array
data_array_ysizeheight of data array

Member Function Documentation

void WaterfallData::set_background_value ( double  background_value)
inline

set the value for "background" areas with no information, which occurs e.g. at zoom out (a default value is set in code)

Parameters
background_value
void WaterfallData::set_next_data_line ( double *  array)

sets a new line (first line) in the array and scrolls data in the array

Parameters
*arrayarray of data of length data_array_xsize (a new line)
void WaterfallData::shift_data_array ( int  shift_value)

shifts data, left-right (when waterfall is shifted)

Parameters
shift_valuehow far the plot is to be shifted (counted in array indices)
void WaterfallData::zoom_data_in ( int  center_idx)

zooms one step into data array (when waterfall is zoomed in)

Parameters
center_idxindex of the array, where the zoom was centered on
void WaterfallData::zoom_data_out ( int  center_idx)

zooms one step out of data array (when waterfall is zoomed out)

Parameters
center_idxindex of the array, where the zoom was centered on

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