21 #ifndef DEVICE_HANDLER_H 22 #define DEVICE_HANDLER_H 28 #include <LimeSuite.h> 29 #include <lime/LMS7002M_parameters.h> 37 bool list_read =
false;
43 lms_device_t* address = NULL;
47 bool source_flag =
false;
48 bool sink_flag =
false;
49 bool mini_switch_workaround_flag =
false;
50 int source_device_type = -1;
51 int sink_device_type = -1;
52 int source_chip_mode = -1;
53 int sink_chip_mode = -1;
54 double source_sample_rate = -1;
55 double sink_sample_rate = -1;
56 size_t source_oversample = -1;
57 size_t sink_oversample = -1;
58 int source_file_switch = -1;
59 int sink_file_switch = -1;
60 const char *source_filename = NULL;
61 const char *sink_filename = NULL;
65 lms_info_str_t* list =
new lms_info_str_t[5];
67 std::vector<device> device_vector;
89 void error(
int device_number);
105 void open_device(
int device_number,
int device_type);
136 void check_blocks(
int device_number,
int block_type,
int device_type,
int chip_mode,
double sample_rate,
size_t oversample,
int file_switch,
const char *filename);
157 void set_chip_mode(
int device_number,
int device_type,
int chip_mode,
int channel,
bool direction);
168 void set_samp_rate(
int device_number,
const double rate,
size_t oversample);
181 void set_samp_rate_dir(
int device_number,
const int direction,
const double rate,
size_t oversample);
194 void set_rf_freq(
int device_number,
int device_type,
bool direction,
int channel,
float rf_freq);
218 void calibrate(
int device_number,
int device_type,
int calibration,
int direction,
int channel,
double bandwidth,
float rf_freq,
int path);
245 void set_lna_path(
int device_number,
int channel,
int lna_path);
265 void set_pa_path(
int device_number,
int channel,
int pa_path);
280 void set_analog_filter(
int device_number,
bool direction,
int channel,
int analog_filter,
float analog_bandw);
295 void set_digital_filter(
int device_number,
bool direction,
int channel,
int digital_filter,
float digital_bandw);
313 void set_gain(
int device_number,
bool direction,
int channel,
unsigned int gain_dB);
void mini_switch_workaround(int device_number)
void set_chip_mode(int device_number, int device_type, int chip_mode, int channel, bool direction)
void set_pa_path(int device_number, int channel, int pa_path)
void open_device(int device_number, int device_type)
Definition: device_handler.h:31
static device_handler & getInstance()
Definition: device_handler.h:77
void set_gain(int device_number, bool direction, int channel, unsigned int gain_dB)
void set_samp_rate_dir(int device_number, const int direction, const double rate, size_t oversample)
void set_lna_path_mini(int device_number, int lna_path_mini)
void set_digital_filter(int device_number, bool direction, int channel, int digital_filter, float digital_bandw)
void error(int device_number)
void check_blocks(int device_number, int block_type, int device_type, int chip_mode, double sample_rate, size_t oversample, int file_switch, const char *filename)
void set_samp_rate(int device_number, const double rate, size_t oversample)
lms_device_t * get_device(int device_number)
void set_analog_filter(int device_number, bool direction, int channel, int analog_filter, float analog_bandw)
void set_lna_path(int device_number, int channel, int lna_path)
void close_device(int device_number)
void set_pa_path_mini(int device_number, int pa_path_mini)
void set_rf_freq(int device_number, int device_type, bool direction, int channel, float rf_freq)
void settings_from_file(int device_number, const char *filename)
void calibrate(int device_number, int device_type, int calibration, int direction, int channel, double bandwidth, float rf_freq, int path)