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 uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/66/13066/1
diff --git a/src/gprs_coding_scheme.cpp b/src/gprs_coding_scheme.cpp
index 3769363..1231f0e 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},
@@ -53,6 +56,16 @@
}
};
+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 1121d13..89054f5 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
@@ -111,9 +109,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 */
@@ -206,15 +201,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: newchange
Gerrit-Change-Id: I95258d1558a3b918ae83f1a69e7c3de2b97e5627
Gerrit-Change-Number: 13066
Gerrit-PatchSet: 1
Gerrit-Owner: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190226/b73b5582/attachment.htm>