parameters: (self)
docstring: Make sure tags on the CRC aren't lost.
docstring_summary: Make sure tags on the CRC aren't lost.
docstring_tokens: Make sure tags on the CRC aren t lost .
function: def test_0010_tag_propagation(self):
          """ Make sure tags on the CRC aren't lost. """
          # Data with precalculated CRC
          data = (0, 0, 0, 0, 0, 0, 0, 0,
                  1, 0, 0, 0, 0, 0, 0, 0,
                  0, 1, 0, 0, 0, 0, 0, 0,
                  1, 1, 0, 0, 0, 0, 0, 0,
                  0, 0, 1, 0, 0, 0, 0, 0,
                  1, 0, 1, 0, 0, 0, 0, 0,
                  0, 1, 1, 0, 0, 0, 0, 0,
                  1, 1, 1, 0, 0, 0, 0, 0,
                  0, 0, 0, 1, 0, 0, 0, 0,
                  0, 1, 0, 0, 0, 0, 0, 0,
                  1, 1, 0, 0, 0, 0, 1, 0,
                  1, 0, 0, 0, 0, 1, 1, 1,
                  0, 0, 1, 1, 1, 1, 0, 1)
          testtag = gr.tag_t()
          testtag.offset = len(data) - 1
          testtag.key = pmt.string_to_symbol('tag1')
          testtag.value = pmt.from_long(0)
          src = blocks.vector_source_b(data, False, 1, (testtag, ))
          crc_check = digital.crc32_bb(True, self.tsb_key, False)
          sink = blocks.tsb_vector_sink_b(tsb_key=self.tsb_key)
          self.tb.connect(src,
                          blocks.stream_to_tagged_stream(
                              gr.sizeof_char, 1, len(data), self.tsb_key),
                          crc_check, sink)
          self.tb.run()
          self.assertEqual([len(data) - 33, ], [
              tag.offset for tag in sink.tags()
              if pmt.symbol_to_string(tag.key) == 'tag1'
          ])
function_tokens: def test_0010_tag_propagation ( self ) : # Data with precalculated CRC data = ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 0 , 0 , 0 , 1 , 1 , 1 , 0 , 0 , 1 , 1 , 1 , 1 , 0 , 1 ) testtag = gr . tag_t ( ) testtag . offset = len ( data ) - 1 testtag . key = pmt . string_to_symbol ( 'tag1' ) testtag . value = pmt . from_long ( 0 ) src = blocks . vector_source_b ( data , False , 1 , ( testtag , ) ) crc_check = digital . crc32_bb ( True , self . tsb_key , False ) sink = blocks . tsb_vector_sink_b ( tsb_key = self . tsb_key ) self . tb . connect ( src , blocks . stream_to_tagged_stream ( gr . sizeof_char , 1 , len ( data ) , self . tsb_key ) , crc_check , sink ) self . tb . run ( ) self . assertEqual ( [ len ( data ) - 33 , ] , [ tag . offset for tag in sink . tags ( ) if pmt . symbol_to_string ( tag . key ) == 'tag1' ] )