blob: 6ba49736834cc0b57ee7a4e4b8395beddc5137f6 [file] [log] [blame]
ptrkrysik6dded652014-11-19 11:32:05 +01001/* -*- c++ -*- */
ptrkrysik529895b2014-12-02 18:07:38 +01002/*
3 * @file
Piotr Krysika6268a52017-08-23 16:02:19 +02004 * @author (C) 2016 by Piotr Krysik <ptrkrysik@gmail.com>
ptrkrysik529895b2014-12-02 18:07:38 +01005 * @section LICENSE
6 *
7 * Gr-gsm is free software; you can redistribute it and/or modify
ptrkrysik6dded652014-11-19 11:32:05 +01008 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3, or (at your option)
10 * any later version.
ptrkrysik529895b2014-12-02 18:07:38 +010011 *
12 * Gr-gsm is distributed in the hope that it will be useful,
ptrkrysik6dded652014-11-19 11:32:05 +010013 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
ptrkrysik529895b2014-12-02 18:07:38 +010016 *
ptrkrysik6dded652014-11-19 11:32:05 +010017 * You should have received a copy of the GNU General Public License
ptrkrysik529895b2014-12-02 18:07:38 +010018 * along with gr-gsm; see the file COPYING. If not, write to
ptrkrysik6dded652014-11-19 11:32:05 +010019 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
21 */
22
23#ifndef INCLUDED_GSM_UNIVERSAL_CTRL_CHANS_DEMAPPER_IMPL_H
24#define INCLUDED_GSM_UNIVERSAL_CTRL_CHANS_DEMAPPER_IMPL_H
25
ptrkrysik3be74a72014-12-13 10:11:00 +010026#include <grgsm/demapping/universal_ctrl_chans_demapper.h>
ptrkrysik42411c62015-07-08 10:50:41 +020027#include <vector>
ptrkrysik6dded652014-11-19 11:32:05 +010028
29namespace gr {
30 namespace gsm {
31
Piotr Krysik773a1942016-05-20 12:45:54 +020032 typedef enum {downlink=0,uplink=1} um_radio_link_direction;
ptrkrysik6dded652014-11-19 11:32:05 +010033 class universal_ctrl_chans_demapper_impl : public universal_ctrl_chans_demapper
34 {
35 private:
Piotr Krysik773a1942016-05-20 12:45:54 +020036 //configuration of the block
37 unsigned int d_timeslot_nr;
38 std::vector<int> d_downlink_starts_fn_mod51;
39 std::vector<int> d_downlink_channel_types;
40 std::vector<int> d_downlink_subslots;
41
42 std::vector<int> d_uplink_starts_fn_mod51;
43 std::vector<int> d_uplink_channel_types;
44 std::vector<int> d_uplink_subslots;
45
46 //history of the downlink and uplink bursts
47 uint32_t d_downlink_frame_numbers[4];
48 pmt::pmt_t d_downlink_bursts[4];
49 uint32_t d_uplink_frame_numbers[4];
50 pmt::pmt_t d_uplink_bursts[4];
ptrkrysik6dded652014-11-19 11:32:05 +010051 public:
Piotr Krysik773a1942016-05-20 12:45:54 +020052 universal_ctrl_chans_demapper_impl(unsigned int timeslot_nr, const std::vector<int> &downlink_starts_fn_mod51, const std::vector<int> &downlink_channel_types, const std::vector<int> &downlink_subslots, const std::vector<int> &uplink_starts_fn_mod51, const std::vector<int> &uplink_channel_types, const std::vector<int> &uplink_subslots);
53 ~universal_ctrl_chans_demapper_impl();
ptrkrysik6dded652014-11-19 11:32:05 +010054
55 void filter_ctrl_chans(pmt::pmt_t msg);
56 };
57
58 } // namespace gsm
59} // namespace gr
60
61#endif /* INCLUDED_GSM_UNIVERSAL_CTRL_CHANS_DEMAPPER_IMPL_H */
62