summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-05-16 15:56:55 -0400
committerTom Rondeau <tom@trondeau.com>2014-05-17 17:45:17 -0400
commitbbc5882fb9ac4b1a9815c9c634d977e8776d73fa (patch)
tree9c963950220e2bc3e9c93fdcc1928787af5cc659
parentfbe59ce5a58477c6f60cff59b81c0cd3a8e2e024 (diff)
digital: don't need the FEC info for the tagged stream corr access code.
Currently, running FEC on payload before header, so the header encodes the fully encoded payload lenth.
-rw-r--r--gr-digital/grc/digital_correlate_access_code_xx_ts.xml16
-rw-r--r--gr-digital/include/gnuradio/digital/correlate_access_code_ff_ts.h20
-rw-r--r--gr-digital/lib/correlate_access_code_ff_ts_impl.cc45
-rw-r--r--gr-digital/lib/correlate_access_code_ff_ts_impl.h11
4 files changed, 7 insertions, 85 deletions
diff --git a/gr-digital/grc/digital_correlate_access_code_xx_ts.xml b/gr-digital/grc/digital_correlate_access_code_xx_ts.xml
index 547bbb76a1..467c2c84d9 100644
--- a/gr-digital/grc/digital_correlate_access_code_xx_ts.xml
+++ b/gr-digital/grc/digital_correlate_access_code_xx_ts.xml
@@ -9,7 +9,7 @@
<key>digital_correlate_access_code_xx_ts</key>
<import>from gnuradio import digital</import>
<make>digital.correlate_access_code_$(type.fcn)_ts($access_code,
- $threshold, $tagname, $fec_rate, $fec_extra)</make>
+ $threshold, $tagname)</make>
<param>
<name>IO Type</name>
@@ -46,20 +46,6 @@
<type>string</type>
</param>
- <param>
- <name>FEC Rate</name>
- <key>fec_rate</key>
- <value>1</value>
- <type>float</type>
- </param>
-
- <param>
- <name>FEC Extras</name>
- <key>fec_extra</key>
- <value>0</value>
- <type>int</type>
- </param>
-
<sink>
<name>in</name>
<type>$type</type>
diff --git a/gr-digital/include/gnuradio/digital/correlate_access_code_ff_ts.h b/gr-digital/include/gnuradio/digital/correlate_access_code_ff_ts.h
index 5d05c890d0..b0485b1d90 100644
--- a/gr-digital/include/gnuradio/digital/correlate_access_code_ff_ts.h
+++ b/gr-digital/include/gnuradio/digital/correlate_access_code_ff_ts.h
@@ -44,14 +44,6 @@ namespace gr {
* frame length. It decodes the header to get the frame length in
* order to set up the the tagged stream key information.
*
- * If the block is given a \p fec_rate and/or \p fec_extra, this
- * information is used to adjust the tagged stream information
- * based on the follow-on FEC decoding. The header provides
- * information about the uncoded frame size (in bytes), so the
- * actual frame length based on the FEC code used will be:
- *
- * pkt_len = fec_rate*8*frame_size + fec_extra
- *
* The output of this block is appropriate for use with tagged
* stream blocks.
*/
@@ -66,27 +58,17 @@ namespace gr {
* e.g., "010101010111000100"
* \param threshold maximum number of bits that may be wrong
* \param tag_name key of the tag inserted into the tag stream
- * \param fec_rate Rate of the FEC used to adjust the frame length info
- * \param fec_extra Any extra samples added by the FEC
- * (e.g., the 2(K-1) tail used in the terminated CC codes).
*/
static sptr make(const std::string &access_code,
int threshold,
- const std::string &tag_name,
- float fec_rate=1,
- int fec_extra=0);
+ const std::string &tag_name);
/*!
* \param access_code is represented with 1 byte per bit,
* e.g., "010101010111000100"
*/
virtual bool set_access_code(const std::string &access_code) = 0;
- virtual void set_fec_rate(float rate) = 0;
- virtual void set_fec_extra(int extra) = 0;
-
virtual unsigned long long access_code() const = 0;
- virtual float fec_rate() const = 0;
- virtual int fec_extra() const = 0;
};
} /* namespace digital */
diff --git a/gr-digital/lib/correlate_access_code_ff_ts_impl.cc b/gr-digital/lib/correlate_access_code_ff_ts_impl.cc
index bdba736ff9..86bbb686d5 100644
--- a/gr-digital/lib/correlate_access_code_ff_ts_impl.cc
+++ b/gr-digital/lib/correlate_access_code_ff_ts_impl.cc
@@ -40,19 +40,15 @@ namespace gr {
correlate_access_code_ff_ts::sptr
correlate_access_code_ff_ts::make(const std::string &access_code,
int threshold,
- const std::string &tag_name,
- float fec_rate, int fec_extra)
+ const std::string &tag_name)
{
return gnuradio::get_initial_sptr
(new correlate_access_code_ff_ts_impl(access_code,
- threshold, tag_name,
- fec_rate, fec_extra));
+ threshold, tag_name));
}
-
correlate_access_code_ff_ts_impl::correlate_access_code_ff_ts_impl(
- const std::string &access_code, int threshold, const std::string &tag_name,
- float fec_rate, int fec_extra)
+ const std::string &access_code, int threshold, const std::string &tag_name)
: block("correlate_access_code_ff_ts",
io_signature::make(1, 1, sizeof(float)),
io_signature::make(1, 1, sizeof(float))),
@@ -75,9 +71,6 @@ namespace gr {
d_pkt_count = 0;
d_hdr_reg = 0;
d_hdr_count = 0;
-
- set_fec_rate(fec_rate);
- set_fec_extra(fec_extra);
}
correlate_access_code_ff_ts_impl::~correlate_access_code_ff_ts_impl()
@@ -106,42 +99,12 @@ namespace gr {
return true;
}
- void
- correlate_access_code_ff_ts_impl::set_fec_rate(float rate)
- {
- if(rate <= 0) {
- throw std::runtime_error("correlate_access_code_ff_ts: FEC rate must be > 0");
- }
- d_fec_rate = rate;
- }
-
- void
- correlate_access_code_ff_ts_impl::set_fec_extra(int extra)
- {
- if(extra < 0) {
- throw std::runtime_error("correlate_access_code_ff_ts: FEC extra bits must be >= 0");
- }
- d_fec_extra = extra;
- }
-
unsigned long long
correlate_access_code_ff_ts_impl::access_code() const
{
return d_access_code;
}
- float
- correlate_access_code_ff_ts_impl::fec_rate() const
- {
- return d_fec_rate;
- }
-
- int
- correlate_access_code_ff_ts_impl::fec_extra() const
- {
- return d_fec_extra;
- }
-
inline void
correlate_access_code_ff_ts_impl::enter_search()
{
@@ -160,7 +123,7 @@ namespace gr {
correlate_access_code_ff_ts_impl::enter_have_header(int payload_len)
{
d_state = STATE_HAVE_HEADER;
- d_pkt_len = d_fec_rate*8*payload_len + d_fec_extra;
+ d_pkt_len = 8*payload_len;
d_pkt_count = 0;
}
diff --git a/gr-digital/lib/correlate_access_code_ff_ts_impl.h b/gr-digital/lib/correlate_access_code_ff_ts_impl.h
index e96ab7fbe9..ac540f6b7f 100644
--- a/gr-digital/lib/correlate_access_code_ff_ts_impl.h
+++ b/gr-digital/lib/correlate_access_code_ff_ts_impl.h
@@ -50,8 +50,6 @@ namespace gr {
pmt::pmt_t d_key, d_me; // d_key is the tag name, d_me is the block name + unique ID
int d_pkt_len, d_pkt_count;
- float d_fec_rate;
- int d_fec_extra;
void enter_search();
void enter_have_sync();
@@ -63,9 +61,7 @@ namespace gr {
public:
correlate_access_code_ff_ts_impl(const std::string &access_code,
int threshold,
- const std::string &tag_name,
- float fec_rate=1,
- int fec_extra=0);
+ const std::string &tag_name);
~correlate_access_code_ff_ts_impl();
int general_work(int noutput_items,
@@ -74,12 +70,7 @@ namespace gr {
gr_vector_void_star &output_items);
bool set_access_code(const std::string &access_code);
- void set_fec_rate(float rate);
- void set_fec_extra(int extra);
-
unsigned long long access_code() const;
- float fec_rate() const;
- int fec_extra() const;
};
} /* namespace digital */