summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau2011-12-22 18:20:33 -0500
committerTom Rondeau2011-12-22 18:20:33 -0500
commitc1c68974a6677f6dd81b1fb6e3c129e8d08c1fd0 (patch)
tree4f5cf2b27907c32deef7500615e7504eb5523946
parent5cd411a7e260b0721fecbac6c53b0717b2adf7e6 (diff)
downloadgnuradio-c1c68974a6677f6dd81b1fb6e3c129e8d08c1fd0.tar.gz
gnuradio-c1c68974a6677f6dd81b1fb6e3c129e8d08c1fd0.tar.bz2
gnuradio-c1c68974a6677f6dd81b1fb6e3c129e8d08c1fd0.zip
core: added accessors to get all settable values of the channel_model objects.
-rw-r--r--gnuradio-core/src/lib/hier/gr_channel_model.cc25
-rw-r--r--gnuradio-core/src/lib/hier/gr_channel_model.h5
-rw-r--r--gnuradio-core/src/lib/hier/gr_channel_model.i5
3 files changed, 35 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/hier/gr_channel_model.cc b/gnuradio-core/src/lib/hier/gr_channel_model.cc
index fb57e808a..5f190e972 100644
--- a/gnuradio-core/src/lib/hier/gr_channel_model.cc
+++ b/gnuradio-core/src/lib/hier/gr_channel_model.cc
@@ -99,3 +99,28 @@ gr_channel_model::set_timing_offset(double epsilon)
{
d_timing_offset->set_interp_ratio(epsilon);
}
+
+
+double
+gr_channel_model::noise_voltage() const
+{
+ return d_noise->amplitude();
+}
+
+double
+gr_channel_model::frequency_offset() const
+{
+ return d_freq_offset->frequency();
+}
+
+std::vector<gr_complex>
+gr_channel_model::taps() const
+{
+ return d_multipath->taps();
+}
+
+double
+gr_channel_model::timing_offset() const
+{
+ return d_timing_offset->interp_ratio();
+}
diff --git a/gnuradio-core/src/lib/hier/gr_channel_model.h b/gnuradio-core/src/lib/hier/gr_channel_model.h
index 07c0c76b6..c5d06ce11 100644
--- a/gnuradio-core/src/lib/hier/gr_channel_model.h
+++ b/gnuradio-core/src/lib/hier/gr_channel_model.h
@@ -71,4 +71,9 @@ class GR_CORE_API gr_channel_model : public gr_hier_block2
void set_frequency_offset(double frequency_offset);
void set_taps(const std::vector<gr_complex> &taps);
void set_timing_offset(double epsilon);
+
+ double noise_voltage() const;
+ double frequency_offset() const;
+ std::vector<gr_complex> taps() const;
+ double timing_offset() const;
};
diff --git a/gnuradio-core/src/lib/hier/gr_channel_model.i b/gnuradio-core/src/lib/hier/gr_channel_model.i
index ff9ab466d..2e0cb7bdf 100644
--- a/gnuradio-core/src/lib/hier/gr_channel_model.i
+++ b/gnuradio-core/src/lib/hier/gr_channel_model.i
@@ -42,4 +42,9 @@ class gr_channel_model : public gr_hier_block2
void set_frequency_offset(double frequency_offset);
void set_taps(const std::vector<gr_complex> &taps);
void set_timing_offset(double epsilon);
+
+ double noise_voltage() const;
+ double frequency_offset() const;
+ std::vector<gr_complex> taps() const;
+ double timing_offset() const;
};