Merged origin/test-utils-98 into dev, fixed conflicts
diff --git a/grc/misc_utils/gsm_bursts_printer.xml b/grc/misc_utils/gsm_bursts_printer.xml
index abdb532..821e6bb 100644
--- a/grc/misc_utils/gsm_bursts_printer.xml
+++ b/grc/misc_utils/gsm_bursts_printer.xml
@@ -4,7 +4,8 @@
   <key>gsm_bursts_printer</key>
   <import>import grgsm</import>
   <import>import pmt</import>
-  <make>grgsm.bursts_printer(pmt.intern($prepend_string), $prepend_fnr, $prepend_frame_count, $print_payload_only)</make>
+  <make>grgsm.bursts_printer(pmt.intern($prepend_string), $prepend_fnr,
+    $prepend_frame_count, $print_payload_only, $ignore_dummy_bursts)</make>
 
   <param>
     <name>Prepend String</name>
@@ -55,6 +56,20 @@
       <key>True</key>
     </option>
   </param>
+  <param>
+    <name>Ignore dummy bursts</name>
+    <key>ignore_dummy_bursts</key>
+    <value>False</value>
+    <type>bool</type>
+    <option>
+      <name>False</name>
+      <key>False</key>
+    </option>
+    <option>
+      <name>True</name>
+      <key>True</key>
+    </option>
+  </param>
 
   <sink>
     <name>bursts</name>
@@ -70,6 +85,8 @@
 
 If "Print payload only" is enabled, then only the two data blocks of a burst are printed, tail bits, stealing bits and training sequence are omitted.
 
-Enabling all three options results in an output that is similar to the output of airprobe, i.e. the format is "frame_nr frame_count: databits"
+If "Ignore dummy bursts" is enabled, then the burst printer will not print dummy bursts (see GSM 05.02)
+
+Enabling first three options (or all four options) results in an output that is similar to the output of airprobe, i.e. the format is "frame_nr frame_count: databits"
   </doc>
 </block>
diff --git a/include/grgsm/misc_utils/bursts_printer.h b/include/grgsm/misc_utils/bursts_printer.h
index 099bf08..eb006c5 100644
--- a/include/grgsm/misc_utils/bursts_printer.h
+++ b/include/grgsm/misc_utils/bursts_printer.h
@@ -51,7 +51,8 @@
        * creating new instances.
        */
       static sptr make(pmt::pmt_t prepend_string, bool prepend_fnr=false,
-        bool prepend_frame_count=false, bool print_payload_only=false);
+        bool prepend_frame_count=false, bool print_payload_only=false,
+        bool ignore_dummy_bursts=false);
     };
 
   } // namespace gsm
diff --git a/lib/misc_utils/bursts_printer_impl.cc b/lib/misc_utils/bursts_printer_impl.cc
index 3b4f026..fd93d79 100644
--- a/lib/misc_utils/bursts_printer_impl.cc
+++ b/lib/misc_utils/bursts_printer_impl.cc
@@ -37,6 +37,19 @@
 namespace gr {
   namespace gsm {
     boost::mutex printer_mutex;
+    // dummy burst defined in gsm 05.02, section 5.2.6
+    const int8_t bursts_printer_impl::d_dummy_burst[] = {0,0,0,
+        1,1,1,1,1,0,1,1,0,1,1,1,0,1,1,0,
+        0,0,0,0,1,0,1,0,0,1,0,0,1,1,1,0,
+        0,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,
+        0,0,0,1,1,1,1,1,0,0,0,1,1,1,0,0,
+        0,1,0,1,1,1,0,0,0,1,0,1,1,1,0,0,
+        0,1,0,1,0,1,1,1,0,1,0,0,1,0,1,0,
+        0,0,1,1,0,0,1,1,0,0,1,1,1,0,0,1,
+        1,1,1,0,1,0,0,1,1,1,1,1,0,0,0,1,
+        0,0,1,0,1,1,1,1,1,0,1,0,1,0,
+        0,0,0 };
+
     void bursts_printer_impl::bursts_print(pmt::pmt_t msg)
     {
         pmt::pmt_t header_plus_burst = pmt::cdr(msg);
@@ -46,6 +59,11 @@
         size_t burst_len=pmt::blob_length(header_plus_burst)-sizeof(gsmtap_hdr);
         uint32_t frame_nr = be32toh(header->frame_number);
 
+        if (d_ignore_dummy_bursts && is_dummy_burst(burst, burst_len))
+        {
+            return;
+        }
+
         std::cout << d_prepend_string;
         if (d_prepend_fnr)
         {
@@ -94,19 +112,38 @@
         std::cout << std::endl;
     }
 
+    bool bursts_printer_impl::is_dummy_burst(int8_t *burst, size_t burst_len)
+    {
+        if (burst_len != DUMMY_BURST_LEN)
+        {
+            return false;
+        }
+        for (int i=0; i<DUMMY_BURST_LEN; i++)
+        {
+            if (burst[i] != d_dummy_burst[i])
+            {
+                return false;
+            }
+        }
+        return true;
+    }
+
     bursts_printer::sptr
     bursts_printer::make(pmt::pmt_t prepend_string, bool prepend_fnr,
-        bool prepend_frame_count, bool print_payload_only)
+        bool prepend_frame_count, bool print_payload_only,
+        bool ignore_dummy_bursts)
     {
       return gnuradio::get_initial_sptr
-        (new bursts_printer_impl(prepend_string, prepend_fnr, prepend_frame_count, print_payload_only));
+        (new bursts_printer_impl(prepend_string, prepend_fnr, prepend_frame_count,
+            print_payload_only, ignore_dummy_bursts));
     }
 
     /*
      * The private constructor
      */
     bursts_printer_impl::bursts_printer_impl(pmt::pmt_t prepend_string, bool prepend_fnr,
-        bool prepend_frame_count, bool print_payload_only)
+        bool prepend_frame_count, bool print_payload_only,
+        bool ignore_dummy_bursts)
       : gr::block("bursts_printer",
               gr::io_signature::make(0, 0, 0),
               gr::io_signature::make(0, 0, 0))
@@ -115,6 +152,8 @@
         d_prepend_fnr = prepend_fnr;
         d_prepend_frame_count = prepend_frame_count;
         d_print_payload_only = print_payload_only;
+        d_ignore_dummy_bursts = ignore_dummy_bursts;
+
         message_port_register_in(pmt::mp("bursts"));
         set_msg_handler(pmt::mp("bursts"), boost::bind(&bursts_printer_impl::bursts_print, this, _1));
     }
