From fbcee391070d376b847def931652be12b1b52750 Mon Sep 17 00:00:00 2001 From: Andrew Artyushok Date: Tue, 30 Jan 2018 12:54:07 +0200 Subject: Add HR demapping --- grc/demapping/gsm_tch_f_chans_demapper.xml | 29 ++++++++++++++++++++++++-- include/grgsm/demapping/tch_f_chans_demapper.h | 2 +- lib/demapping/tch_f_chans_demapper_impl.cc | 10 ++++----- lib/demapping/tch_f_chans_demapper_impl.h | 4 +++- 4 files changed, 36 insertions(+), 9 deletions(-) diff --git a/grc/demapping/gsm_tch_f_chans_demapper.xml b/grc/demapping/gsm_tch_f_chans_demapper.xml index 23d77ee..c87776a 100644 --- a/grc/demapping/gsm_tch_f_chans_demapper.xml +++ b/grc/demapping/gsm_tch_f_chans_demapper.xml @@ -3,16 +3,41 @@ TCH/F Demapper gsm_tch_f_chans_demapper import grgsm - grgsm.tch_f_chans_demapper($timeslot_nr) + grgsm.tch_f_chans_demapper($timeslot_nr, $tch_type, $tch_h_channel) - timeslot_nr + Timeslot timeslot_nr 2 int part + + TCH Type + tch_type + 0 + int + part + + + + + + TCH/H Channel + tch_h_channel + 0 + int + #if $tch_type() == 0 then 'all' else 'none'# + + $tch_h_channel() > -1 and $tch_h_channel() < 2 + bursts message diff --git a/include/grgsm/demapping/tch_f_chans_demapper.h b/include/grgsm/demapping/tch_f_chans_demapper.h index c04c749..32bed30 100644 --- a/include/grgsm/demapping/tch_f_chans_demapper.h +++ b/include/grgsm/demapping/tch_f_chans_demapper.h @@ -48,7 +48,7 @@ namespace gr { * class. gsm::tch_f_chans_demapper::make is the public interface for * creating new instances. */ - static sptr make(unsigned int timeslot_nr); + static sptr make(unsigned int timeslot_nr, int tch_type, int tch_h_channel); }; } // namespace gsm diff --git a/lib/demapping/tch_f_chans_demapper_impl.cc b/lib/demapping/tch_f_chans_demapper_impl.cc index 9865a47..0841fd2 100644 --- a/lib/demapping/tch_f_chans_demapper_impl.cc +++ b/lib/demapping/tch_f_chans_demapper_impl.cc @@ -109,11 +109,11 @@ namespace gr { } } - void tch_f_chans_demapper_impl::sacch_tch_demapper(uint32_t fn_mod13, uint32_t fn_mod26, uint32_t frame_nr, - pmt::pmt_t *d_bursts_sacch, - uint32_t *d_frame_numbers_sacch, pmt::pmt_t d_bursts[3][8], - uint32_t d_frame_numbers[3][8], pmt::pmt_t msg_out) - { +void tch_f_chans_demapper_impl::sacch_tch_demapper(uint32_t fn_mod13, u_int32_t fn_mod26, uint32_t frame_nr, + pmt::pmt_t *d_bursts_sacch, + uint32_t *d_frame_numbers_sacch, pmt::pmt_t d_bursts[3][8], + uint32_t d_frame_numbers[3][8], pmt::pmt_t msg_out) +{ bool frames_are_consecutive = true; if (fn_mod13 == 12) { diff --git a/lib/demapping/tch_f_chans_demapper_impl.h b/lib/demapping/tch_f_chans_demapper_impl.h index bef018d..7a546e7 100644 --- a/lib/demapping/tch_f_chans_demapper_impl.h +++ b/lib/demapping/tch_f_chans_demapper_impl.h @@ -32,6 +32,8 @@ namespace gr { { private: unsigned int d_timeslot; + int d_tch_type; + int d_tch_h_channel; // Downlink uint32_t d_frame_numbers_dl[3][8]; // for checking consecutive frame numbers of tch uint32_t d_frame_numbers_sacch_dl[4]; // for checking consecutive frame numbers of sacch @@ -49,7 +51,7 @@ namespace gr { uint32_t d_frame_numbers[3][8], pmt::pmt_t msg_out); public: - tch_f_chans_demapper_impl(unsigned int timeslot_nr); + tch_f_chans_demapper_impl(unsigned int timeslot_nr, int tch_type, int tch_h_channel); ~tch_f_chans_demapper_impl(); void filter_tch_chans(pmt::pmt_t msg); -- cgit v1.2.3