summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Tsou <tom.tsou@ettus.com>2016-07-14 15:13:45 -0700
committerTom Tsou <tom@tsou.cc>2016-07-25 18:33:26 +0000
commit9a5bbf36b543ff89c0ed148428d97300880c5804 (patch)
tree3a9e3dda51e2942577140993ddc84d0665c0a751 /include
parent1a96946875f807b84fbb255e8b4f8f4a31b9cecc (diff)
egprs: Add CPS tables from TS 04.60
Includes EGPRS coding and puncturing scheme (CPS) tables from 3GPP TS 04.60. Currently osmo-bts-trx is the only user of CPS table values, but this may change with gprsdecode and other utilities. Change-Id: I09fe6514a0e2e51bb3206f8387633f7e0255345f
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am1
-rw-r--r--include/osmocom/gprs/gprs_rlc.h27
2 files changed, 28 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index e420a648..c1256916 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -51,6 +51,7 @@ nobase_include_HEADERS = \
osmocom/gprs/gprs_msgb.h \
osmocom/gprs/gprs_ns.h \
osmocom/gprs/gprs_ns_frgre.h \
+ osmocom/gprs/gprs_rlc.h \
osmocom/gprs/protocol/gsm_04_60.h \
osmocom/gprs/protocol/gsm_08_16.h \
osmocom/gprs/protocol/gsm_08_18.h \
diff --git a/include/osmocom/gprs/gprs_rlc.h b/include/osmocom/gprs/gprs_rlc.h
new file mode 100644
index 00000000..d34d49bf
--- /dev/null
+++ b/include/osmocom/gprs/gprs_rlc.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <stdint.h>
+
+/*! \brief Structure for CPS coding and puncturing scheme (TS 04.60 10.4.8a) */
+struct egprs_cps {
+ uint8_t bits;
+ uint8_t mcs;
+ uint8_t p[2];
+};
+
+/*! \brief CPS puncturing table selection (TS 04.60 10.4.8a) */
+enum egprs_cps_punc {
+ EGPRS_CPS_P1,
+ EGPRS_CPS_P2,
+ EGPRS_CPS_P3,
+ EGPRS_CPS_NONE = -1,
+};
+
+/*! \brief EGPRS header types (TS 04.60 10.0a.2) */
+enum egprs_hdr_type {
+ EGPRS_HDR_TYPE1,
+ EGPRS_HDR_TYPE2,
+ EGPRS_HDR_TYPE3,
+};
+
+int egprs_get_cps(struct egprs_cps *cps, uint8_t type, uint8_t bits);