Holger Hans Peter Freyther | b6acfda | 2013-10-17 19:41:11 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 by Holger Hans Peter Freyther |
| 3 | * |
| 4 | * All Rights Reserved |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU Affero General Public License as published by |
| 8 | * the Free Software Foundation; either version 3 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program 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 Affero General Public License |
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #include <bts.h> |
| 22 | #include <string.h> |
| 23 | |
| 24 | static BTS s_bts; |
| 25 | |
| 26 | BTS* BTS::main_bts() |
| 27 | { |
| 28 | return &s_bts; |
| 29 | } |
| 30 | |
| 31 | struct gprs_rlcmac_bts *BTS::bts_data() |
| 32 | { |
| 33 | return &m_bts; |
| 34 | } |
| 35 | |
| 36 | struct gprs_rlcmac_bts *bts_main_data() |
| 37 | { |
| 38 | return BTS::main_bts()->bts_data(); |
| 39 | } |
| 40 | |
| 41 | BTS::BTS() |
Holger Hans Peter Freyther | 9b30c7f | 2013-10-17 19:59:56 +0200 | [diff] [blame^] | 42 | : m_cur_fn(0) |
Holger Hans Peter Freyther | b6acfda | 2013-10-17 19:41:11 +0200 | [diff] [blame] | 43 | { |
| 44 | memset(&m_bts, 0, sizeof(m_bts)); |
| 45 | m_bts.bts = this; |
| 46 | } |
Holger Hans Peter Freyther | 9b30c7f | 2013-10-17 19:59:56 +0200 | [diff] [blame^] | 47 | |
| 48 | void BTS::set_current_frame_number(int fn) |
| 49 | { |
| 50 | m_cur_fn = fn; |
| 51 | } |