summaryrefslogtreecommitdiff
path: root/src/lib/gsm_constants.h
diff options
context:
space:
mode:
authorPiotr Krysik <perper@o2.pl>2009-05-28 19:39:56 +0200
committerPiotr Krysik <perper@o2.pl>2009-05-28 19:39:56 +0200
commit0a452fcc8e030f5bdb7187e1db7182cfc488aa31 (patch)
tree9503088d3f4f680e11bcc0de95e14ebaaa8cfe9a /src/lib/gsm_constants.h
parent29eae4c8d199fe15cdfa6c871847151955c3724d (diff)
cleanup of unneeded test code, separation of longer parts of fch_search into two functions, addidion of 'synchronized' state and reading of sch in this state
Diffstat (limited to 'src/lib/gsm_constants.h')
-rw-r--r--src/lib/gsm_constants.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/gsm_constants.h b/src/lib/gsm_constants.h
index 9ba70cb..d08df17 100644
--- a/src/lib/gsm_constants.h
+++ b/src/lib/gsm_constants.h
@@ -6,7 +6,7 @@
//Burst timing
#define TAIL_BITS 3
-#define GUARD_BITS 8 //8.25
+#define GUARD_BITS 8.25
#define DATA_BITS 58 //size of 1 data block in normal burst
#define N_TRAIN_BITS 26
#define N_SYNC_BITS 64
@@ -16,7 +16,7 @@
#define TS_BITS (TAIL_BITS+USEFUL_BITS+TAIL_BITS+GUARD_BITS) //a full TS (156)
#define TS_PER_FRAME 8
-#define FRAME_BITS (TS_PER_FRAME * TS_BITS + 2) // +2 for extra 8*0.25 guard bits
+#define FRAME_BITS (TS_PER_FRAME * TS_BITS)
#define FCCH_POS TAIL_BITS
#define SYNC_POS 39
#define TRAIN_POS 58
@@ -25,6 +25,8 @@
#define FCCH_HITS_NEEDED (USEFUL_BITS - 4)
#define FCCH_MAX_MISSES 1
+#define CHAN_IMP_RESP_LENGTH 5
+
static const int SYNC_BITS[] = {
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,
@@ -32,6 +34,10 @@ static const int SYNC_BITS[] = {
0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1
};
+const unsigned FCCH_FRAMES[] = {0,10,20,30,40};
+const unsigned SCH_FRAMES[] = {1,11,21,31,41};
+
+
// Sync : .+...++.+..+++.++++++.++++++....++.+..+.+.+++.+.+...+..++++..+..
// Diff Encoded Sync: .++..+.+++.+..++.....++.....+...+.+++.+++++..+++++..++.+...+.++.
personal git repositories of Harald Welte. Your mileage may vary