diff --git a/lib/misc_utils/bursts_printer_impl.h b/lib/misc_utils/bursts_printer_impl.h
index 5a8a7ed..e438c37 100644
--- a/lib/misc_utils/bursts_printer_impl.h
+++ b/lib/misc_utils/bursts_printer_impl.h
@@ -23,6 +23,8 @@
 #ifndef INCLUDED_GSM_BURSTS_PRINTER_IMPL_H
 #define INCLUDED_GSM_BURSTS_PRINTER_IMPL_H
 
+#define DUMMY_BURST_LEN 148
+
 #include <grgsm/misc_utils/bursts_printer.h>
 #include <set>
 
@@ -37,9 +39,13 @@
       bool d_prepend_fnr;
       bool d_prepend_frame_count;
       bool d_print_payload_only;
+      bool d_ignore_dummy_bursts;
+      bool is_dummy_burst(int8_t *burst, size_t burst_len);
+      static const int8_t d_dummy_burst[];
      public:
       bursts_printer_impl(pmt::pmt_t prepend_string, bool prepend_fnr=false,
-        bool prepend_frame_count=false, bool print_payload_only=false);
+        bool prepend_frame_count=false, bool print_payload_only=false,
+        bool ignore_dummy_bursts=false);
       ~bursts_printer_impl();
     };
 
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 486ff80..e5190c8 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -47,6 +47,7 @@
 set(GR_TEST_TARGET_DEPS gr-gsm)
 set(GR_TEST_PYTHON_DIRS ${CMAKE_BINARY_DIR}/swig)
 GR_ADD_TEST(qa_decryption ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_decryption.py)
+GR_ADD_TEST(qa_burst_printer ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_burst_printer.py)
 GR_ADD_TEST(qa_message_printer ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_message_printer.py)
 #GR_ADD_TEST(qa_receiver ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_receiver.py)
 #GR_ADD_TEST(qa_receiver_hier ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qa_receiver_hier.py)
