aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_coding_scheme.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-03 15:25:04 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:39 +0100
commit2305afd86c3d3541d01fee0dee408a4510f96d4e (patch)
tree47122e60e494d28c603d78b4f9489785146cbf7e /src/gprs_coding_scheme.h
parent4cc46d3e2ab3762733d1e496d4d4a6f749faba47 (diff)
cs: Add family related methods
Add family handling and the related methods family, isFamilyCompatible, isCombinable, decToSingleBlock to GprsCodingScheme. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_coding_scheme.h')
-rw-r--r--src/gprs_coding_scheme.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gprs_coding_scheme.h b/src/gprs_coding_scheme.h
index 348aefbd..e9a06a53 100644
--- a/src/gprs_coding_scheme.h
+++ b/src/gprs_coding_scheme.h
@@ -50,6 +50,13 @@ public:
NUM_HEADER_TYPES
};
+ enum Family {
+ FAMILY_INVALID,
+ FAMILY_A,
+ FAMILY_B,
+ FAMILY_C,
+ };
+
GprsCodingScheme(Scheme s = UNKNOWN);
operator bool() const {return m_scheme != UNKNOWN;}
@@ -65,11 +72,14 @@ public:
bool isEgprsGmsk() const {return isEgprs() && m_scheme <= MCS4;}
bool isCompatible(Mode mode) const;
bool isCompatible(GprsCodingScheme o) const;
+ bool isFamilyCompatible(GprsCodingScheme o) const;
+ bool isCombinable(GprsCodingScheme o) const;
void inc(Mode mode);
void dec(Mode mode);
void inc();
void dec();
+ void decToSingleBlock(bool *needStuffing);
unsigned int sizeUL() const;
unsigned int sizeDL() const;
@@ -87,6 +97,7 @@ public:
const char *name() const;
HeaderType headerTypeData() const;
HeaderType headerTypeControl() const;
+ Family family() const;
static GprsCodingScheme getBySizeUL(unsigned size);
static GprsCodingScheme getGprsByNum(unsigned num);