Max | 842d781 | 2017-11-01 18:11:24 +0100 | [diff] [blame] | 1 | /* mslot_class.h |
| 2 | * |
| 3 | * Copyright (C) 2012 Ivan Klyuchnikov |
| 4 | * Copyright (C) 2012 Andreas Eversberg <jolly@eversberg.eu> |
| 5 | * Copyright (C) 2013 by Holger Hans Peter Freyther |
| 6 | * Copyright (C) 2017 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License |
| 10 | * as published by the Free Software Foundation; either version 2 |
| 11 | * of the License, or (at your option) any later version. |
| 12 | * |
| 13 | * This program 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 this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 21 | */ |
| 22 | |
| 23 | #pragma once |
| 24 | |
| 25 | #include <stdint.h> |
| 26 | #include <stddef.h> |
| 27 | #include <stdbool.h> |
| 28 | |
| 29 | /* 3GPP TS 05.02 Annex B.1 */ |
| 30 | |
Max | 327e121 | 2017-11-21 13:01:19 +0100 | [diff] [blame] | 31 | #define MS_NA 255 /* N/A */ |
Max | 842d781 | 2017-11-01 18:11:24 +0100 | [diff] [blame] | 32 | #define MS_A 254 /* 1 with hopping, 0 without */ |
| 33 | #define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ |
| 34 | #define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ |
| 35 | |
| 36 | #define DEFAULT_MSLOT_CLASS 12 |
| 37 | |
| 38 | /* multislot class selection routines */ |
| 39 | uint8_t mslot_class_get_ta(uint8_t ms_cl); |
| 40 | uint8_t mslot_class_get_tb(uint8_t ms_cl); |
| 41 | uint8_t mslot_class_get_ra(uint8_t ms_cl); |
| 42 | uint8_t mslot_class_get_rb(uint8_t ms_cl); |
| 43 | uint8_t mslot_class_get_tx(uint8_t ms_cl); |
| 44 | uint8_t mslot_class_get_rx(uint8_t ms_cl); |
| 45 | uint8_t mslot_class_get_sum(uint8_t ms_cl); |
| 46 | uint8_t mslot_class_get_type(uint8_t ms_cl); |
Max | 327e121 | 2017-11-21 13:01:19 +0100 | [diff] [blame] | 47 | uint8_t mslot_class_max(); |