gsm_constants.h File Reference

Go to the source code of this file.

## Macros

#define | GSM_SYMBOL_RATE (1625000.0/6.0)
#define | GSM_SYMBOL_PERIOD (1.0/GSM_SYMBOL_RATE)
#define | TAIL_BITS 3
#define | GUARD_BITS 8
#define | GUARD_FRACTIONAL 0.25
#define | GUARD_PERIOD GUARD_BITS + GUARD_FRACTIONAL
#define | DATA_BITS 57
#define | STEALING_BIT 1
#define | N_TRAIN_BITS 26
#define | N_SYNC_BITS 64
#define | USEFUL_BITS 142
#define | FCCH_BITS USEFUL_BITS
#define | BURST_SIZE (USEFUL_BITS+2*TAIL_BITS)
#define | ACCESS_BURST_SIZE 88
#define | PROCESSED_CHUNK BURST_SIZE+2*GUARD_PERIOD
#define | SCH_DATA_LEN 39
#define | TS_BITS (TAIL_BITS+USEFUL_BITS+TAIL_BITS+GUARD_BITS)
#define | TS_PER_FRAME 8
#define | FRAME_BITS (TS_PER_FRAME * TS_BITS + 2)
#define | FCCH_POS TAIL_BITS
#define | SYNC_POS 39
#define | TRAIN_POS ( TAIL_BITS + (DATA_BITS+STEALING_BIT) + 5)
#define | TRAIN_BEGINNING 5
#define | SAFETY_MARGIN 6
#define | FCCH_HITS_NEEDED (USEFUL_BITS - 4)
#define | FCCH_MAX_MISSES 1
#define | FCCH_MAX_FREQ_OFFSET 100
#define | CHAN_IMP_RESP_LENGTH 5
#define | MAX_SCH_ERRORS 10
#define | TSC0 0
#define | TSC1 1
#define | TSC2 2
#define | TSC3 3
#define | TSC4 4
#define | TSC5 5
#define | TSC6 6
#define | TSC7 7
#define | TS_DUMMY 8
#define | TRAIN_SEQ_NUM 9
#define | TIMESLOT0 0
#define | TIMESLOT1 1
#define | TIMESLOT2 2
#define | TIMESLOT3 3
#define | TIMESLOT4 4
#define | TIMESLOT5 5
#define | TIMESLOT6 6
#define | TIMESLOT7 7

## Enumerations

enum | burst_type { empty , fcch_burst , sch_burst , normal_burst , rach_burst , dummy , dummy_or_normal , normal_or_noise }
enum | multiframe_type { unknown , multiframe_26 , multiframe_51 }

## Variables

static const unsigned char | SYNC_BITS []
const unsigned | FCCH_FRAMES [] = {0, 10, 20, 30, 40}
const unsigned | SCH_FRAMES [] = {1, 11, 21, 31, 41}
const unsigned | BCCH_FRAMES [] = {2, 3, 4, 5}
const unsigned | TEST_CCH_FRAMES [] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49}
| !the receiver shouldn't care about logical !channels so this will be removed from this header
const unsigned | TRAFFIC_CHANNEL_F [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}
const unsigned | TEST51 [] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50}
static const unsigned char | train_seq [TRAIN_SEQ_NUM][N_TRAIN_BITS]
static const unsigned char | dummy_burst []
static const unsigned char | fc_fb []
static const unsigned char | fc_compact_fb []

## Macro Definition Documentation

## ACCESS_BURST_SIZE

#define ACCESS_BURST_SIZE 88

## BURST_SIZE

#define BURST_SIZE (USEFUL_BITS+2*TAIL_BITS)

## CHAN_IMP_RESP_LENGTH

#define CHAN_IMP_RESP_LENGTH 5

## DATA_BITS

#define DATA_BITS 57

## FCCH_BITS

#define FCCH_BITS USEFUL_BITS

## FCCH_HITS_NEEDED

#define FCCH_HITS_NEEDED (USEFUL_BITS - 4)

## FCCH_MAX_FREQ_OFFSET

#define FCCH_MAX_FREQ_OFFSET 100

## FCCH_MAX_MISSES

#define FCCH_MAX_MISSES 1

## FCCH_POS

#define FCCH_POS TAIL_BITS

## FRAME_BITS

#define FRAME_BITS (TS_PER_FRAME * TS_BITS + 2)

## GSM_SYMBOL_PERIOD

#define GSM_SYMBOL_PERIOD (1.0/GSM_SYMBOL_RATE)

## GSM_SYMBOL_RATE

#define GSM_SYMBOL_RATE (1625000.0/6.0)

## GUARD_BITS

#define GUARD_BITS 8

## GUARD_FRACTIONAL

#define GUARD_FRACTIONAL 0.25

## GUARD_PERIOD

#define GUARD_PERIOD GUARD_BITS + GUARD_FRACTIONAL

