diff options
author | Vasil Velichkov <vvvelichkov@gmail.com> | 2018-09-11 14:15:53 +0300 |
---|---|---|
committer | Piotr Krysik <ptrkrysik@gmail.com> | 2018-09-13 09:35:28 +0000 |
commit | 89585b374b78375e6ff47ab1093d5fc0c12671eb (patch) | |
tree | 5dacaf76d92cdcc101710cfa46e2cf87def5d0a1 /lib/qa_utils | |
parent | 7379e341b0e1322b20b23e36882659416b5665e2 (diff) |
burst_file_source: Fix reading longer bursts
- Read bursts with pmt::deserialize directly from the std::filebuf
- Remove the unused unserialized variable
- Add tests
Since df978693 when the rx_time tags are present in the incomming stream
the gsm receiver adds fm_time to the burst's PMT and the bursts that
burst file sink writes becomes longer because of the additional field.
The burst file source block was expecting all burst to be 147 bytes long
and reading files with longer bursts was failing with an unhandled exception.
terminate called after throwing an instance of 'pmt::exception'
thread[thread-per-block[5]: <block dummy_burst_filter (2)>]: pmt_cdr: wrong_type : #f
what(): pmt::deserialize: malformed input stream, tag value = : 115
Change-Id: I989b0d6a6b214088b7880e5cbf7bb6725492dbfc
Diffstat (limited to 'lib/qa_utils')
-rw-r--r-- | lib/qa_utils/burst_source_impl.cc | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/qa_utils/burst_source_impl.cc b/lib/qa_utils/burst_source_impl.cc index db3d85a..f415eaf 100644 --- a/lib/qa_utils/burst_source_impl.cc +++ b/lib/qa_utils/burst_source_impl.cc @@ -31,8 +31,6 @@ #include <grgsm/gsmtap.h> #include <grgsm/endian.h> -#define PMT_SIZE 174 - namespace gr { namespace gsm { @@ -110,8 +108,6 @@ namespace gr { void burst_source_impl::run() { - char *unserialized = (char*)malloc(sizeof(char) * PMT_SIZE); - for (int i=0; i<d_burst_data.size(); i++) { if (d_burst_data[i].length() == BURST_SIZE && |