Piotr Krysik | 1a32fc4 | 2018-05-11 11:38:07 +0200 | [diff] [blame] | 1 | /* -*- c++ -*- */ |
| 2 | /* @file |
| 3 | * @author Piotr Krysik <ptrkrysik@gmail.com> |
| 4 | * @section LICENSE |
| 5 | * |
| 6 | * Gr-gsm is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 3, or (at your option) |
| 9 | * any later version. |
| 10 | * |
| 11 | * Gr-gsm is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with gr-gsm; see the file COPYING. If not, write to |
| 18 | * the Free Software Foundation, Inc., 51 Franklin Street, |
| 19 | * Boston, MA 02110-1301, USA. |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #ifndef INCLUDED_GSM_FREQ_HOPPING_IMPL_H |
| 24 | #define INCLUDED_GSM_FREQ_HOPPING_IMPL_H |
| 25 | |
| 26 | #include <grgsm/trx/freq_hopping.h> |
| 27 | #include <grgsm/misc_utils/time_spec.h> |
| 28 | #include <grgsm/misc_utils/fn_time.h> |
| 29 | |
| 30 | namespace gr { |
| 31 | namespace gsm { |
| 32 | |
| 33 | class freq_hopping_impl : public freq_hopping |
| 34 | { |
| 35 | private: |
| 36 | bool d_hopping_enable; //if true block do the hopping, if not block just passes the bursts |
| 37 | uint64_t d_hsn; //hopping sequence number |
| 38 | uint64_t d_maio; //mobile allocation index offset |
Piotr Krysik | 6463dc7 | 2018-06-18 14:43:50 +0200 | [diff] [blame] | 39 | double d_base_freq; //local oscillator frequency |
Piotr Krysik | 1a32fc4 | 2018-05-11 11:38:07 +0200 | [diff] [blame] | 40 | std::vector<uint64_t> d_ma; //mobile allocation |
| 41 | |
| 42 | pmt::pmt_t d_hopping_cmd; //TODO: change this uint64_to a std::map |
| 43 | void set_freq_metadata(pmt::pmt_t cmd); |
| 44 | bool set_hopping_params(pmt::pmt_t hopping_params); |
| 45 | public: |
| 46 | freq_hopping_impl(pmt::pmt_t hopping_cmd); |
| 47 | ~freq_hopping_impl(); |
| 48 | |
| 49 | void add_hopping_cmd(pmt::pmt_t hopping_cmd); |
| 50 | }; |
| 51 | |
| 52 | } // namespace gsm |
| 53 | } // namespace gr |
| 54 | |
| 55 | #endif /* INCLUDED_GSM_FREQ_HOPPING_IMPL_H */ |