summaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-10-09 13:38:38 +0200
committerlaforge <laforge@osmocom.org>2019-10-28 19:43:14 +0000
commit69e00ccd6ff3a19b771070b78ed3d85dd219799f (patch)
treebf4914255ba3a4491423bd7e06f8f4efda1953ef /include/osmocom/gsm
parenta0c8195ad37292ab800a6c777fc28383995b4b64 (diff)
gsm0508: add functions to calculate beginning of a block
The calculation of the beginning of a block for TCH/F, TCH/H and FACCH can be challenging since those channels are affected by the diagonal interleaving of the TCH channels. However, GSM 05.02 Section 7 Table 1 of 5 specifies how the blocks are distributed over the TDMA frame interval. Lets add a mapping function that is based on that table Related: OS#3803 Change-Id: I3d71c66f8c401f5afbad9b1c86c24580dab9e0ce
Diffstat (limited to 'include/osmocom/gsm')
-rw-r--r--include/osmocom/gsm/gsm0502.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/osmocom/gsm/gsm0502.h b/include/osmocom/gsm/gsm0502.h
index fe5cf7e1..c9901dfd 100644
--- a/include/osmocom/gsm/gsm0502.h
+++ b/include/osmocom/gsm/gsm0502.h
@@ -35,3 +35,15 @@ gsm0502_get_paging_group(uint64_t imsi, unsigned int bs_cc_chans,
unsigned int
gsm0502_calc_paging_group(struct gsm48_control_channel_descr *chan_desc, uint64_t imsi);
+
+enum gsm0502_fn_remap_channel {
+ FN_REMAP_TCH_F,
+ FN_REMAP_TCH_H0,
+ FN_REMAP_TCH_H1,
+ FN_REMAP_FACCH_F,
+ FN_REMAP_FACCH_H0,
+ FN_REMAP_FACCH_H1,
+ FN_REMAP_MAX,
+};
+
+uint32_t gsm0502_fn_remap(uint32_t fn, enum gsm0502_fn_remap_channel channel);