diff options
author | Tim O'Shea <tim.oshea753@gmail.com> | 2013-11-08 18:50:08 -0500 |
---|---|---|
committer | Tim O'Shea <tim.oshea753@gmail.com> | 2013-11-08 18:50:08 -0500 |
commit | 23e834450ad9e052662d4a3fd8ea87acd775c5ec (patch) | |
tree | 7a26e109d058fd4f71bcb4c169701beb8bffdce2 /gr-channels/lib/dynamic_channel_model_impl.h | |
parent | 917fb98fdd6f706a58dae515fc0e28fa5ac3b906 (diff) |
channels: setting up callbacks for most dynamic channel model parameters in GRC
Diffstat (limited to 'gr-channels/lib/dynamic_channel_model_impl.h')
-rw-r--r-- | gr-channels/lib/dynamic_channel_model_impl.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gr-channels/lib/dynamic_channel_model_impl.h b/gr-channels/lib/dynamic_channel_model_impl.h index b2651d28eb..2eabac0be0 100644 --- a/gr-channels/lib/dynamic_channel_model_impl.h +++ b/gr-channels/lib/dynamic_channel_model_impl.h @@ -68,6 +68,27 @@ namespace gr { void setup_rpc(); + double samp_rate() const { return d_sro_model->samp_rate(); } + double sro_dev_std() const { return d_sro_model->std_dev(); } + double sro_dev_max() const { return d_sro_model->max_dev(); } + double cfo_dev_std() const { return d_cfo_model->std_dev(); } + double cfo_dev_max() const { return d_cfo_model->max_dev(); } + double noise_amp() const { return d_noise->amplitude(); } + double doppler_freq() const { return d_fader->fDTs()*samp_rate(); } + double K() const { return d_fader->K(); } + + void set_samp_rate(double sr) { + d_fader->set_fDTs( doppler_freq()/samp_rate() ); + d_sro_model->set_samp_rate(sr); + d_cfo_model->set_samp_rate(sr); } + void set_sro_dev_std(double dev) { d_sro_model->set_max_dev(dev); } + void set_sro_dev_max(double dev) { d_sro_model->set_max_dev(dev); } + void set_cfo_dev_std(double dev) { d_cfo_model->set_std_dev(dev); } + void set_cfo_dev_max(double dev) { d_cfo_model->set_max_dev(dev); } + void set_noise_amp(double amp) { d_noise->set_amplitude(amp); } + void set_doppler_freq(double f){ d_fader->set_fDTs(f/samp_rate()); } + void set_K(double K){ d_fader->set_K(K); } + }; } /* namespace channels */ |