libosmogsm 1.10.0.58-6cd7a
Osmocom GSM library
|
helper functions for (E)GPRS RLC according to 3GPP TS 44.060. More...
#include <errno.h>
#include <string.h>
#include <osmocom/core/utils.h>
#include <osmocom/coding/gsm0503_coding.h>
#include <osmocom/gsm/protocol/gsm_44_060.h>
Data Structures | |
struct | gprs_cs_desc |
Macros | |
#define | EGPRS_CPS_TYPE1_TBL_SZ 29 |
#define | EGPRS_CPS_TYPE2_TBL_SZ 8 |
#define | EGPRS_CPS_TYPE3_TBL_SZ 16 |
Functions | |
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) |
Return size of (E)GPRS uplink block for given coding scheme in bits. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Variables | |
static const struct egprs_cps | egprs_cps_table_type1 [EGPRS_CPS_TYPE1_TBL_SZ] |
static const struct egprs_cps | egprs_cps_table_type2 [EGPRS_CPS_TYPE2_TBL_SZ] |
static const struct egprs_cps | egprs_cps_table_type3 [EGPRS_CPS_TYPE3_TBL_SZ] |
const struct gprs_cs_desc | gprs_cs_desc [_NUM_OSMO_GPRS_CS] |
helper functions for (E)GPRS RLC according to 3GPP TS 44.060.
(C) 2016 by Thomas Thou (C) 2016-2017 by sysmocom - s.f.m.c. GmbH (C) 2017 by Harald Welte lafor.nosp@m.ge@g.nosp@m.numon.nosp@m.ks.o.nosp@m.rg All Rights Reserved.
SPDX-License-Identifier: GPL-2.0+
#define EGPRS_CPS_TYPE1_TBL_SZ 29 |
#define EGPRS_CPS_TYPE2_TBL_SZ 8 |
#define EGPRS_CPS_TYPE3_TBL_SZ 16 |
int egprs_get_cps | ( | struct egprs_cps * | cps, |
uint8_t | type, | ||
uint8_t | 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.
References ARRAY_SIZE, gprs_cs_desc::bits, gprs_cs_desc::bytes, and gprs_cs_desc::downlink.
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.
References ARRAY_SIZE, gprs_cs_desc::bytes, and gprs_cs_desc::downlink.
Referenced by 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.
References ARRAY_SIZE, OSMO_GPRS_CS_NONE, and osmo_gprs_dl_block_size_bytes().
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.
References ARRAY_SIZE, gprs_cs_desc::bits, gprs_cs_desc::bytes, and gprs_cs_desc::uplink.
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.
References ARRAY_SIZE, gprs_cs_desc::bytes, and gprs_cs_desc::uplink.
Referenced by 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.
References ARRAY_SIZE, OSMO_GPRS_CS_NONE, and osmo_gprs_ul_block_size_bytes().
|
static |
Referenced by egprs_get_cps().
|
static |
Referenced by egprs_get_cps().
|
static |
Referenced by egprs_get_cps().
const struct gprs_cs_desc gprs_cs_desc[_NUM_OSMO_GPRS_CS] |