libosmogsm  0.9.6.315-40e62
Osmocom GSM library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gprs_rlc.c File Reference

helper functions for (E)GPRS RLC according to 3GPP TS 44.060. More...

#include <errno.h>
#include <string.h>
#include <osmocom/gprs/gprs_rlc.h>
#include <osmocom/coding/gsm0503_coding.h>
#include <osmocom/gprs/protocol/gsm_04_60.h>

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)
 

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]
 

Detailed Description

helper functions for (E)GPRS RLC according to 3GPP TS 44.060.

Macro Definition Documentation

#define EGPRS_CPS_TYPE1_TBL_SZ   29

Referenced by egprs_get_cps().

#define EGPRS_CPS_TYPE2_TBL_SZ   8

Referenced by egprs_get_cps().

#define EGPRS_CPS_TYPE3_TBL_SZ   16

Referenced by egprs_get_cps().

Function Documentation

int egprs_get_cps ( struct egprs_cps *  cps,
uint8_t  type,
uint8_t  bits 
)

Variable Documentation

const struct egprs_cps egprs_cps_table_type1[EGPRS_CPS_TYPE1_TBL_SZ]
static

Referenced by egprs_get_cps().

const struct egprs_cps egprs_cps_table_type2[EGPRS_CPS_TYPE2_TBL_SZ]
static
Initial value:
= {
{ .bits = 0, .mcs = EGPRS_MCS6, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 1, .mcs = EGPRS_MCS6, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
{ .bits = 2, .mcs = EGPRS_MCS6, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 3, .mcs = EGPRS_MCS6, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
{ .bits = 4, .mcs = EGPRS_MCS5, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 5, .mcs = EGPRS_MCS5, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
{ .bits = 6, .mcs = EGPRS_MCS6, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 7, .mcs = EGPRS_MCS6, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
}

Referenced by egprs_get_cps().

const struct egprs_cps egprs_cps_table_type3[EGPRS_CPS_TYPE3_TBL_SZ]
static
Initial value:
= {
{ .bits = 0, .mcs = EGPRS_MCS4, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 1, .mcs = EGPRS_MCS4, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
{ .bits = 2, .mcs = EGPRS_MCS4, .p = { EGPRS_CPS_P3, EGPRS_CPS_NONE } },
{ .bits = 3, .mcs = EGPRS_MCS3, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 4, .mcs = EGPRS_MCS3, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
{ .bits = 5, .mcs = EGPRS_MCS3, .p = { EGPRS_CPS_P3, EGPRS_CPS_NONE } },
{ .bits = 6, .mcs = EGPRS_MCS3, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 7, .mcs = EGPRS_MCS3, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
{ .bits = 8, .mcs = EGPRS_MCS3, .p = { EGPRS_CPS_P3, EGPRS_CPS_NONE } },
{ .bits = 9, .mcs = EGPRS_MCS2, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 10, .mcs = EGPRS_MCS2, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
{ .bits = 11, .mcs = EGPRS_MCS1, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 12, .mcs = EGPRS_MCS1, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
{ .bits = 13, .mcs = EGPRS_MCS2, .p = { EGPRS_CPS_P1, EGPRS_CPS_NONE } },
{ .bits = 14, .mcs = EGPRS_MCS2, .p = { EGPRS_CPS_P2, EGPRS_CPS_NONE } },
{ .bits = 15, .mcs = EGPRS_MCS0, .p = { EGPRS_CPS_NONE, EGPRS_CPS_NONE } },
}

Referenced by egprs_get_cps().