From 327e121a0f2b1e816cc59d1337e6f2034553f2b8 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 21 Nov 2017 13:01:19 +0100 Subject: Add function to get max supported MS class It's useful for allocation tests. Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8 Related: OS#2282 --- src/mslot_class.c | 5 +++++ src/mslot_class.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mslot_class.c b/src/mslot_class.c index 6d7c09d6..19fea3ed 100644 --- a/src/mslot_class.c +++ b/src/mslot_class.c @@ -82,6 +82,11 @@ static inline const struct gprs_ms_multislot_class *get_mslot_table(uint8_t ms_c return &gprs_ms_multislot_class[index]; } +uint8_t mslot_class_max() +{ + return ARRAY_SIZE(gprs_ms_multislot_class); +} + uint8_t mslot_class_get_ta(uint8_t ms_cl) { return get_mslot_table(ms_cl)->ta; diff --git a/src/mslot_class.h b/src/mslot_class.h index f26bd647..9e9dfba5 100644 --- a/src/mslot_class.h +++ b/src/mslot_class.h @@ -28,7 +28,7 @@ /* 3GPP TS 05.02 Annex B.1 */ -#define MS_NA 255 /* N/A */// +#define MS_NA 255 /* N/A */ #define MS_A 254 /* 1 with hopping, 0 without */ #define MS_B 253 /* 1 with hopping, 0 without (change Rx to Tx)*/ #define MS_C 252 /* 1 with hopping, 0 without (change Tx to Rx)*/ @@ -44,3 +44,4 @@ uint8_t mslot_class_get_tx(uint8_t ms_cl); uint8_t mslot_class_get_rx(uint8_t ms_cl); uint8_t mslot_class_get_sum(uint8_t ms_cl); uint8_t mslot_class_get_type(uint8_t ms_cl); +uint8_t mslot_class_max(); -- cgit v1.2.3