diff options
author | Adrian Suciu <adrian.suciu@analog.com> | 2018-11-15 17:26:22 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-11-15 21:40:54 -0800 |
commit | d3801c39375ac10ab68b5b8725f6867015f2bc40 (patch) | |
tree | f609841b34d8f1463d21e3b1918efb162456b944 /gr-analog/lib/sig_source_impl.h | |
parent | b29afca2de4e9a32c22a43b00c219c05f5c117e9 (diff) |
analog: sig_source: Add phase parameter
Note: This does not include GRC bindings.
Signed-off-by: Adrian Suciu <adrian.suciu@analog.com>
Signed-off-by: Martin Braun <martin.braun@ettus.com>
Diffstat (limited to 'gr-analog/lib/sig_source_impl.h')
-rw-r--r-- | gr-analog/lib/sig_source_impl.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gr-analog/lib/sig_source_impl.h b/gr-analog/lib/sig_source_impl.h index 9fd26582fa..616ce72b88 100644 --- a/gr-analog/lib/sig_source_impl.h +++ b/gr-analog/lib/sig_source_impl.h @@ -44,7 +44,7 @@ template<class T> public: sig_source_impl(double sampling_freq, gr_waveform_t waveform, - double wave_freq, double ampl, T offset = 0); + double wave_freq, double ampl, T offset = 0, float phase = 0); ~sig_source_impl(); virtual int work(int noutput_items, @@ -56,6 +56,7 @@ template<class T> double frequency() const { return d_frequency; } double amplitude() const { return d_ampl; } T offset() const { return d_offset; } + float phase() const { return d_nco.get_phase(); } void set_sampling_freq(double sampling_freq); void set_waveform(gr_waveform_t waveform); @@ -63,6 +64,8 @@ template<class T> void set_frequency(double frequency); void set_amplitude(double ampl); void set_offset(T offset); + void set_phase(float phase); + }; } /* namespace analog */ |