aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac.cpp
AgeCommit message (Collapse)AuthorFilesLines
2013-11-26debug_diagram: Remove the special debug_diagram compilation modeHolger Hans Peter Freyther1-84/+0
This approach is somehow flawed. We need/want to debug problems on systems with real traffic and re-compiling it with debug_diagram is not an option. All internal logging needs to be expressive enough so we can understand what is going on (e.g. create a script to post-process the output).
2013-11-06tbf: Move the tx part into the tbf as it accesses internal dataHolger Hans Peter Freyther1-25/+0
2013-10-30tbf: Make the tlli "private" and update the updating codeHolger Hans Peter Freyther1-1/+1
Now all updates to the tlli/tlli_valid are in one place. If we implement the policy to update the matching/linked TBF we can now to do it in a single place. Add a todo item for that as I am waiting for feedback from the mailinglist.
2013-10-30tbf: Create tbf_name and use it in log statementsHolger Hans Peter Freyther1-1/+1
This is like gsm_lchan_name and should be used in log statements. This way we can easily change the information that is printed and we know how to search things. The other part is that direct use of tfi/tlli is removed which will allow us to make them private and at the same time start to resolve the "tlli" updated in many places. Not old log statements are changed yet. This will done whenever a bad log statement is seen on the console...
2013-10-30tbf/bts: Move the tfi_find_free into the btsHolger Hans Peter Freyther1-55/+0
2013-10-30pdch: Move the dispatch of gprs_rlcmac_rcv_block into the pdchHolger Hans Peter Freyther1-33/+0
2013-10-30data: Move gprs_rlcmac_cs to the place it is used and make staticHolger Hans Peter Freyther1-9/+0
2013-10-30bts/tbf: Move the lists into the BTS and do the look-up from the BTSHolger Hans Peter Freyther1-5/+3
The list belongs to the BTS. This makes cleaning this up more easy and establishes a hierachy of resources that start from the BTS. The debug_diagram code is now broken.
2013-10-30sba: Move the sba code to a dedicated fileHolger Hans Peter Freyther1-62/+0
Move the code around and then turn it into an object...
2013-10-30ta: Move timing advance related code into the ta.cpp fileHolger Hans Peter Freyther1-102/+0
2013-10-30encoding: Move the functions into the encoding classHolger Hans Peter Freyther1-1/+2
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 Freyther1-431/+0
2013-10-30bts/pdch: Move the adding of paging to the BTS/PDCH objectsHolger Hans Peter Freyther1-85/+0
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 Freyther1-94/+0
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 Freyther1-2/+2
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-30bts: Move struct gprs_rlcmac_bts and other structs into a bts.hHolger Hans Peter Freyther1-0/+1
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 global state from gprs_rlcmac_add_pagingHolger Hans Peter Freyther1-2/+2
2013-10-30bts: Remove global state from write_immediate_assignmentHolger Hans Peter Freyther1-2/+3
2013-10-30bts: Remove global state from write_packet_uplink_assignmentHolger Hans Peter Freyther1-2/+3
2013-10-30bts: Remove global state frm gprs_rlcmac_rcv_control_blockHolger Hans Peter Freyther1-1/+1
2013-10-30bts: Remove global state from gprs_rlcmac_rcv_data_block_acknowledgedHolger Hans Peter Freyther1-2/+3
2013-10-30bts: Remove the global state from write_packet_uplink_ackHolger Hans Peter Freyther1-2/+2
Similiar to the previous patches
2013-10-30bts: Remove global state and the usage of the gprs_rlcmac_btsHolger Hans Peter Freyther1-2/+2
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-30alloc: Call it trx_no and not trx as it is not trx objectHolger Hans Peter Freyther1-4/+4
2013-10-30alloc: Move the two timeslot alloc algorithms to a dedicated fileHolger Hans Peter Freyther1-561/+0
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: Move the tbf_timer_cb into the tbf classHolger Hans Peter Freyther1-150/+0
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 Freyther1-153/+0
2013-10-28tbf: Move the struct to the tbf.h header fileHolger Hans Peter Freyther1-0/+1
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-17sba: Fix memory leak when all PDCHs are disabledHolger Hans Peter Freyther1-0/+1
2013-10-16misc: Print the payload that is not knownHolger Hans Peter Freyther1-1/+1
Print the payload type that is not handled as this allows one to look it up in the specification.
2013-10-16rlc: Add missing break after GPRS_RLCMAC_CONTROL_BLOCK_OPTHolger Hans Peter Freyther1-0/+1
Do not claim that the payload is not known. Add the missing break. Do not print: <0002> gprs_rlcmac.cpp:1174 GPRS_RLCMAC_CONTROL_BLOCK_OPT block payload is not supported. <0002> gprs_rlcmac.cpp:1176 Unknown RLCMAC block payload.
2013-10-16misc: Fix some typos sed -i s,ressources,resources,gHolger Hans Peter Freyther1-1/+1
2013-10-16misc: Fix format and typos in the codeHolger Hans Peter Freyther1-2/+2
2013-10-02tbf: Make multislot lookup tables static/constHolger Hans Peter Freyther1-3/+3
2013-10-02tfi: The tfi_alloc doesn't allocate anything, rename the functionHolger Hans Peter Freyther1-1/+2
Call things by what they do and this function doesn't allocate anything but it is searching for the first unallocated tbf index.
2013-09-04rlcmac: Reduce the depedency on the global gprs_rlcmac_bts variableHolger Hans Peter Freyther1-14/+13
For mocking/unit-testing/emulation (and a dual trx-systems) having global state is quite bad. Cut back on the usage of the global struct gprs_rlcmac_bts. It also makes the complexity of certain routines more clear.
2013-07-30misc: Move the struct bssgp_bvc_ctx into the struct osmo_pcuHolger Hans Peter Freyther1-0/+1
2013-05-13Added timing advance support for up and downlink TBFsAndreas Eversberg1-0/+104
The timing advance of any TBF is stored when it ends. Whenever a new TBF with the same TLLI is created (downlink TBF), the stored TA is recalled. This algorithm assumes that the mobile does not move too fast during transfer. Also the mobile must start a connection in order to get correct initial timing advance. This algorithm does not implement the timing advance procedure as defined in TS 04.60. To implement the standard timing advance procedure, the BTS must decode RACH on certain bursts, the mobile is expected to send them. This requires much more complexity to a transceiver like USRP/UmTRX or Calypso BTS. The algorithm was tested at TA >= 8 and works quite well.
2013-03-17Introduce new file for various measurementsAndreas Eversberg1-1/+7
The measurements include: - DL bandwidth usage - DL packet loss rate - DL measurements by mobile - UL measurements by BTS In order to receive DL measurements from mobile, it must be enabled via system information message at BSC.
2013-03-17Add RSSI of data blocks to PCU interface0.2.00.2Andreas Eversberg1-2/+2
This bumps the PCU API version to 5 and requires osmo-bts >= 0.2.0.
2013-01-15Various fixes for multi slot allocation algotihmAndreas Eversberg1-19/+44
2013-01-15Get rid of allocating first timeslot at tfi_allocAndreas Eversberg1-18/+20
This simpliefies the allocation process. tfi_alloc is responsible to allocate a TFI, not a time slot. The first time slot available depends on multislot class and on other ongoing TBF (concurrent TBFs), so it is part of the allocation algorithm to select it.
2012-12-18Rework on multislot allocation algorithmAndreas Eversberg1-27/+63
The slots are choosen in a way that later selection of slots for concurrent TBFs will have the same downlink/uplink control channel (PACCH). This is required for polling acknowledge of new TBF assignment on PACCH. The MS will always have the same PACCH uplink slot while beeing in packet transfer mode.
2012-12-18Added paging PS support by Ivan KluchnikovAndreas Eversberg1-0/+50
Original code: c7e7f6868b6f24346424dee904f4e76d3f216ff4 (The code was committed earlier, but got lost somehow.) I added IMSI, so the paging request is sent in correct paging group. Also I excluded rest octets from pseudo length. It is tested and it work.
2012-12-18Fix: Don't use TIMING_ADVANCE_INDEX in assignment messages, if not usedAndreas Eversberg1-10/+30
Some MS will leave packet transfer mode, if TAI is given, but no timing advance control messages are sent on PTCCH. This could results in permanent loss of larger packets.
2012-12-18Adding flow chart diagram of ongoing TBFs and their eventsAndreas Eversberg1-0/+114
It is quite essential. It shows how TBFs are related and helps to estimate states and timers (timeouts) of the MS. In order to use it, it must be defined by a switch at gprs_rlcmac.h.
2012-12-18Fix: Free CS paging messagesAndreas Eversberg1-3/+8
2012-10-03Allow setting of seperate coding schemes for uplink and downlinkAndreas Eversberg1-3/+3