diff options
author | Marcus Müller <marcus@hostalia.de> | 2018-07-14 00:23:43 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-07-14 14:41:25 +0200 |
commit | 89736b31397330861dcaa550b7891ce6e7a5536f (patch) | |
tree | 4f70a5bedcd402ea75097b98f5814d7d04944372 /gr-blocks/python | |
parent | df8914b8f8714a3606617ceeefb1c7a9e8775845 (diff) |
Changed file_meta_sink's signature to take unserialized pmt
For some reason, the block accepts serialized PMT from in-GNU Radio,
then unserializes it, then serializes it back.
All possible uses probably will prefer just passing the PMT itself.
Changing the API inherently fixes the Py3-migration related std::string
handling ambiguity.
Diffstat (limited to 'gr-blocks/python')
-rw-r--r-- | gr-blocks/python/blocks/qa_file_metadata.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gr-blocks/python/blocks/qa_file_metadata.py b/gr-blocks/python/blocks/qa_file_metadata.py index 16c1a8916f..cdc0b94520 100644 --- a/gr-blocks/python/blocks/qa_file_metadata.py +++ b/gr-blocks/python/blocks/qa_file_metadata.py @@ -55,14 +55,13 @@ class test_file_metadata(gr_unittest.TestCase): val = pmt.from_double(samp_rate) extras = pmt.make_dict() extras = pmt.dict_add(extras, key, val) - extras_str = pmt.serialize_str(extras) data = sig_source_c(samp_rate, 1000, 1, N) src = blocks.vector_source_c(data) fsnk = blocks.file_meta_sink(gr.sizeof_gr_complex, outfile, samp_rate, 1, blocks.GR_FILE_FLOAT, True, - 1000000, extras_str, detached) + 1000000, extras, detached) fsnk.set_unbuffered(True) self.tb.connect(src, fsnk) @@ -135,14 +134,13 @@ class test_file_metadata(gr_unittest.TestCase): val = pmt.from_double(samp_rate) extras = pmt.make_dict() extras = pmt.dict_add(extras, key, val) - extras_str = pmt.serialize_str(extras) data = sig_source_c(samp_rate, 1000, 1, N) src = blocks.vector_source_c(data) fsnk = blocks.file_meta_sink(gr.sizeof_gr_complex, outfile, samp_rate, 1, blocks.GR_FILE_FLOAT, True, - 1000000, extras_str, detached) + 1000000, extras, detached) fsnk.set_unbuffered(True) self.tb.connect(src, fsnk) |