parameters: (self)
docstring: BCCH_CCCH_SDCCH4 demapper uplink test
docstring_summary: BCCH_CCCH_SDCCH4 demapper uplink test
docstring_tokens: BCCH_CCCH_SDCCH4 demapper uplink test
function: def test_uplink (self):
          """
             BCCH_CCCH_SDCCH4 demapper uplink test
          """
          src = grgsm.burst_source(test_data.frames, test_data.timeslots, test_data.bursts)
          src.set_arfcn(0x2240); #uplink flag is 40
          demapper = grgsm.gsm_sdcch8_demapper(timeslot_nr=0)
          dst = grgsm.burst_sink()
  
          self.tb.msg_connect(src, "out", demapper, "bursts")
          self.tb.msg_connect(demapper, "bursts", dst, "in")
          self.tb.run ()
  
          b = test_data.bursts
          self.assertEqual([
              b[  0], b[  1], b[  2], b[  3], #SACCH 5
              b[  4], b[  5], b[  6], b[  7], #SACCH 6
              b[  8], b[  9], b[ 10], b[ 11], #SACCH 7 #skip 12-14
              b[ 15], b[ 16], b[ 17], b[ 18], #SDCCH 0
              b[ 19], b[ 20], b[ 21], b[ 22], #SDCCH 1
              b[ 23], b[ 24], b[ 25], b[ 26], #SDCCH 2
              b[ 27], b[ 28], b[ 29], b[ 30], #SDCCH 3
              b[ 31], b[ 32], b[ 33], b[ 34], #SDCCH 4
              b[ 35], b[ 36], b[ 37], b[ 38], #SDCCH 5
              b[ 39], b[ 40], b[ 41], b[ 42], #SDCCH 6
              b[ 43], b[ 44], b[ 45], b[ 46], #SDCCH 7
              b[ 47], b[ 48], b[ 49], b[ 50], #SACCH 0
              b[ 51], b[ 52], b[ 53], b[ 54], #SACCH 1
              b[ 55], b[ 56], b[ 57], b[ 58], #SACCH 2
              b[ 59], b[ 60], b[ 61], b[ 62], #SACCH 3 #skip 63-65
              b[ 66], b[ 67], b[ 68], b[ 69], #SDCCH 0
              b[ 70], b[ 71], b[ 72], b[ 73], #SDCCH 1
              b[ 74], b[ 75], b[ 76], b[ 77], #SDCCH 2
              b[ 78], b[ 79], b[ 80], b[ 81], #SDCCH 3
              b[ 82], b[ 83], b[ 84], b[ 85], #SDCCH 4
              b[ 86], b[ 87], b[ 88], b[ 89], #SDCCH 5
              b[ 90], b[ 91], b[ 92], b[ 93], #SDCCH 6
              b[ 94], b[ 95], b[ 96], b[ 97], #SDCCH 7
              b[ 98], b[ 99], b[100], b[101], #SACCH 4
              b[102], b[103], b[104], b[105], #SACCH 5
              ], list(dst.get_burst_data()))
  
          self.assertEqual([
              136, 136, 136, 136,
              136, 136, 136, 136,
              136, 136, 136, 136,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
              136, 136, 136, 136,
              136, 136, 136, 136,
              136, 136, 136, 136,
              136, 136, 136, 136,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
                8,   8,   8,   8,
              136, 136, 136, 136,
              136, 136, 136, 136,
              ], list(dst.get_sub_types()))
  
          self.assertEqual([
              5, 5, 5, 5, #SACCH 5
              6, 6, 6, 6, #SACCH 6
              7, 7, 7, 7, #SACCH 7
              0, 0, 0, 0,
              1, 1, 1, 1,
              2, 2, 2, 2,
              3, 3, 3, 3,
              4, 4, 4, 4,
              5, 5, 5, 5,
              6, 6, 6, 6,
              7, 7, 7, 7,
              0, 0, 0, 0, #SACCH 0
              1, 1, 1, 1, #SACCH 1
              2, 2, 2, 2, #SACCH 2
              3, 3, 3, 3, #SACCH 3
              0, 0, 0, 0,
              1, 1, 1, 1,
              2, 2, 2, 2,
              3, 3, 3, 3,
              4, 4, 4, 4,
              5, 5, 5, 5,
              6, 6, 6, 6,
              7, 7, 7, 7,
              4, 4, 4, 4, #SACCH 4
              5, 5, 5, 5,
              ], list(dst.get_sub_slots()))
function_tokens: def test_uplink ( self ) : src = grgsm . burst_source ( test_data . frames , test_data . timeslots , test_data . bursts ) src . set_arfcn ( 0x2240 ) #uplink flag is 40 demapper = grgsm . gsm_sdcch8_demapper ( timeslot_nr = 0 ) dst = grgsm . burst_sink ( ) self . tb . msg_connect ( src , "out" , demapper , "bursts" ) self . tb . msg_connect ( demapper , "bursts" , dst , "in" ) self . tb . run ( ) b = test_data . bursts self . assertEqual ( [ b [ 0 ] , b [ 1 ] , b [ 2 ] , b [ 3 ] , #SACCH 5 b [ 4 ] , b [ 5 ] , b [ 6 ] , b [ 7 ] , #SACCH 6 b [ 8 ] , b [ 9 ] , b [ 10 ] , b [ 11 ] , #SACCH 7 #skip 12-14 b [ 15 ] , b [ 16 ] , b [ 17 ] , b [ 18 ] , #SDCCH 0 b [ 19 ] , b [ 20 ] , b [ 21 ] , b [ 22 ] , #SDCCH 1 b [ 23 ] , b [ 24 ] , b [ 25 ] , b [ 26 ] , #SDCCH 2 b [ 27 ] , b [ 28 ] , b [ 29 ] , b [ 30 ] , #SDCCH 3 b [ 31 ] , b [ 32 ] , b [ 33 ] , b [ 34 ] , #SDCCH 4 b [ 35 ] , b [ 36 ] , b [ 37 ] , b [ 38 ] , #SDCCH 5 b [ 39 ] , b [ 40 ] , b [ 41 ] , b [ 42 ] , #SDCCH 6 b [ 43 ] , b [ 44 ] , b [ 45 ] , b [ 46 ] , #SDCCH 7 b [ 47 ] , b [ 48 ] , b [ 49 ] , b [ 50 ] , #SACCH 0 b [ 51 ] , b [ 52 ] , b [ 53 ] , b [ 54 ] , #SACCH 1 b [ 55 ] , b [ 56 ] , b [ 57 ] , b [ 58 ] , #SACCH 2 b [ 59 ] , b [ 60 ] , b [ 61 ] , b [ 62 ] , #SACCH 3 #skip 63-65 b [ 66 ] , b [ 67 ] , b [ 68 ] , b [ 69 ] , #SDCCH 0 b [ 70 ] , b [ 71 ] , b [ 72 ] , b [ 73 ] , #SDCCH 1 b [ 74 ] , b [ 75 ] , b [ 76 ] , b [ 77 ] , #SDCCH 2 b [ 78 ] , b [ 79 ] , b [ 80 ] , b [ 81 ] , #SDCCH 3 b [ 82 ] , b [ 83 ] , b [ 84 ] , b [ 85 ] , #SDCCH 4 b [ 86 ] , b [ 87 ] , b [ 88 ] , b [ 89 ] , #SDCCH 5 b [ 90 ] , b [ 91 ] , b [ 92 ] , b [ 93 ] , #SDCCH 6 b [ 94 ] , b [ 95 ] , b [ 96 ] , b [ 97 ] , #SDCCH 7 b [ 98 ] , b [ 99 ] , b [ 100 ] , b [ 101 ] , #SACCH 4 b [ 102 ] , b [ 103 ] , b [ 104 ] , b [ 105 ] , #SACCH 5 ] , list ( dst . get_burst_data ( ) ) ) self . assertEqual ( [ 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 8 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , 136 , ] , list ( dst . get_sub_types ( ) ) ) self . assertEqual ( [ 5 , 5 , 5 , 5 , #SACCH 5 6 , 6 , 6 , 6 , #SACCH 6 7 , 7 , 7 , 7 , #SACCH 7 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 , 7 , 7 , 7 , 7 , 0 , 0 , 0 , 0 , #SACCH 0 1 , 1 , 1 , 1 , #SACCH 1 2 , 2 , 2 , 2 , #SACCH 2 3 , 3 , 3 , 3 , #SACCH 3 0 , 0 , 0 , 0 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 , 4 , 4 , 4 , 4 , 5 , 5 , 5 , 5 , 6 , 6 , 6 , 6 , 7 , 7 , 7 , 7 , 4 , 4 , 4 , 4 , #SACCH 4 5 , 5 , 5 , 5 , ] , list ( dst . get_sub_slots ( ) ) )