From 023ede68215d750b19bc949dd9662dd8e63ea74c Mon Sep 17 00:00:00 2001 From: Bastian Bloessl Date: Thu, 8 May 2014 15:38:45 +0200 Subject: [PATCH] ofdm mapper: convert metadaata to tags --- lib/ofdm_mapper.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/ofdm_mapper.cc b/lib/ofdm_mapper.cc index ebf0175..351cbfc 100644 --- a/lib/ofdm_mapper.cc +++ b/lib/ofdm_mapper.cc @@ -134,10 +134,18 @@ int general_work(int noutput, gr_vector_int& ninput_items, add_item_tag(0, nitems_written(0), pmt::mp("psdu_len"), psdu_bytes, srcid); - pmt::pmt_t encoding = pmt::from_long(d_ofdm.encoding); - add_item_tag(0, nitems_written(0), pmt::mp("encoding"), - encoding, srcid); + pmt::pmt_t encoding = pmt::from_long(d_ofdm.encoding); + add_item_tag(0, nitems_written(0), pmt::mp("encoding"), + encoding, srcid); + pmt::pmt_t dict_items(pmt::dict_items(pmt::car(msg))); + while (!pmt::is_null(dict_items)) { + pmt::pmt_t this_item(pmt::car(dict_items)); + + add_item_tag(0, nitems_written(0), pmt::car(this_item), + pmt::cdr(this_item), srcid); + dict_items = pmt::cdr(dict_items); + } free(data_bits); free(scrambled_data);