diff --git a/python/qa_burst_printer.py b/python/qa_burst_printer.py
new file mode 100755
index 0000000..c7f2769
--- /dev/null
+++ b/python/qa_burst_printer.py
@@ -0,0 +1,297 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# @file
+# @author Roman Khassraf <rkhassraf@gmail.com>
+# @section LICENSE
+# 
+# Gr-gsm is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# Gr-gsm is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with gr-gsm; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+# 
+
+from gnuradio import gr, gr_unittest, blocks
+import grgsm
+import os
+import pmt
+import sys
+import tempfile
+
+class qa_burst_printer (gr_unittest.TestCase):
+   
+    def setUp (self):
+        self.tb = gr.top_block()
+        self.tmpfile = tempfile.NamedTemporaryFile()
+        self.prevfd = os.dup(sys.stdout.fileno())
+        os.dup2(self.tmpfile.fileno(), sys.stdout.fileno())
+        self.prev = sys.stdout
+        sys.stdout = os.fdopen(self.prevfd, "w")
+        
+    def tearDown (self):
+        self.tb = None
+        os.dup2(self.prevfd, self.prev.fileno())
+        sys.stdout = self.prev
+        self.tmpfile.close()
+        
+    def getOutput(self):
+        self.tmpfile.seek(0)
+        return self.tmpfile.read()
+    
+    def getOutputExpected(self, expected_lines):
+        out = ""
+        for l in expected_lines:
+            out = out + l + "\n"
+        return out
+
+    def test_001_complete_bursts_prefix (self):
+        """
+            Complete bursts, without any prefix
+        """
+        framenumbers_input = [2569043, 2569044, 2569045, 2569046]
+        timeslots_input = [2, 2, 2, 2]
+        bursts_input = [
+            "0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        expected_lines = [
+            "0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+        printer = grgsm.bursts_printer(pmt.intern(""), False, False, False, False)
+        self.tb.msg_connect(src, "out", printer, "bursts")
+        self.tb.run()
+
+        self.assertEqual(self.getOutput(), self.getOutputExpected(expected_lines))
+        
+    def test_002_complete_bursts_prefix (self):
+        """
+            Complete bursts, with a string prefix
+        """
+        framenumbers_input = [2569043, 2569044, 2569045, 2569046]
+        timeslots_input = [2, 2, 2, 2]
+        bursts_input = [
+            "0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        expected_lines = [
+            "Test 0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "Test 0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "Test 0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "Test 0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+        printer = grgsm.bursts_printer(pmt.intern("Test "), False, False, False, False)
+        self.tb.msg_connect(src, "out", printer, "bursts")
+        self.tb.run()
+
+        self.assertEqual(self.getOutput(), self.getOutputExpected(expected_lines))
+
+    def test_003_complete_bursts_fnr (self):
+        """
+            Complete bursts, no prefix, with frame number
+        """
+        framenumbers_input = [2569043, 2569044, 2569045, 2569046]
+        timeslots_input = [2, 2, 2, 2]
+        bursts_input = [
+            "0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        expected_lines = [
+            "2569043: 0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "2569044: 0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "2569045: 0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "2569046: 0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+        printer = grgsm.bursts_printer(pmt.intern(""), True, False, False, False)
+        self.tb.msg_connect(src, "out", printer, "bursts")
+        self.tb.run()
+
+        self.assertEqual(self.getOutput(), self.getOutputExpected(expected_lines))
+        
+    def test_004_complete_bursts_fcount (self):
+        """
+            Complete bursts, no prefix, with frame count
+        """
+        framenumbers_input = [2569043, 2569044, 2569045, 2569046]
+        timeslots_input = [2, 2, 2, 2]
+        bursts_input = [
+            "0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        expected_lines = [
+            "3967625: 0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "3967658: 0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "3967691: 0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "3967724: 0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+        printer = grgsm.bursts_printer(pmt.intern(""), False, True, False, False)
+        self.tb.msg_connect(src, "out", printer, "bursts")
+        self.tb.run()
+
+        self.assertEqual(self.getOutput(), self.getOutputExpected(expected_lines))
+
+    def test_005_complete_bursts_fnr_fcount (self):
+        """
+            Complete bursts, no prefix, with frame number and frame count
+        """
+        framenumbers_input = [2569043, 2569044, 2569045, 2569046]
+        timeslots_input = [2, 2, 2, 2]
+        bursts_input = [
+            "0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        expected_lines = [
+            "2569043 3967625: 0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "2569044 3967658: 0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "2569045 3967691: 0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "2569046 3967724: 0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+        printer = grgsm.bursts_printer(pmt.intern(""), True, True, False, False)
+        self.tb.msg_connect(src, "out", printer, "bursts")
+        self.tb.run()
+
+        self.assertEqual(self.getOutput(), self.getOutputExpected(expected_lines))
+
+    def test_006_payload_prefix_fnr_fcount (self):
+        """
+            Payload only, no prefix, with frame number and frame count
+            Bursts 4-7 are dummy bursts
+        """
+        framenumbers_input = [2569043, 2569044, 2569045, 2569046, 1099602, 1099603, 1099604, 1099605]
+        timeslots_input = [2, 2, 2, 2, 4, 4, 4, 4]
+        bursts_input = [
+            "0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000"
+            
+        ]
+        
+        expected_lines = [
+            "test_006: 2569043 3967625: 110000001001001111011111001111100000000101000111100000000100101101010000001111010100010110111101011101011100000101",
+            "test_006: 2569044 3967658: 100010111110111111000001010000101101111101011111010101110110110111101101111110000011011010111011111001011101000011",
+            "test_006: 2569045 3967691: 000100001111011111010101100100011000000000011011010110001001010100101011111001000111100000100000111111000000101110",
+            "test_006: 2569046 3967724: 110101011111001000101011010110000001110110001111111010010111000000001010010111001111111011001000000001001000011101",
+            "test_006: 1099602 1699146: 111110110111011000001010010011100000100100010000000111110111010010100011001100111001111010011111000100101111101010",
+            "test_006: 1099603 1699179: 111110110111011000001010010011100000100100010000000111110111010010100011001100111001111010011111000100101111101010",
+            "test_006: 1099604 1699212: 111110110111011000001010010011100000100100010000000111110111010010100011001100111001111010011111000100101111101010",
+            "test_006: 1099605 1699245: 111110110111011000001010010011100000100100010000000111110111010010100011001100111001111010011111000100101111101010"
+        ]
+        
+        src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+        printer = grgsm.bursts_printer(pmt.intern("test_006: "), True, True, True, False)
+        self.tb.msg_connect(src, "out", printer, "bursts")
+        self.tb.run()
+
+        self.assertEqual(self.getOutput(), self.getOutputExpected(expected_lines))
+
+    def test_007_payload_prefix_fnr_fcount (self):
+        """
+            Payload only, no prefix, with frame number, frame count, and ignoring dummy bursts
+            Bursts 4-7 are dummy bursts
+        """
+        framenumbers_input = [2569043, 2569044, 2569045, 2569046, 1099602, 1099603, 1099604, 1099605]
+        timeslots_input = [2, 2, 2, 2, 4, 4, 4, 4]
+        bursts_input = [
+            "0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000"
+            
+        ]
+        
+        expected_lines = [
+            "test_007: 2569043 3967625: 110000001001001111011111001111100000000101000111100000000100101101010000001111010100010110111101011101011100000101",
+            "test_007: 2569044 3967658: 100010111110111111000001010000101101111101011111010101110110110111101101111110000011011010111011111001011101000011",
+            "test_007: 2569045 3967691: 000100001111011111010101100100011000000000011011010110001001010100101011111001000111100000100000111111000000101110",
+            "test_007: 2569046 3967724: 110101011111001000101011010110000001110110001111111010010111000000001010010111001111111011001000000001001000011101"
+        ]
+        
+        src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+        printer = grgsm.bursts_printer(pmt.intern("test_007: "), True, True, True, True)
+        self.tb.msg_connect(src, "out", printer, "bursts")
+        self.tb.run()
+
+        self.assertEqual(self.getOutput(), self.getOutputExpected(expected_lines))
+        
+    def test_008_complete_prefix_fnr_fcount (self):
+        """
+            Complete bursts, no prefix, with frame number, frame count, and ignoring dummy bursts
+            Bursts 4-7 are dummy bursts
+        """
+        framenumbers_input = [2569043, 2569044, 2569045, 2569046, 1099602, 1099603, 1099604, 1099605]
+        timeslots_input = [2, 2, 2, 2, 4, 4, 4, 4]
+        bursts_input = [
+            "0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000",
+            "0001111101101110110000010100100111000001001000100000001111100011100010111000101110001010111010010100011001100111001111010011111000100101111101010000"
+            
+        ]
+        
+        expected_lines = [
+            "test_008: 2569043 3967625: 0001100000010010011110111110011111000000001010001111000000001000110101110010000011010111100101101010000001111010100010110111101011101011100000101000",
+            "test_008: 2569044 3967658: 0001000101111101111110000010100001011011111010111110101011101000110101110010000011010111110110111101101111110000011011010111011111001011101000011000",
+            "test_008: 2569045 3967691: 0000001000011110111110101011001000110000000000110110101100011000110101110010000011010111001010100101011111001000111100000100000111111000000101110000",
+            "test_008: 2569046 3967724: 0001101010111110010001010110101100000011101100011111110100101000110101110010000011010111111000000001010010111001111111011001000000001001000011101000"
+        ]
+        
+        src = grgsm.burst_source_qa(framenumbers_input, timeslots_input, bursts_input)
+        printer = grgsm.bursts_printer(pmt.intern("test_008: "), True, True, False, True)
+        self.tb.msg_connect(src, "out", printer, "bursts")
+        self.tb.run()
+
+        self.assertEqual(self.getOutput(), self.getOutputExpected(expected_lines))
+
+
+if __name__ == '__main__':
+    gr_unittest.run(qa_burst_printer, "qa_burst_printer.xml")