libosmogb  1.6.0.113-b17c
Osmocom Gb library
gsm_04_60.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #include <stdint.h>
10 #include <osmocom/core/endian.h>
11 
12 /* TS 04.60 10.3a.4.1.1 */
14 #if OSMO_IS_LITTLE_ENDIAN
15  uint8_t r:1,
16  si:1,
17  cv:4,
18  tfi_hi:2;
19  uint8_t tfi_lo:3,
20  bsn1_hi:5;
21  uint8_t bsn1_lo:6,
22  bsn2_hi:2;
23  uint8_t bsn2_lo:8;
24  uint8_t cps:5,
25  rsb:1,
26  pi:1,
27  spare_hi:1;
28  uint8_t spare_lo:6,
29  dummy:2;
30 #elif OSMO_IS_BIG_ENDIAN
31 /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
32  uint8_t tfi_hi:2, cv:4, si:1, r:1;
33  uint8_t bsn1_hi:5, tfi_lo:3;
34  uint8_t bsn2_hi:2, bsn1_lo:6;
35  uint8_t bsn2_lo:8;
36  uint8_t spare_hi:1, pi:1, rsb:1, cps:5;
37  uint8_t dummy:2, spare_lo:6;
38 #endif
39 } __attribute__ ((packed));
40 
41 /* TS 04.60 10.3a.4.2.1 */
43 #if OSMO_IS_LITTLE_ENDIAN
44  uint8_t r:1,
45  si:1,
46  cv:4,
47  tfi_hi:2;
48  uint8_t tfi_lo:3,
49  bsn1_hi:5;
50  uint8_t bsn1_lo:6,
51  cps_hi:2;
52  uint8_t cps_lo:1,
53  rsb:1,
54  pi:1,
55  spare_hi:5;
56  uint8_t spare_lo:5,
57  dummy:3;
58 #elif OSMO_IS_BIG_ENDIAN
59 /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
60  uint8_t tfi_hi:2, cv:4, si:1, r:1;
61  uint8_t bsn1_hi:5, tfi_lo:3;
62  uint8_t cps_hi:2, bsn1_lo:6;
63  uint8_t spare_hi:5, pi:1, rsb:1, cps_lo:1;
64  uint8_t dummy:3, spare_lo:5;
65 #endif
66 } __attribute__ ((packed));
67 
68 /* TS 04.60 10.3a.4.3.1 */
70 #if OSMO_IS_LITTLE_ENDIAN
71  uint8_t r:1,
72  si:1,
73  cv:4,
74  tfi_hi:2;
75  uint8_t tfi_lo:3,
76  bsn1_hi:5;
77  uint8_t bsn1_lo:6,
78  cps_hi:2;
79  uint8_t cps_lo:2,
80  spb:2,
81  rsb:1,
82  pi:1,
83  spare:1,
84  dummy:1;
85 #elif OSMO_IS_BIG_ENDIAN
86 /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
87  uint8_t tfi_hi:2, cv:4, si:1, r:1;
88  uint8_t bsn1_hi:5, tfi_lo:3;
89  uint8_t cps_hi:2, bsn1_lo:6;
90  uint8_t dummy:1, spare:1, pi:1, rsb:1, spb:2, cps_lo:2;
91 #endif
92 } __attribute__ ((packed));
93 
95 #if OSMO_IS_LITTLE_ENDIAN
96  uint8_t usf:3,
97  es_p:2,
98  rrbp:2,
99  tfi_hi:1;
100  uint8_t tfi_lo:4,
101  pr:2,
102  bsn1_hi:2;
103  uint8_t bsn1_mid:8;
104  uint8_t bsn1_lo:1,
105  bsn2_hi:7;
106  uint8_t bsn2_lo:3,
107  cps:5;
108 #elif OSMO_IS_BIG_ENDIAN
109 /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
110  uint8_t tfi_hi:1, rrbp:2, es_p:2, usf:3;
111  uint8_t bsn1_hi:2, pr:2, tfi_lo:4;
112  uint8_t bsn1_mid:8;
113  uint8_t bsn2_hi:7, bsn1_lo:1;
114  uint8_t cps:5, bsn2_lo:3;
115 #endif
116 } __attribute__ ((packed));
117 
119 #if OSMO_IS_LITTLE_ENDIAN
120  uint8_t usf:3,
121  es_p:2,
122  rrbp:2,
123  tfi_hi:1;
124  uint8_t tfi_lo:4,
125  pr:2,
126  bsn1_hi:2;
127  uint8_t bsn1_mid:8;
128  uint8_t bsn1_lo:1,
129  cps:3,
130  dummy:4;
131 #elif OSMO_IS_BIG_ENDIAN
132 /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
133  uint8_t tfi_hi:1, rrbp:2, es_p:2, usf:3;
134  uint8_t bsn1_hi:2, pr:2, tfi_lo:4;
135  uint8_t bsn1_mid:8;
136  uint8_t dummy:4, cps:3, bsn1_lo:1;
137 #endif
138 } __attribute__ ((packed));
139 
141 #if OSMO_IS_LITTLE_ENDIAN
142  uint8_t usf:3,
143  es_p:2,
144  rrbp:2,
145  tfi_hi:1;
146  uint8_t tfi_lo:4,
147  pr:2,
148  bsn1_hi:2;
149  uint8_t bsn1_mid:8;
150  uint8_t bsn1_lo:1,
151  cps:4,
152  spb:2,
153  dummy:1;
154 #elif OSMO_IS_BIG_ENDIAN
155 /* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */
156  uint8_t tfi_hi:1, rrbp:2, es_p:2, usf:3;
157  uint8_t bsn1_hi:2, pr:2, tfi_lo:4;
158  uint8_t bsn1_mid:8;
159  uint8_t dummy:1, spb:2, cps:4, bsn1_lo:1;
160 #endif
161 } __attribute__ ((packed));
162 
163 /* TS 03.60 Chapter 6.3.3.1: Network Mode of Operation */
165  GPRS_NMO_I = 0, /* CS pagin on GPRS paging or traffic channel */
166  GPRS_NMO_II = 1, /* all paging on CCCH */
167  GPRS_NMO_III = 2, /* no paging coordination */
168 };
169 
170 /* TS 44.060 12.24 */
172  enum osmo_gprs_nmo nmo;
173  /* T3168: wait for packet uplink assignment message */
174  uint32_t t3168; /* in milliseconds */
175  /* T3192: wait for release of the TBF after reception of the final block */
176  uint32_t t3192; /* in milliseconds */
177  uint32_t drx_timer_max;/* in seconds */
178  uint32_t bs_cv_max;
180  bool ctrl_ack_type_use_block; /* use PACKET CONTROL ACKNOWLEDGMENT */
181 
183  struct {
186  uint8_t bep_period;
187  uint8_t pfc_supported;
188  uint8_t dtm_supported;
192 };
193 
194 /* TS 04.60 Table 12.9.2 */
196  uint8_t alpha;
197  uint8_t t_avg_w;
198  uint8_t t_avg_t;
199  uint8_t pc_meas_chan;
200  uint8_t n_avg_i;
201 };
osmo_gprs_nmo
Definition: gsm_04_60.h:164
@ GPRS_NMO_II
Definition: gsm_04_60.h:166
@ GPRS_NMO_I
Definition: gsm_04_60.h:165
@ GPRS_NMO_III
Definition: gsm_04_60.h:167
enum osmo_gprs_nmo __attribute__
Definition: gsm_04_60.h:94
Definition: gsm_04_60.h:118
Definition: gsm_04_60.h:140
Definition: gsm_04_60.h:13
Definition: gsm_04_60.h:42
Definition: gsm_04_60.h:69
Definition: gsm_04_60.h:171
uint32_t t3168
Definition: gsm_04_60.h:174
uint32_t t3192
Definition: gsm_04_60.h:176
uint8_t dtm_supported
Definition: gsm_04_60.h:188
struct osmo_gprs_cell_options::@24 ext_info
uint8_t bep_period
Definition: gsm_04_60.h:186
uint8_t supports_egprs_11bit_rach
Definition: gsm_04_60.h:179
bool ccn_active
Definition: gsm_04_60.h:190
uint8_t use_egprs_p_ch_req
Definition: gsm_04_60.h:185
uint8_t ext_info_present
Definition: gsm_04_60.h:182
uint32_t bs_cv_max
Definition: gsm_04_60.h:178
uint8_t pfc_supported
Definition: gsm_04_60.h:187
uint32_t drx_timer_max
Definition: gsm_04_60.h:177
uint8_t egprs_supported
Definition: gsm_04_60.h:184
enum osmo_gprs_nmo nmo
Definition: gsm_04_60.h:172
uint8_t bss_paging_coordination
Definition: gsm_04_60.h:189
bool ctrl_ack_type_use_block
Definition: gsm_04_60.h:180
Definition: gsm_04_60.h:195
uint8_t t_avg_w
Definition: gsm_04_60.h:197
uint8_t t_avg_t
Definition: gsm_04_60.h:198
uint8_t alpha
Definition: gsm_04_60.h:196
uint8_t pc_meas_chan
Definition: gsm_04_60.h:199
uint8_t n_avg_i
Definition: gsm_04_60.h:200