summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
authorTom Rondeau2011-12-22 18:19:28 -0500
committerTom Rondeau2011-12-22 18:19:28 -0500
commit5faab4fbcf423cc614d53f0f3c557c2f055b7ed0 (patch)
tree35a9f4e2732213e23491bb0b2c8021031947ea52 /gnuradio-core/src/lib
parentcb3289d1494339cb0ac20bed080a0d37b99ab4fb (diff)
downloadgnuradio-5faab4fbcf423cc614d53f0f3c557c2f055b7ed0.tar.gz
gnuradio-5faab4fbcf423cc614d53f0f3c557c2f055b7ed0.tar.bz2
gnuradio-5faab4fbcf423cc614d53f0f3c557c2f055b7ed0.zip
filters: added accessor functions to FFT and FIR filter classes to return vector of taps.
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r--gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc7
-rw-r--r--gnuradio-core/src/lib/filter/gr_fft_filter_ccc.h1
-rw-r--r--gnuradio-core/src/lib/filter/gr_fft_filter_ccc.i1
-rw-r--r--gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc8
-rw-r--r--gnuradio-core/src/lib/filter/gr_fft_filter_fff.h1
-rw-r--r--gnuradio-core/src/lib/filter/gr_fft_filter_fff.i1
-rw-r--r--gnuradio-core/src/lib/filter/gr_fir_filter_XXX.cc.t6
-rw-r--r--gnuradio-core/src/lib/filter/gr_fir_filter_XXX.h.t1
-rw-r--r--gnuradio-core/src/lib/filter/gr_fir_filter_XXX.i.t1
9 files changed, 26 insertions, 1 deletions
diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc
index 02bfaf105..9fa98cc69 100644
--- a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc
+++ b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.cc
@@ -62,6 +62,7 @@ gr_fft_filter_ccc::gr_fft_filter_ccc (int decimation, const std::vector<gr_compl
#else
d_filter = new gri_fft_filter_ccc_sse(decimation, taps);
#endif
+ d_new_taps = taps;
d_nsamples = d_filter->set_taps(taps);
set_output_multiple(d_nsamples);
}
@@ -78,6 +79,12 @@ gr_fft_filter_ccc::set_taps (const std::vector<gr_complex> &taps)
d_updated = true;
}
+std::vector<gr_complex>
+gr_fft_filter_ccc::taps () const
+{
+ return d_new_taps;
+}
+
int
gr_fft_filter_ccc::work (int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.h b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.h
index 721a44a83..1b72a1c00 100644
--- a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.h
+++ b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.h
@@ -62,6 +62,7 @@ class GR_CORE_API gr_fft_filter_ccc : public gr_sync_decimator
~gr_fft_filter_ccc ();
void set_taps (const std::vector<gr_complex> &taps);
+ std::vector<gr_complex> taps () const;
int work (int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.i b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.i
index aa7564f54..812920d8b 100644
--- a/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.i
+++ b/gnuradio-core/src/lib/filter/gr_fft_filter_ccc.i
@@ -36,4 +36,5 @@ class gr_fft_filter_ccc : public gr_sync_decimator
~gr_fft_filter_ccc ();
void set_taps (const std::vector<gr_complex> &taps);
+ std::vector<gr_complex> taps () const;
};
diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc
index e5b218f20..c0a9b3483 100644
--- a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc
+++ b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.cc
@@ -55,7 +55,7 @@ gr_fft_filter_fff::gr_fft_filter_fff (int decimation, const std::vector<float> &
#else
d_filter = new gri_fft_filter_fff_sse(decimation, taps);
#endif
-
+ d_new_taps = taps;
d_nsamples = d_filter->set_taps(taps);
set_output_multiple(d_nsamples);
}
@@ -72,6 +72,12 @@ gr_fft_filter_fff::set_taps (const std::vector<float> &taps)
d_updated = true;
}
+std::vector<float>
+gr_fft_filter_fff::taps () const
+{
+ return d_new_taps;
+}
+
int
gr_fft_filter_fff::work (int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.h b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.h
index b0dc74883..ddd8dcac2 100644
--- a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.h
+++ b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.h
@@ -62,6 +62,7 @@ class GR_CORE_API gr_fft_filter_fff : public gr_sync_decimator
~gr_fft_filter_fff ();
void set_taps (const std::vector<float> &taps);
+ std::vector<float> taps () const;
int work (int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.i b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.i
index bbe84f99f..7e2cde977 100644
--- a/gnuradio-core/src/lib/filter/gr_fft_filter_fff.i
+++ b/gnuradio-core/src/lib/filter/gr_fft_filter_fff.i
@@ -36,4 +36,5 @@ class gr_fft_filter_fff : public gr_sync_decimator
~gr_fft_filter_fff ();
void set_taps (const std::vector<float> &taps);
+ std::vector<float> taps () const;
};
diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.cc.t b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.cc.t
index 29e351925..f7458e743 100644
--- a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.cc.t
+++ b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.cc.t
@@ -63,6 +63,12 @@ void
d_updated = true;
}
+std::vector<@TAP_TYPE@>
+@NAME@::taps () const
+{
+ return d_new_taps;
+}
+
int
@NAME@::work (int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.h.t b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.h.t
index db0625504..f638e7bb5 100644
--- a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.h.t
+++ b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.h.t
@@ -59,6 +59,7 @@ class GR_CORE_API @NAME@ : public gr_sync_decimator
~@NAME@ ();
void set_taps (const std::vector<@TAP_TYPE@> &taps);
+ std::vector<@TAP_TYPE@> taps () const;
int work (int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.i.t b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.i.t
index 0cbe8cbcc..fb4ff95af 100644
--- a/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.i.t
+++ b/gnuradio-core/src/lib/filter/gr_fir_filter_XXX.i.t
@@ -38,4 +38,5 @@ class @NAME@ : public gr_sync_decimator
~@NAME@ ();
void set_taps (const std::vector<@TAP_TYPE@> &taps);
+ std::vector<@TAP_TYPE@> taps () const;
};