def setup_c_flowgraph(self): #use the sink version if burst scope not selected # if self.scopes.count("b"): # self.burst = gsm.burst_cf(self.burst_cb,self.input_rate) # else: # self.burst = gsm.burst_sink_c(self.burst_cb,self.input_rate) self.burst = gsm.burst_cf(self.burst_cb,self.input_rate) self.connect(self.filter, self.burst)
def setup_c_flowgraph(self): #use the sink version if burst scope not selected # if self.scopes.count("b"): # self.burst = gsm.burst_cf(self.burst_cb,self.input_rate) # else: # self.burst = gsm.burst_sink_c(self.burst_cb,self.input_rate) self.burst = gsm.burst_cf(self.burst_cb, self.input_rate) self.connect(self.filter, self.burst)
def test_001_burst_cf(self): # src_data = map(complex,(-3, 4, -5.5, 2, 3)) src_data = (-3, 4, -5.5, 2, 3) print src_data expected_result = (9, 16, 30.25, 4, 9) print expected_result src = gr.vector_source_c(src_data) burst = gsm.burst_cf() dst = gr.vector_sink_f() self.fg.connect(src, burst) self.fg.connect(burst, dst) self.fg.run() result_data = dst.data() self.assertFloatTuplesAlmostEqual(expected_result, result_data, 5)