Radio Control  Control Software and GUI for the Panoradio SDR, by DC9ST 2016
testgenerator.h
1 #ifndef TESTGENERATOR_H
2 #define TESTGENERATOR_H
3 
4 #include <QObject>
5 #include "stipcores.h"
6 #include <QTimer>
7 
9 class Testgenerator : public QObject
10 {
11  Q_OBJECT
12 public:
14  explicit Testgenerator(QObject *parent = 0);
15 
18 
23  void init_input_mux(int address, int memsize,int init_value);
24 
30  void init_generator(int address, int memsize, double master_frequency, int phase_width);
31 
32 signals:
35  void send_true_frequency(double true_frequency);
36 
37 public slots:
40  void get_signal_source(int source);
41 
44  void get_single(double frequency);
45 
50  void get_sweep(double start_f, double stop_f, double step_f);
51 
53  void get_sweep_stopped(bool stopped);
54 
55 private slots:
57  void sweep_timer_slot();
58 
59 private:
60  DDS *test_generator_; // RF sine generator for debugging
61  double test_sweep_start_freq_;
62  double test_sweep_stop_freq_;
63  double test_sweep_step_freq_;
64  double test_sweep_frequency_;
65  bool sweep_active_;
66  bool sweep_stopped_;
67 
68  IP_Driver *input_mux_ctrl_; // MUX controller (GPIO) for selecting the input signal
69 };
70 
71 #endif // TESTGENERATOR_H
Testgenerator(QObject *parent=0)
constructor
Definition: testgenerator.cpp:3
Class for controlling the RF test generator and selecting the input source (RF/ADC, test generator or step/impulse stimulus)
Definition: testgenerator.h:9
void get_sweep(double start_f, double stop_f, double step_f)
request a change of the testgenerator to sweep mode
Definition: testgenerator.cpp:51
~Testgenerator()
destructor
Definition: testgenerator.cpp:20
void send_true_frequency(double true_frequency)
send the current test frequency (after it has been newly set)
void init_input_mux(int address, int memsize, int init_value)
initialization function for the input mux GPIO
Definition: testgenerator.cpp:25
void get_signal_source(int source)
request a change of the input source
Definition: testgenerator.cpp:36
void sweep_timer_slot()
increments the sweep frequency (timer slot)
Definition: testgenerator.cpp:63
void init_generator(int address, int memsize, double master_frequency, int phase_width)
initializes test generator IP core
Definition: testgenerator.cpp:31
void get_single(double frequency)
request a change of the testgenerator to single frequency mode
Definition: testgenerator.cpp:44
void get_sweep_stopped(bool stopped)
requests halt or continue for the sweep frequency
Definition: testgenerator.cpp:59