aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2013-10-30ta: Create TimingAdvance class and make it belong to the BTSHolger Hans Peter Freyther9-30/+77
This allows us to easily flush the state in case a PCU/BTS connection is lost.
2013-10-30ta: Move timing advance related code into the ta.cpp fileHolger Hans Peter Freyther3-103/+135
2013-10-30encoding: Move the functions into the encoding classHolger Hans Peter Freyther7-48/+88
Add some TODO to this class. E.g. they could all work on the bitvec and the parameter handling could better.
2013-10-30encoding: Move encoding routines into a separate fileHolger Hans Peter Freyther4-432/+460
2013-10-30pdch: Only say we have paged when this has actually been doneHolger Hans Peter Freyther1-1/+1
2013-10-30bts/pdch: Move the adding of paging to the BTS/PDCH objectsHolger Hans Peter Freyther5-88/+93
Only the gprs_rlcmac_pdch will manipulate the paging list now. There can be various more refactorings of the code but they can be done later. E.g. on memory allocation failure we can continue instead of leaving the code, we should also set any_tbf only after things have been paged.
2013-10-30pdch: Move paging dequeue into the PDCH objectHolger Hans Peter Freyther5-103/+104
Rely on packet_paging_request returning NULL in case the queue is empty. We should move the write_packet_paging_request into a separate file/object as well.
2013-10-30pdch: Move enable/disable into the PDCH codeHolger Hans Peter Freyther9-45/+81
When a PDCH is disabled all resources should be freed. This is currently not possible as the PDCH does not know where it belongs to. On top of that the list (and other resources) should be properly initialized on construction so that disable() is idempotent and does not check if it was disabled. During the re-factoring I noticed that during a sysmobts re-start some resources are not freed. I left a warning in the code to resolve this issue later.
2013-10-30Add a TODO file with high-level tasksHolger Hans Peter Freyther1-0/+7
2013-10-30bts: Introduce a PollController that has the responsibility to pollHolger Hans Peter Freyther6-33/+124
For each frame indication received by the BTS the poll controller is asked to expire timedout entries.
2013-10-30bts: Move the frame_number into the BTS sructureHolger Hans Peter Freyther5-16/+30
The current_frame is an attribute of the BTS. Move it from the pcu_l1_if.cpp into the BTS. As the next step we can trigger actions depending on the change of the frame.
2013-10-30bts: Introduce a singleton for the BTS and use it in the codeHolger Hans Peter Freyther10-49/+116
Compared to the previous code there will be a branch to get the global pointer so the code will be slightly slower than the previous version but it allows us to start creating objects but still use the code from C. It is best approach I have found so far. One downside of C++ is that by default talloc will not be used (unless we override the new operator to use talloc. Right now we need to memset the C data structure by hand. The benefit of enforcing a better structure should is more important though.
2013-10-30bts: Move struct gprs_rlcmac_bts and other structs into a bts.hHolger Hans Peter Freyther14-50/+97
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-30bts: Remove the global state from the tbfHolger Hans Peter Freyther3-5/+5
2013-10-30bts: Remove global state from gprs_rlcmac_rcv_rts_blockHolger Hans Peter Freyther3-4/+5
2013-10-30bts: Remove global state from gprs_rlcmac_add_pagingHolger Hans Peter Freyther3-4/+4
2013-10-30bts: Remove global state from write_immediate_assignmentHolger Hans Peter Freyther3-6/+9
2013-10-30bts: Remove global state from write_packet_uplink_assignmentHolger Hans Peter Freyther3-4/+7
2013-10-30bts: Remove global state from gprs_rlcmac_send_packet_uplink_assignmentHolger Hans Peter Freyther3-2/+3
This was the last method of gprs_rlcmac_data.cpp to access the gprs_rlcmac_bts variable.
2013-10-30bts: Remove global state frm gprs_rlcmac_rcv_control_blockHolger Hans Peter Freyther3-4/+5
2013-10-30bts: Remove global state from gprs_rlcmac_send_data_block_acknowledgedHolger Hans Peter Freyther3-4/+6
2013-10-30bts: Remove global state from gprs_rlcmac_send_packet_downlink_assignmentHolger Hans Peter Freyther3-4/+3
2013-10-30bts: Remove global state from gprs_rlcmac_rcv_rachHolger Hans Peter Freyther3-4/+5
2013-10-30bts: Remove global state from gprs_rlcmac_rcv_data_block_acknowledgedHolger Hans Peter Freyther4-7/+10
2013-10-30bts: Remove the global state from write_packet_uplink_ackHolger Hans Peter Freyther4-15/+12
Similiar to the previous patches
2013-10-30bts: Remove the global state gprs_rlcmac_trigger_downlink_assignmentHolger Hans Peter Freyther4-19/+22
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-30bts: Remove global state and the usage of the gprs_rlcmac_btsHolger Hans Peter Freyther4-7/+6
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-30sched: Make sched_poll static and add a warning about fairnessHolger Hans Peter Freyther1-1/+2
2013-10-30alloc: Add very basic test case for the alloc_a algorithmHolger Hans Peter Freyther6-2/+146
2013-10-30alloc: Move usf into the scope it is actually usedHolger Hans Peter Freyther1-1/+2
2013-10-30alloc: Factor out the routine to find an enabled PDCHHolger Hans Peter Freyther1-9/+19
2013-10-30alloc: Remove the unimplemented/unfinished time constraint codeHolger Hans Peter Freyther1-47/+11
The algorithm is already complex enough. No reason to further introduce the complexity with the branches it has.
2013-10-30alloc: Remove code duplication for downlink assignmentHolger Hans Peter Freyther1-6/+12
There was no difference but there is no point in poking in the internals of the tbf, pdch and trx from various places. Information hiding has a real purpose, e.g. compare with reading "the mythical man month".
2013-10-30alloc: Introduce a backpointer from the tbf to the trx and simplify codeHolger Hans Peter Freyther3-12/+14
Kill all the level of indirections where one needs to have the BTS the TBF to find the TRX.
2013-10-30alloc: Call it trx_no and not trx as it is not trx objectHolger Hans Peter Freyther6-29/+29
2013-10-30alloc: Move the two timeslot alloc algorithms to a dedicated fileHolger Hans Peter Freyther3-561/+591
2013-10-30alloc: Move the "assignment" of the slot into a common functionHolger Hans Peter Freyther1-11/+16
Vladimir Rolbin pointed out that in case of the alloc_algorithm_a the usf has not been assigned. For now move all the assignment into a method and call it from the A and B algorithm.
2013-10-28tbf: Prepare to make thing things private in the tbf, start with the stateHolger Hans Peter Freyther4-22/+44
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-28tbf: Move the tbf_timer_cb into the tbf classHolger Hans Peter Freyther5-223/+231
Introduce the first instance method for printing out diagonistic about itself and create a jump function for it.
2013-10-28tbf: Remove dead code that called tbf_freeHolger Hans Peter Freyther1-48/+0
2013-10-28tbf: Move many routines related to the tbf from gprs_rlcmac to tbf.cHolger Hans Peter Freyther2-153/+153
2013-10-28tbf: Add another variant of the free_all now by pdchHolger Hans Peter Freyther3-10/+17
2013-10-28tbf: Move the code to close all timeslots into the tbf classHolger Hans Peter Freyther3-10/+20
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-28tbf: Move header definition from gprs_rlcmac to the tbfHolger Hans Peter Freyther3-94/+97
2013-10-28tbf: Move the struct to the tbf.h header fileHolger Hans Peter Freyther6-98/+103
This is the begin of a long march of turning tbf into a C++ class and properly hiding the secrets inside this implementation instead of having it spread across various different files.
2013-10-18tbf: Move the alloc_ul_tbf into tbf.c and change signatureHolger Hans Peter Freyther3-38/+43
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-18tbf: Add more to do items for refactoring on the dl assignmentHolger Hans Peter Freyther1-0/+2
2013-10-18tbf: Warn about copy and paste between different tbf alloc routinesHolger Hans Peter Freyther2-0/+3
These need to be re-factored to use a common allocation routine.
2013-10-18tbf: Move the creation of a new tbf for the downlink to a new methodHolger Hans Peter Freyther1-70/+80
Move the code that is dedicated to handle the assignment of a new TFI/TBF for the downlink into a new method.
2013-10-18tbf: Create an assign method for IMSI.Holger Hans Peter Freyther1-2/+8
This will allow us to set flags (like IMSI) present and will be of help when fixing the tbf lookup.