summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-digital/include/gnuradio/digital/additive_scrambler_bb.h11
-rw-r--r--gr-digital/lib/additive_scrambler_bb_impl.h7
-rwxr-xr-xgr-digital/python/digital/qa_scrambler.py1
3 files changed, 11 insertions, 8 deletions
diff --git a/gr-digital/include/gnuradio/digital/additive_scrambler_bb.h b/gr-digital/include/gnuradio/digital/additive_scrambler_bb.h
index e88ac5a48c..a24c6dd1c5 100644
--- a/gr-digital/include/gnuradio/digital/additive_scrambler_bb.h
+++ b/gr-digital/include/gnuradio/digital/additive_scrambler_bb.h
@@ -36,14 +36,19 @@ namespace gr {
* Scramble an input stream using an LFSR.
*
* \details
- * This block works on the LSB only of the input data stream,
- * i.e., on an "unpacked binary" stream, and produces the same
- * format on its output.
+ * This block scrambles up to 8 bits per byte of the input
+ * data stream, starting at the LSB.
*
* The scrambler works by XORing the incoming bit stream by the
* output of the LFSR. Optionally, after 'count' bits have been
* processed, the shift register is reset to the seed value.
* This allows processing fixed length vectors of samples.
+ *
+ * Alternatively, the LFSR can be reset using a reset tag to
+ * scramble variable length vectors. However, it cannot be reset
+ * between bytes.
+ *
+ * For details on configuring the LFSR, see gr::digital::lfsr.
*/
class DIGITAL_API additive_scrambler_bb : virtual public sync_block
{
diff --git a/gr-digital/lib/additive_scrambler_bb_impl.h b/gr-digital/lib/additive_scrambler_bb_impl.h
index 5f28203709..a3b31c02bc 100644
--- a/gr-digital/lib/additive_scrambler_bb_impl.h
+++ b/gr-digital/lib/additive_scrambler_bb_impl.h
@@ -34,12 +34,12 @@ namespace gr {
{
private:
digital::lfsr d_lfsr;
- int d_count; //! Reset the LFSR after this many bytes (not bits)
- int d_bytes; //! Count the processed bytes
+ int d_count; //!< Reset the LFSR after this many bytes (not bits)
+ int d_bytes; //!< Count the processed bytes
int d_len;
int d_seed;
int d_bits_per_byte;
- pmt::pmt_t d_reset_tag_key;
+ pmt::pmt_t d_reset_tag_key; //!< Reset the LFSR when this tag is received
int _get_next_reset_index(int noutput_items, int last_reset_index=-1);
@@ -55,7 +55,6 @@ namespace gr {
int count() const;
int bits_per_byte() { return d_bits_per_byte; };
-
int work(int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
diff --git a/gr-digital/python/digital/qa_scrambler.py b/gr-digital/python/digital/qa_scrambler.py
index e19e963cd3..4d35879b1f 100755
--- a/gr-digital/python/digital/qa_scrambler.py
+++ b/gr-digital/python/digital/qa_scrambler.py
@@ -76,7 +76,6 @@ class test_scrambler(gr_unittest.TestCase):
self.assertEqual(src_data, src_data)
def test_additive_scrambler_tags(self):
- print 'tags'
src_data = (1,)*1000
src = blocks.vector_source_b(src_data, False)
scrambler = digital.additive_scrambler_bb(0x8a, 0x7f, 7, 100)