Loading...
Searching...
No Matches
gsm_44_060.h
Go to the documentation of this file.
#pragma once
#include <stdint.h>
#include <osmocom/core/endian.h>
/* TS 44.060 10.3a.4.1.1 */
struct gprs_rlc_ul_header_egprs_1 {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t r:1,
si:1,
cv:4,
tfi_hi:2;
uint8_t tfi_lo:3,
bsn1_hi:5;
uint8_t bsn1_lo:6,
bsn2_hi:2;
uint8_t bsn2_lo:8;
uint8_t cps:5,
rsb:1,
pi:1,
spare_hi:1;
uint8_t spare_lo:6,
dummy:2;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t tfi_hi:2, cv:4, si:1, r:1;
uint8_t bsn1_hi:5, tfi_lo:3;
uint8_t bsn2_hi:2, bsn1_lo:6;
uint8_t bsn2_lo:8;
uint8_t spare_hi:1, pi:1, rsb:1, cps:5;
uint8_t dummy:2, spare_lo:6;
#endif
} __attribute__ ((packed));
/* TS 44.060 10.3a.4.2.1 */
struct gprs_rlc_ul_header_egprs_2 {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t r:1,
si:1,
cv:4,
tfi_hi:2;
uint8_t tfi_lo:3,
bsn1_hi:5;
uint8_t bsn1_lo:6,
cps_hi:2;
uint8_t cps_lo:1,
rsb:1,
pi:1,
spare_hi:5;
uint8_t spare_lo:5,
dummy:3;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t tfi_hi:2, cv:4, si:1, r:1;
uint8_t bsn1_hi:5, tfi_lo:3;
uint8_t cps_hi:2, bsn1_lo:6;
uint8_t spare_hi:5, pi:1, rsb:1, cps_lo:1;
uint8_t dummy:3, spare_lo:5;
#endif
} __attribute__ ((packed));
/* TS 44.060 10.3a.4.3.1 */
struct gprs_rlc_ul_header_egprs_3 {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t r:1,
si:1,
cv:4,
tfi_hi:2;
uint8_t tfi_lo:3,
bsn1_hi:5;
uint8_t bsn1_lo:6,
cps_hi:2;
uint8_t cps_lo:2,
spb:2,
rsb:1,
pi:1,
spare:1,
dummy:1;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t tfi_hi:2, cv:4, si:1, r:1;
uint8_t bsn1_hi:5, tfi_lo:3;
uint8_t cps_hi:2, bsn1_lo:6;
uint8_t dummy:1, spare:1, pi:1, rsb:1, spb:2, cps_lo:2;
#endif
} __attribute__ ((packed));
struct gprs_rlc_dl_header_egprs_1 {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t usf:3,
es_p:2,
rrbp:2,
tfi_hi:1;
uint8_t tfi_lo:4,
pr:2,
bsn1_hi:2;
uint8_t bsn1_mid:8;
uint8_t bsn1_lo:1,
bsn2_hi:7;
uint8_t bsn2_lo:3,
cps:5;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t tfi_hi:1, rrbp:2, es_p:2, usf:3;
uint8_t bsn1_hi:2, pr:2, tfi_lo:4;
uint8_t bsn1_mid:8;
uint8_t bsn2_hi:7, bsn1_lo:1;
uint8_t cps:5, bsn2_lo:3;
#endif
} __attribute__ ((packed));
struct gprs_rlc_dl_header_egprs_2 {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t usf:3,
es_p:2,
rrbp:2,
tfi_hi:1;
uint8_t tfi_lo:4,
pr:2,
bsn1_hi:2;
uint8_t bsn1_mid:8;
uint8_t bsn1_lo:1,
cps:3,
dummy:4;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t tfi_hi:1, rrbp:2, es_p:2, usf:3;
uint8_t bsn1_hi:2, pr:2, tfi_lo:4;
uint8_t bsn1_mid:8;
uint8_t dummy:4, cps:3, bsn1_lo:1;
#endif
} __attribute__ ((packed));
struct gprs_rlc_dl_header_egprs_3 {
#if OSMO_IS_LITTLE_ENDIAN
uint8_t usf:3,
es_p:2,
rrbp:2,
tfi_hi:1;
uint8_t tfi_lo:4,
pr:2,
bsn1_hi:2;
uint8_t bsn1_mid:8;
uint8_t bsn1_lo:1,
cps:4,
spb:2,
dummy:1;
#elif OSMO_IS_BIG_ENDIAN
/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */
uint8_t tfi_hi:1, rrbp:2, es_p:2, usf:3;
uint8_t bsn1_hi:2, pr:2, tfi_lo:4;
uint8_t bsn1_mid:8;
uint8_t dummy:1, spb:2, cps:4, bsn1_lo:1;
#endif
} __attribute__ ((packed));
/* TS 44.060 Table 12.24.2
* Meaning of values documented in TS 23.060 Chapter 6.3.3.1: Network Mode of Operation */
enum osmo_gprs_nmo {
GPRS_NMO_I = 0, /* CS pagin on GPRS paging or traffic channel */
GPRS_NMO_II = 1, /* all paging on CCCH */
GPRS_NMO_III = 2, /* no paging coordination */
};
/* TS 44.060 12.24 */
struct osmo_gprs_cell_options {
enum osmo_gprs_nmo nmo;
/* T3168: wait for packet uplink assignment message */
uint32_t t3168; /* in milliseconds */
/* T3192: wait for release of the TBF after reception of the final block */
uint32_t t3192; /* in milliseconds */
uint32_t drx_timer_max;/* in seconds */
uint32_t bs_cv_max;
uint8_t supports_egprs_11bit_rach;
bool ctrl_ack_type_use_block; /* use PACKET CONTROL ACKNOWLEDGMENT */
uint8_t ext_info_present;
struct {
uint8_t egprs_supported;
uint8_t use_egprs_p_ch_req;
uint8_t bep_period;
uint8_t pfc_supported;
uint8_t dtm_supported;
uint8_t bss_paging_coordination;
bool ccn_active;
} ext_info;
};
/* TS 44.060 Table 12.9.2 */
struct osmo_gprs_power_ctrl_pars {
uint8_t alpha;
uint8_t t_avg_w;
uint8_t t_avg_t;
uint8_t pc_meas_chan;
uint8_t n_avg_i;
};
struct egprs_cps {
uint8_t bits;
uint8_t mcs;
uint8_t p[2];
};
enum egprs_cps_punc {
EGPRS_CPS_P1,
EGPRS_CPS_P2,
EGPRS_CPS_P3,
EGPRS_CPS_NONE = -1,
};
enum egprs_hdr_type {
EGPRS_HDR_TYPE1,
EGPRS_HDR_TYPE2,
EGPRS_HDR_TYPE3,
};
enum osmo_gprs_cs {
OSMO_GPRS_CS_NONE,
OSMO_GPRS_CS1,
OSMO_GPRS_CS2,
OSMO_GPRS_CS3,
OSMO_GPRS_CS4,
OSMO_GPRS_MCS1,
OSMO_GPRS_MCS2,
OSMO_GPRS_MCS3,
OSMO_GPRS_MCS4,
OSMO_GPRS_MCS5,
OSMO_GPRS_MCS6,
OSMO_GPRS_MCS7,
OSMO_GPRS_MCS8,
OSMO_GPRS_MCS9,
_NUM_OSMO_GPRS_CS
};
int egprs_get_cps(struct egprs_cps *cps, uint8_t type, uint8_t bits);
int osmo_gprs_ul_block_size_bits(enum osmo_gprs_cs cs);
int osmo_gprs_dl_block_size_bits(enum osmo_gprs_cs cs);
int osmo_gprs_ul_block_size_bytes(enum osmo_gprs_cs cs);
int osmo_gprs_dl_block_size_bytes(enum osmo_gprs_cs cs);
enum osmo_gprs_cs osmo_gprs_ul_cs_by_block_bytes(uint8_t block_size);
enum osmo_gprs_cs osmo_gprs_dl_cs_by_block_bytes(uint8_t block_size);
endian.h
egprs_get_cps
int egprs_get_cps(struct egprs_cps *cps, uint8_t type, uint8_t bits)
Definition gprs_rlc.c:91
osmo_gprs_ul_block_size_bits
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
osmo_gprs_nmo
Definition gsm_44_060.h:165
GPRS_NMO_II
@ GPRS_NMO_II
Definition gsm_44_060.h:167
GPRS_NMO_I
@ GPRS_NMO_I
Definition gsm_44_060.h:166
GPRS_NMO_III
@ GPRS_NMO_III
Definition gsm_44_060.h:168
egprs_hdr_type
egprs_hdr_type
EGPRS header types (TS 44.060 10.0a.2).
Definition gsm_44_060.h:221
EGPRS_HDR_TYPE2
@ EGPRS_HDR_TYPE2
Definition gsm_44_060.h:223
EGPRS_HDR_TYPE1
@ EGPRS_HDR_TYPE1
Definition gsm_44_060.h:222
EGPRS_HDR_TYPE3
@ EGPRS_HDR_TYPE3
Definition gsm_44_060.h:224
egprs_cps_punc
egprs_cps_punc
CPS puncturing table selection (TS 44.060 10.4.8a).
Definition gsm_44_060.h:213
EGPRS_CPS_P3
@ EGPRS_CPS_P3
Definition gsm_44_060.h:216
EGPRS_CPS_NONE
@ EGPRS_CPS_NONE
Definition gsm_44_060.h:217
EGPRS_CPS_P2
@ EGPRS_CPS_P2
Definition gsm_44_060.h:215
EGPRS_CPS_P1
@ EGPRS_CPS_P1
Definition gsm_44_060.h:214
osmo_gprs_cs
osmo_gprs_cs
Definition gsm_44_060.h:227
OSMO_GPRS_CS_NONE
@ OSMO_GPRS_CS_NONE
Definition gsm_44_060.h:228
OSMO_GPRS_MCS3
@ OSMO_GPRS_MCS3
Definition gsm_44_060.h:235
OSMO_GPRS_MCS4
@ OSMO_GPRS_MCS4
Definition gsm_44_060.h:236
OSMO_GPRS_CS4
@ OSMO_GPRS_CS4
Definition gsm_44_060.h:232
OSMO_GPRS_MCS6
@ OSMO_GPRS_MCS6
Definition gsm_44_060.h:238
OSMO_GPRS_MCS9
@ OSMO_GPRS_MCS9
Definition gsm_44_060.h:241
OSMO_GPRS_CS3
@ OSMO_GPRS_CS3
Definition gsm_44_060.h:231
OSMO_GPRS_MCS2
@ OSMO_GPRS_MCS2
Definition gsm_44_060.h:234
OSMO_GPRS_CS1
@ OSMO_GPRS_CS1
Definition gsm_44_060.h:229
OSMO_GPRS_MCS5
@ OSMO_GPRS_MCS5
Definition gsm_44_060.h:237
OSMO_GPRS_MCS7
@ OSMO_GPRS_MCS7
Definition gsm_44_060.h:239
OSMO_GPRS_CS2
@ OSMO_GPRS_CS2
Definition gsm_44_060.h:230
OSMO_GPRS_MCS8
@ OSMO_GPRS_MCS8
Definition gsm_44_060.h:240
_NUM_OSMO_GPRS_CS
@ _NUM_OSMO_GPRS_CS
Definition gsm_44_060.h:242
OSMO_GPRS_MCS1
@ OSMO_GPRS_MCS1
Definition gsm_44_060.h:233
osmo_gprs_ul_block_size_bytes
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
osmo_gprs_dl_cs_by_block_bytes
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
osmo_gprs_ul_cs_by_block_bytes
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
osmo_gprs_dl_block_size_bits
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
__attribute__
enum osmo_gprs_nmo __attribute__
osmo_gprs_dl_block_size_bytes
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
type
uint8_t type
Definition gsm_08_08.h:0
egprs_cps
Structure for CPS coding and puncturing scheme (TS 44.060 10.4.8a).
Definition gsm_44_060.h:206
egprs_cps::mcs
uint8_t mcs
Definition gsm_44_060.h:208
egprs_cps::bits
uint8_t bits
Definition gsm_44_060.h:207
egprs_cps::p
uint8_t p[2]
Definition gsm_44_060.h:209
gprs_rlc_dl_header_egprs_1
Definition gsm_44_060.h:94
gprs_rlc_dl_header_egprs_2
Definition gsm_44_060.h:118
gprs_rlc_dl_header_egprs_3
Definition gsm_44_060.h:140
gprs_rlc_ul_header_egprs_1
Definition gsm_44_060.h:13
gprs_rlc_ul_header_egprs_2
Definition gsm_44_060.h:42
gprs_rlc_ul_header_egprs_3
Definition gsm_44_060.h:69
osmo_gprs_cell_options
Definition gsm_44_060.h:172
osmo_gprs_cell_options::t3168
uint32_t t3168
Definition gsm_44_060.h:175
osmo_gprs_cell_options::t3192
uint32_t t3192
Definition gsm_44_060.h:177
osmo_gprs_cell_options::dtm_supported
uint8_t dtm_supported
Definition gsm_44_060.h:189
osmo_gprs_cell_options::bep_period
uint8_t bep_period
Definition gsm_44_060.h:187
osmo_gprs_cell_options::supports_egprs_11bit_rach
uint8_t supports_egprs_11bit_rach
Definition gsm_44_060.h:180
osmo_gprs_cell_options::ccn_active
bool ccn_active
Definition gsm_44_060.h:191
osmo_gprs_cell_options::use_egprs_p_ch_req
uint8_t use_egprs_p_ch_req
Definition gsm_44_060.h:186
osmo_gprs_cell_options::ext_info_present
uint8_t ext_info_present
Definition gsm_44_060.h:183
osmo_gprs_cell_options::bs_cv_max
uint32_t bs_cv_max
Definition gsm_44_060.h:179
osmo_gprs_cell_options::pfc_supported
uint8_t pfc_supported
Definition gsm_44_060.h:188
osmo_gprs_cell_options::ext_info
struct osmo_gprs_cell_options::@227142015331142372104307236153376262004365147120 ext_info
osmo_gprs_cell_options::drx_timer_max
uint32_t drx_timer_max
Definition gsm_44_060.h:178
osmo_gprs_cell_options::egprs_supported
uint8_t egprs_supported
Definition gsm_44_060.h:185
osmo_gprs_cell_options::nmo
enum osmo_gprs_nmo nmo
Definition gsm_44_060.h:173
osmo_gprs_cell_options::bss_paging_coordination
uint8_t bss_paging_coordination
Definition gsm_44_060.h:190
osmo_gprs_cell_options::ctrl_ack_type_use_block
bool ctrl_ack_type_use_block
Definition gsm_44_060.h:181
osmo_gprs_power_ctrl_pars
Definition gsm_44_060.h:196
osmo_gprs_power_ctrl_pars::t_avg_w
uint8_t t_avg_w
Definition gsm_44_060.h:198
osmo_gprs_power_ctrl_pars::t_avg_t
uint8_t t_avg_t
Definition gsm_44_060.h:199
osmo_gprs_power_ctrl_pars::alpha
uint8_t alpha
Definition gsm_44_060.h:197
osmo_gprs_power_ctrl_pars::pc_meas_chan
uint8_t pc_meas_chan
Definition gsm_44_060.h:200
osmo_gprs_power_ctrl_pars::n_avg_i
uint8_t n_avg_i
Definition gsm_44_060.h:201