Holger Hans Peter Freyther
111614a994
ta: Create TimingAdvance class and make it belong to the BTS
...
This allows us to easily flush the state in case a PCU/BTS
connection is lost.
2013-10-30 21:24:10 +01:00
Holger Hans Peter Freyther
67ed34eedb
bts: Move struct gprs_rlcmac_bts and other structs into a bts.h
...
Begin to make the BTS a real C++ object with real responsibilities.
The biggest issue will be the pcu_vty.c that might not like C++
at all.
2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther
1b33361bab
bts: Remove the global state from the tbf
2013-10-30 21:20:45 +01:00
Holger Hans Peter Freyther
344ff48756
bts: Remove the global state gprs_rlcmac_trigger_downlink_assignment
...
Remove the global state from gprs_rlcmac_trigger_downlink_assignment
and walk up to the pcu_l1_if.cpp where I find the timeout handling
that should be part of the SBA and TBF functionality. In terms of
hierachies things start to be more clear.
There should be the BTS object. That holds the SBA and TBF Controllers
that can allocate TBFs and SBAs and will handle the timeout polling
for a BTS.
2013-10-30 21:20:44 +01:00
Holger Hans Peter Freyther
173a240a7e
bts: Remove global state and the usage of the gprs_rlcmac_bts
...
Global state makes mocking/writing tests more difficult. Continue
by removing direct usage of the bts and adding it as pointer to
the function calls (showing the true dependencies of the functions)
2013-10-30 21:20:44 +01:00
Holger Hans Peter Freyther
743bafa50c
alloc: Introduce a backpointer from the tbf to the trx and simplify code
...
Kill all the level of indirections where one needs to have the BTS
the TBF to find the TRX.
2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther
96efa70a9e
alloc: Call it trx_no and not trx as it is not trx object
2013-10-30 14:45:57 +01:00
Holger Hans Peter Freyther
1c344e2668
tbf: Prepare to make thing things private in the tbf, start with the state
...
There really shouldn't be too many callers of state. Instead the
tbf should dispatch depending on the internal state. For now
introduce state_is and state_is_not accessor functions so we can
start to see who is using the internal state.
2013-10-28 12:54:09 +04:00
Holger Hans Peter Freyther
7380babdba
tbf: Move the tbf_timer_cb into the tbf class
...
Introduce the first instance method for printing out diagonistic
about itself and create a jump function for it.
2013-10-28 12:53:49 +04:00
Holger Hans Peter Freyther
455613076a
tbf: Move many routines related to the tbf from gprs_rlcmac to tbf.c
2013-10-28 12:52:59 +04:00
Holger Hans Peter Freyther
4f6a4e5d6d
tbf: Add another variant of the free_all now by pdch
2013-10-28 12:52:33 +04:00
Holger Hans Peter Freyther
964ddb6aa0
tbf: Move the code to close all timeslots into the tbf class
...
Move the code out of the sysmocom_socket (as this is only required
to talk to our hardware) and into the TBF class that actually knows
what a TBF is.
2013-10-28 12:52:15 +04:00
Holger Hans Peter Freyther
8692128365
tbf: Move the alloc_ul_tbf into tbf.c and change signature
...
Add the bts parameter to the method list. This would be a static
method of the class (in case the TBF would be a class)
2013-10-18 15:17:43 +04:00
Holger Hans Peter Freyther
bb20b2c64c
tbf: Add more to do items for refactoring on the dl assignment
2013-10-18 15:17:27 +04:00
Holger Hans Peter Freyther
bcafdf8d90
tbf: Warn about copy and paste between different tbf alloc routines
...
These need to be re-factored to use a common allocation routine.
2013-10-18 15:17:13 +04:00
Holger Hans Peter Freyther
443c822f77
tbf: Move the creation of a new tbf for the downlink to a new method
...
Move the code that is dedicated to handle the assignment of a new
TFI/TBF for the downlink into a new method.
2013-10-18 15:16:56 +04:00
Holger Hans Peter Freyther
d868928888
tbf: Create an assign method for IMSI.
...
This will allow us to set flags (like IMSI) present and will
be of help when fixing the tbf lookup.
2013-10-18 15:16:42 +04:00
Holger Hans Peter Freyther
d1d114f5b7
tbf: Move code that sets the tbf's ms_class to a central place
2013-10-18 15:16:27 +04:00
Holger Hans Peter Freyther
31d0df92ac
tbf: Separate the easy path out of the receive path
...
* Create a look up routine for the TBF that will allow us to
easily find a TBF by IMSI...
* Separate the code that works on an existing TBF.
2013-10-18 15:16:11 +04:00
Holger Hans Peter Freyther
17c31ce173
tbf: Begin to add some structure to the tbf code
...
The TBF should use the IMSI to identify a block flow but all
handling is spread across the entire code. Start to clean this
up by moving relevant code into the tbf file. Afterwards one
can clean up and add more internal structure.
2013-10-18 15:15:49 +04:00