libosmogsm 1.9.0.196-9975
Osmocom GSM library
gsm_44_060.h
Go to the documentation of this file.
7#pragma once
8
9#include <stdint.h>
10#include <osmocom/core/endian.h>
11
12/* TS 44.060 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_endianness.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 44.060 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_endianness.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 44.060 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_endianness.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_endianness.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_endianness.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_endianness.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 44.060 Table 12.24.2
164* Meaning of values documented in TS 23.060 Chapter 6.3.3.1: Network Mode of Operation */
166 GPRS_NMO_I = 0, /* CS pagin on GPRS paging or traffic channel */
167 GPRS_NMO_II = 1, /* all paging on CCCH */
168 GPRS_NMO_III = 2, /* no paging coordination */
170
171/* TS 44.060 12.24 */
174 /* T3168: wait for packet uplink assignment message */
175 uint32_t t3168; /* in milliseconds */
176 /* T3192: wait for release of the TBF after reception of the final block */
177 uint32_t t3192; /* in milliseconds */
178 uint32_t drx_timer_max;/* in seconds */
179 uint32_t bs_cv_max;
181 bool ctrl_ack_type_use_block; /* use PACKET CONTROL ACKNOWLEDGMENT */
182
184 struct {
187 uint8_t bep_period;
193};
194
195/* TS 44.060 Table 12.9.2 */
197 uint8_t alpha;
198 uint8_t t_avg_w;
199 uint8_t t_avg_t;
201 uint8_t n_avg_i;
202};
203
204
206struct egprs_cps {
207 uint8_t bits;
208 uint8_t mcs;
209 uint8_t p[2];
210};
211
218};
219
225};
226
244
245int egprs_get_cps(struct egprs_cps *cps, uint8_t type, uint8_t bits);
246
251enum osmo_gprs_cs osmo_gprs_ul_cs_by_block_bytes(uint8_t block_size);
252enum osmo_gprs_cs osmo_gprs_dl_cs_by_block_bytes(uint8_t block_size);
uint8_t type
Definition: gsm_04_08_gprs.h:7
int egprs_get_cps(struct egprs_cps *cps, uint8_t type, uint8_t bits)
Definition: gprs_rlc.c:91
int osmo_gprs_ul_block_size_bits(enum osmo_gprs_cs cs)
Return size of (E)GPRS uplink block for given coding scheme in bits.
Definition: gprs_rlc.c:146
osmo_gprs_nmo
Definition: gsm_44_060.h:165
@ GPRS_NMO_II
Definition: gsm_44_060.h:167
@ GPRS_NMO_I
Definition: gsm_44_060.h:166
@ GPRS_NMO_III
Definition: gsm_44_060.h:168
egprs_hdr_type
EGPRS header types (TS 44.060 10.0a.2)
Definition: gsm_44_060.h:221
@ EGPRS_HDR_TYPE2
Definition: gsm_44_060.h:223
@ EGPRS_HDR_TYPE1
Definition: gsm_44_060.h:222
@ EGPRS_HDR_TYPE3
Definition: gsm_44_060.h:224
egprs_cps_punc
CPS puncturing table selection (TS 44.060 10.4.8a)
Definition: gsm_44_060.h:213
@ EGPRS_CPS_P3
Definition: gsm_44_060.h:216
@ EGPRS_CPS_NONE
Definition: gsm_44_060.h:217
@ EGPRS_CPS_P2
Definition: gsm_44_060.h:215
@ EGPRS_CPS_P1
Definition: gsm_44_060.h:214
osmo_gprs_cs
Definition: gsm_44_060.h:227
@ OSMO_GPRS_CS_NONE
Definition: gsm_44_060.h:228
@ OSMO_GPRS_MCS3
Definition: gsm_44_060.h:235
@ OSMO_GPRS_MCS4
Definition: gsm_44_060.h:236
@ OSMO_GPRS_CS4
Definition: gsm_44_060.h:232
@ OSMO_GPRS_MCS6
Definition: gsm_44_060.h:238
@ OSMO_GPRS_MCS9
Definition: gsm_44_060.h:241
@ OSMO_GPRS_CS3
Definition: gsm_44_060.h:231
@ OSMO_GPRS_MCS2
Definition: gsm_44_060.h:234
@ OSMO_GPRS_CS1
Definition: gsm_44_060.h:229
@ OSMO_GPRS_MCS5
Definition: gsm_44_060.h:237
@ OSMO_GPRS_MCS7
Definition: gsm_44_060.h:239
@ OSMO_GPRS_CS2
Definition: gsm_44_060.h:230
@ OSMO_GPRS_MCS8
Definition: gsm_44_060.h:240
@ _NUM_OSMO_GPRS_CS
Definition: gsm_44_060.h:242
@ OSMO_GPRS_MCS1
Definition: gsm_44_060.h:233
int osmo_gprs_ul_block_size_bytes(enum osmo_gprs_cs cs)
Return size of (E)GPRS uplink block for given coding scheme in bytes.
Definition: gprs_rlc.c:162
enum osmo_gprs_cs osmo_gprs_dl_cs_by_block_bytes(uint8_t block_size)
Return coding scheme for given (E)GPRS downlink block size.
Definition: gprs_rlc.c:198
enum osmo_gprs_cs osmo_gprs_ul_cs_by_block_bytes(uint8_t block_size)
Return coding scheme for given (E)GPRS uplink block size.
Definition: gprs_rlc.c:186
int osmo_gprs_dl_block_size_bits(enum osmo_gprs_cs cs)
Return size of (E)GPRS downlink block for given coding scheme in bits.
Definition: gprs_rlc.c:154
enum osmo_gprs_nmo __attribute__
int osmo_gprs_dl_block_size_bytes(enum osmo_gprs_cs cs)
Return size of (E)GPRS downlink block for given coding scheme in bytes.
Definition: gprs_rlc.c:174
Structure for CPS coding and puncturing scheme (TS 44.060 10.4.8a)
Definition: gsm_44_060.h:206
uint8_t mcs
Definition: gsm_44_060.h:208
uint8_t bits
Definition: gsm_44_060.h:207
uint8_t p[2]
Definition: gsm_44_060.h:209
Definition: gsm_44_060.h:94
Definition: gsm_44_060.h:118
Definition: gsm_44_060.h:140
Definition: gsm_44_060.h:13
Definition: gsm_44_060.h:42
Definition: gsm_44_060.h:69
Definition: gsm_44_060.h:172
uint32_t t3168
Definition: gsm_44_060.h:175
struct osmo_gprs_cell_options::@118 ext_info
uint32_t t3192
Definition: gsm_44_060.h:177
uint8_t dtm_supported
Definition: gsm_44_060.h:189
uint8_t bep_period
Definition: gsm_44_060.h:187
uint8_t supports_egprs_11bit_rach
Definition: gsm_44_060.h:180
bool ccn_active
Definition: gsm_44_060.h:191
uint8_t use_egprs_p_ch_req
Definition: gsm_44_060.h:186
uint8_t ext_info_present
Definition: gsm_44_060.h:183
uint32_t bs_cv_max
Definition: gsm_44_060.h:179
uint8_t pfc_supported
Definition: gsm_44_060.h:188
uint32_t drx_timer_max
Definition: gsm_44_060.h:178
uint8_t egprs_supported
Definition: gsm_44_060.h:185
enum osmo_gprs_nmo nmo
Definition: gsm_44_060.h:173
uint8_t bss_paging_coordination
Definition: gsm_44_060.h:190
bool ctrl_ack_type_use_block
Definition: gsm_44_060.h:181
Definition: gsm_44_060.h:196
uint8_t t_avg_w
Definition: gsm_44_060.h:198
uint8_t t_avg_t
Definition: gsm_44_060.h:199
uint8_t alpha
Definition: gsm_44_060.h:197
uint8_t pc_meas_chan
Definition: gsm_44_060.h:200
uint8_t n_avg_i
Definition: gsm_44_060.h:201