parameters: (self)
docstring: Standard test
docstring_summary: Standard test
docstring_tokens: Standard test
function: def test_005_packet_len_tag(self):
          """ Standard test """
          fft_len = 16
          tx_symbols = list(range(1, 16))
          tx_symbols = (0, 1, 1j, 2, 3, 0, 0, 0, 0, 0, 0, 4, 5, 2j, 6, 0,
                        0, 7, 8, 3j, 9, 0, 0, 0, 0, 0, 0, 10, 4j, 11, 12, 0,
                        0, 13, 1j, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 2j, 0, 0)
          expected_result = list(range(1, 16))
          occupied_carriers = ((1, 3, 4, 11, 12, 14), (1, 2, 4, 11, 13, 14),)
          n_syms = len(tx_symbols) // fft_len
          packet_len_tsb_key = "packet_len"
          tag2 = gr.tag_t()
          tag2.offset = 0
          tag2.key = pmt.string_to_symbol("packet_len")
          tag2.value = pmt.from_long(len(expected_result))
          src = blocks.vector_source_c(tx_symbols, False, fft_len, (tag2,))
          serializer = digital.ofdm_serializer_vcc(
              fft_len, occupied_carriers, self.tsb_key, packet_len_tsb_key, 0, "", False)
          sink = blocks.tsb_vector_sink_c(tsb_key=packet_len_tsb_key)
          self.tb.connect(
              src,
              blocks.stream_to_tagged_stream(
                  gr.sizeof_gr_complex,
                  fft_len,
                  n_syms,
                  self.tsb_key),
              serializer,
              sink)
          self.tb.run()
          self.assertEqual(sink.data()[0], expected_result)
function_tokens: def test_005_packet_len_tag ( self ) : fft_len = 16 tx_symbols = list ( range ( 1 , 16 ) ) tx_symbols = ( 0 , 1 , 1j , 2 , 3 , 0 , 0 , 0 , 0 , 0 , 0 , 4 , 5 , 2j , 6 , 0 , 0 , 7 , 8 , 3j , 9 , 0 , 0 , 0 , 0 , 0 , 0 , 10 , 4j , 11 , 12 , 0 , 0 , 13 , 1j , 14 , 15 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 2j , 0 , 0 ) expected_result = list ( range ( 1 , 16 ) ) occupied_carriers = ( ( 1 , 3 , 4 , 11 , 12 , 14 ) , ( 1 , 2 , 4 , 11 , 13 , 14 ) , ) n_syms = len ( tx_symbols ) // fft_len packet_len_tsb_key = "packet_len" tag2 = gr . tag_t ( ) tag2 . offset = 0 tag2 . key = pmt . string_to_symbol ( "packet_len" ) tag2 . value = pmt . from_long ( len ( expected_result ) ) src = blocks . vector_source_c ( tx_symbols , False , fft_len , ( tag2 , ) ) serializer = digital . ofdm_serializer_vcc ( fft_len , occupied_carriers , self . tsb_key , packet_len_tsb_key , 0 , "" , False ) sink = blocks . tsb_vector_sink_c ( tsb_key = packet_len_tsb_key ) self . tb . connect ( src , blocks . stream_to_tagged_stream ( gr . sizeof_gr_complex , fft_len , n_syms , self . tsb_key ) , serializer , sink ) self . tb . run ( ) self . assertEqual ( sink . data ( ) [ 0 ] , expected_result )