This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.orgMax has submitted this change and it was merged. ( https://gerrit.osmocom.org/13066 ) Change subject: Make get_retx_mcs() into regular function ...................................................................... Make get_retx_mcs() into regular function Moving from header-defined inline function allows us to hide egprs_mcs_retx_tbl definition and simplify further changes. Change-Id: I95258d1558a3b918ae83f1a69e7c3de2b97e5627 --- M src/gprs_coding_scheme.cpp M src/gprs_coding_scheme.h 2 files changed, 14 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/src/gprs_coding_scheme.cpp b/src/gprs_coding_scheme.cpp index 990e278..bcbb893 100644 --- a/src/gprs_coding_scheme.cpp +++ b/src/gprs_coding_scheme.cpp @@ -21,13 +21,16 @@ #include "gprs_coding_scheme.h" +#define MAX_NUM_ARQ 2 /* max. number of ARQ */ +#define MAX_NUM_MCS 9 /* max. number of MCS */ + /* * 44.060 Table 8.1.1.1 and Table 8.1.1.2 * It has 3 level indexing. 0th level is ARQ type * 1st level is Original MCS( index 0 corresponds to MCS1 and so on) * 2nd level is MS MCS (index 0 corresponds to MCS1 and so on) */ -enum CodingScheme GprsCodingScheme::egprs_mcs_retx_tbl[MAX_NUM_ARQ] +static enum CodingScheme egprs_mcs_retx_tbl[MAX_NUM_ARQ] [MAX_NUM_MCS][MAX_NUM_MCS] = { { {MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1, MCS1}, @@ -60,6 +63,16 @@ FAMILY_C, }; +CodingScheme GprsCodingScheme::get_retx_mcs(const GprsCodingScheme mcs, + const GprsCodingScheme demanded_mcs, + const unsigned arq_type) +{ + OSMO_ASSERT(mcs.to_num() > 0); + OSMO_ASSERT(demanded_mcs.to_num() > 0); + + return egprs_mcs_retx_tbl[arq_type][mcs.to_num() - 1][demanded_mcs.to_num() - 1]; +} + static struct { struct { uint8_t bytes; diff --git a/src/gprs_coding_scheme.h b/src/gprs_coding_scheme.h index 045d34a..d97df08 100644 --- a/src/gprs_coding_scheme.h +++ b/src/gprs_coding_scheme.h @@ -31,8 +31,6 @@ class GprsCodingScheme { public: -#define MAX_NUM_ARQ 2 /* max. number of ARQ */ -#define MAX_NUM_MCS 9 /* max. number of MCS */ #define EGPRS_ARQ1 0x0 #define EGPRS_ARQ2 0x1 @@ -102,9 +100,6 @@ static CodingScheme get_retx_mcs(const GprsCodingScheme mcs, const GprsCodingScheme retx_mcs, const unsigned arq_type); - - static enum CodingScheme egprs_mcs_retx_tbl[MAX_NUM_ARQ] - [MAX_NUM_MCS][MAX_NUM_MCS]; private: GprsCodingScheme(int s); /* fail on use */ GprsCodingScheme& operator =(int s); /* fail on use */ @@ -192,15 +187,3 @@ { return a.isCompatible(b) && a.to_num() < b.to_num(); } - -inline CodingScheme GprsCodingScheme::get_retx_mcs( - const GprsCodingScheme mcs, - const GprsCodingScheme demanded_mcs, - const unsigned arq_type) -{ - OSMO_ASSERT(mcs.to_num() > 0); - OSMO_ASSERT(demanded_mcs.to_num() > 0); - - return egprs_mcs_retx_tbl[arq_type][mcs.to_num() - 1] - [demanded_mcs.to_num() - 1]; -} -- To view, visit https://gerrit.osmocom.org/13066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I95258d1558a3b918ae83f1a69e7c3de2b97e5627 Gerrit-Change-Number: 13066 Gerrit-PatchSet: 5 Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max <msuraev at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190313/66a6adf0/attachment.htm>