libosmogsm  1.0.1.85-9f28
Osmocom GSM library
gsm0502.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <stdint.h>
6 
9 
10 /* Table 5 Clause 7 TS 05.02 */
11 static inline unsigned int
13 {
14  if (chan_desc->ccch_conf == RSL_BCCH_CCCH_CONF_1_C)
15  return 3 - chan_desc->bs_ag_blks_res;
16  else
17  return 9 - chan_desc->bs_ag_blks_res;
18 }
19 
20 /* Chapter 6.5.2 of TS 05.02 */
21 static inline unsigned int
22 gsm0502_get_ccch_group(uint64_t imsi, unsigned int bs_cc_chans,
23  unsigned int n_pag_blocks)
24 {
25  return (imsi % 1000) % (bs_cc_chans * n_pag_blocks) / n_pag_blocks;
26 }
27 
28 /* Chapter 6.5.2 of TS 05.02 */
29 static inline unsigned int
30 gsm0502_get_paging_group(uint64_t imsi, unsigned int bs_cc_chans,
31  int n_pag_blocks)
32 {
33  return (imsi % 1000) % (bs_cc_chans * n_pag_blocks) % n_pag_blocks;
34 }
35 
36 unsigned int
GSM TS 04.08 definitions.
static unsigned int gsm0502_get_n_pag_blocks(struct gsm48_control_channel_descr *chan_desc)
Definition: gsm0502.h:12
#define RSL_BCCH_CCCH_CONF_1_C
Definition: gsm_08_58.h:624
unsigned int gsm0502_calc_paging_group(struct gsm48_control_channel_descr *chan_desc, uint64_t imsi)
Definition: gsm0502.c:32
struct gsm48_chan_desc chan_desc
Definition: gsm_04_08.h:748
GSM Radio Signalling Link messages on the A-bis interface.
Definition: gsm_04_08.h:981
static unsigned int gsm0502_get_ccch_group(uint64_t imsi, unsigned int bs_cc_chans, unsigned int n_pag_blocks)
Definition: gsm0502.h:22
static unsigned int gsm0502_get_paging_group(uint64_t imsi, unsigned int bs_cc_chans, int n_pag_blocks)
Definition: gsm0502.h:30