## MAX_SCH_ERRORS

#define MAX_SCH_ERRORS 10

## N_SYNC_BITS

#define N_SYNC_BITS 64

## N_TRAIN_BITS

#define N_TRAIN_BITS 26

## PROCESSED_CHUNK

#define PROCESSED_CHUNK BURST_SIZE+2*GUARD_PERIOD

## SAFETY_MARGIN

#define SAFETY_MARGIN 6

## SCH_DATA_LEN

#define SCH_DATA_LEN 39

## STEALING_BIT

#define STEALING_BIT 1

## SYNC_POS

#define SYNC_POS 39

## TAIL_BITS

#define TAIL_BITS 3

## TIMESLOT0

#define TIMESLOT0 0

## TIMESLOT1

#define TIMESLOT1 1

## TIMESLOT2

#define TIMESLOT2 2

## TIMESLOT3

#define TIMESLOT3 3

## TIMESLOT4

#define TIMESLOT4 4

## TIMESLOT5

#define TIMESLOT5 5

## TIMESLOT6

#define TIMESLOT6 6

## TIMESLOT7

#define TIMESLOT7 7

## TRAIN_BEGINNING

#define TRAIN_BEGINNING 5

## TRAIN_POS

#define TRAIN_POS ( TAIL_BITS + (DATA_BITS+STEALING_BIT) + 5)

## TRAIN_SEQ_NUM

#define TRAIN_SEQ_NUM 9

## TS_BITS

#define TS_BITS (TAIL_BITS+USEFUL_BITS+TAIL_BITS+GUARD_BITS)

## TS_DUMMY

#define TS_DUMMY 8

## TS_PER_FRAME

#define TS_PER_FRAME 8

## TSC0

#define TSC0 0

## TSC1

#define TSC1 1

## TSC2

#define TSC2 2

## TSC3

#define TSC3 3

## TSC4

#define TSC4 4

## TSC5

#define TSC5 5

## TSC6

#define TSC6 6

## TSC7

#define TSC7 7

## USEFUL_BITS

#define USEFUL_BITS 142

## Enumeration Type Documentation

## burst_type

enum burst_type

Enumerator
empty |
fcch_burst |
sch_burst |
normal_burst |
rach_burst |
dummy |
dummy_or_normal |
normal_or_noise |

## multiframe_type

enum multiframe_type

Enumerator
unknown |
multiframe_26 |
multiframe_51 |

## Variable Documentation

## BCCH_FRAMES

const unsigned BCCH_FRAMES[] = {2, 3, 4, 5}

## dummy_burst

const unsigned char dummy_burst[]

static

Initial value:
= {
0, 0, 0,
1, 1, 1, 1, 1, 0, 1, 1, 0, 1,
1, 1, 0, 1, 1, 0, 0, 0, 0, 0,
1, 0, 1, 0, 0, 1, 0, 0, 1, 1,
1, 0, 0, 0, 0, 0, 1, 0, 0, 1,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
0, 1, 1, 1, 1, 1, 0, 0,
0, 1, 1, 1, 0, 0, 0, 1, 0, 1,
1, 1, 0, 0, 0, 1, 0, 1, 1, 1,
0, 0, 0, 1, 0, 1,
0, 1, 1, 1, 0, 1, 0, 0, 1, 0,
1, 0, 0, 0, 1, 1, 0, 0, 1, 1,
0, 0, 1, 1, 1, 0, 0, 1, 1, 1,
1, 0, 1, 0, 0, 1, 1, 1, 1, 1,
0, 0, 0, 1, 0, 0, 1, 0, 1, 1,
1, 1, 1, 0, 1, 0, 1, 0,
0, 0, 0
}

## fc_compact_fb

const unsigned char fc_compact_fb[]

static

Initial value:
= {
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0
}

## fc_fb

const unsigned char fc_fb[]

static

Initial value:
= {
0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0
}

## FCCH_FRAMES

const unsigned FCCH_FRAMES[] = {0, 10, 20, 30, 40}

## SCH_FRAMES

const unsigned SCH_FRAMES[] = {1, 11, 21, 31, 41}

## SYNC_BITS

const unsigned char SYNC_BITS[]

static

Initial value:
= {
1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,
0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1,
0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1
}

## TEST51

const unsigned TEST51[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50}

## TEST_CCH_FRAMES

const unsigned TEST_CCH_FRAMES[] = {2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49}

!the receiver shouldn't care about logical !channels so this will be removed from this header

## TRAFFIC_CHANNEL_F

const unsigned TRAFFIC_CHANNEL_F[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24}

## train_seq

const unsigned char train_seq[TRAIN_SEQ_NUM][N_TRAIN_BITS]

static

Initial value:
= {
{0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1},
{0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1},
{0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0},
{0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0},
{0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1},
{0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0},
{1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1},
{1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0},
{0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1}
}