blob: ab0efd157fdc33864a015b87637123a86d93a911 [file] [log] [blame]
Vasil Velichkov1828a312018-05-07 15:55:39 +03001/* -*- c++ -*- */
2/*
3 * @file
4 * @author (C) 2018 by Andrew Artyushok <loony.developer@gmail.com>
5 * @author (C) 2018 by Vasil Velichkov <vvvelichkov@gmail.com>
6 * @section LICENSE
7 *
8 * Gr-gsm is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3, or (at your option)
11 * any later version.
12 *
13 * Gr-gsm is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with gr-gsm; see the file COPYING. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street,
21 * Boston, MA 02110-1301, USA.
22 */
23
24#ifndef INCLUDED_GSM_TCH_H_CHANS_DEMAPPER_IMPL_H
25#define INCLUDED_GSM_TCH_H_CHANS_DEMAPPER_IMPL_H
26
27#include <grgsm/demapping/tch_h_chans_demapper.h>
28
29namespace gr {
30 namespace gsm {
31
32 class tch_h_chans_demapper_impl : public tch_h_chans_demapper
33 {
34 private:
35 unsigned int d_timeslot;
36 unsigned int d_tch_h_channel;
37
38 // Downlink
39 uint32_t d_frame_numbers_dl[3][8]; // for checking consecutive frame numbers of tch
40 uint32_t d_frame_numbers_sacch_dl[4]; // for checking consecutive frame numbers of sacch
41 pmt::pmt_t d_bursts_dl[3][8]; // for tch output headers+bursts
42 pmt::pmt_t d_bursts_sacch_dl[4]; // for sacch output bursts
43
44 // Uplink
45 uint32_t d_frame_numbers_ul[3][8]; // for checking consecutive frame numbers of tch
46 uint32_t d_frame_numbers_sacch_ul[4]; // for checking consecutive frame numbers of sacch
47 pmt::pmt_t d_bursts_ul[3][8]; // for tch output headers+bursts
48 pmt::pmt_t d_bursts_sacch_ul[4]; // for sacch output bursts
49
50 void sacch_tch_demapper(uint32_t fn_mod13, u_int32_t fn_mod26, uint32_t frame_nr, pmt::pmt_t *d_bursts_sacch,
51 uint32_t *d_frame_numbers_sacch, pmt::pmt_t d_bursts[3][8],
52 uint32_t d_frame_numbers[3][8], pmt::pmt_t msg_out);
53
54 void filter_tch_chans(pmt::pmt_t msg);
55
56 public:
57 tch_h_chans_demapper_impl(unsigned int timeslot_nr, unsigned int tch_h_channel);
58 ~tch_h_chans_demapper_impl();
59 };
60
61 } // namespace gsm
62} // namespace gr
63
64#endif /* INCLUDED_GSM_TCH_H_CHANS_DEMAPPER_IMPL_H */
65