Hi,
I am working with the code: qa_atsc.py, and I would like to save in a file the
values from the outputs of the components. For example, in the case of trellis
encoder. I have written:
1) This class gets the values from the structure of Trellis Encoder:
class vector_sink_ts_trellis(gr.hier_block2):
def __init__(self):
v3s = gr.vector_to_stream(gr.sizeof_char, atsc.sizeof_atsc_data_segment)
self.sink = gr.vector_sink_b()
gr.hier_block2.__init__(self, "vector_sink_ts_trellis",
v3s.input_signature(),
gr.io_signature(0, 0, 0))
self.connect(self, v3s, self.sink)
def data(self):
return self.sink.data()
2) Inside, def test_loopback_03(self), I have added:
trellis = atsc.trellis_encoder() %This line is in the original code.
trellis_data = vector_sink_ts_trellis()
self.tb.connect(src, rand, rs_enc,inter,trellis, trellis_data)
self.tb.run ()
int_data = trellis_data.data
()[((interleaver_delay)*atsc.sizeof_atsc_data_segment):len(trellis_data.data())]
output_trellis = gr.file_sink(gr.sizeof_char,
"/pathname/output_trellis.dat")
self.tb.connect (int_data,output_trellis)
self.tb.run ()
Thanks!
_________________________________________________________________
No has visto nada como el nuevo Messenger, ¡te sorprenderá!
http://explore.live.com/windows-live-messenger
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio