aboutsummaryrefslogtreecommitdiffstats
path: root/src/encoding.cpp
AgeCommit message (Collapse)AuthorFilesLines
2015-06-08tbf: Move the current CS field to GprsMsJacob Erlbeck1-2/+2
Currently the current CS value is stored in the cs field of gprs_rlcmac_tbf and initialised when it is used the first time. This commit adds separate fields for UL and DL CS values to the GprsMs class and provides corresponding getter methods for GprsMs and gprs_rlcmac_tbf. Ticket: #1739 Sponsored-by: On-Waves ehf
2015-05-28tbf: Store the timing advance (TA) value in the GprsMs objectJacob Erlbeck1-2/+2
The TA value rather relates to an MS and not to a single TBF. So all TBFs share the same TA value. Currently the TA value is stored per TBF and eventually copied from an old TBF to a new one. It is in general only passed with an RACH request when the TLLI and thus the MS is not yet known. This commit adds a TA member to the GprsMs class and uses that one when the TBF is associated to an MS object. Since the TBF is not always associated with an MS object (after RACH or when it has been replaced by another TBF), the TA value is still stored in each TBF and that value is used as long as no MS object is being associated. Sponsored-by: On-Waves ehf
2014-08-07tbf, ...: Make the fields in the dl/ul struct member variablesDaniel Willmann1-3/+3
There is no need for the union/struct anymore. Make the variable members of the UL/DL class. As a result gprs_rlc_dl_window gets a reset() method because memset(&dir.dl, 0, sizeof(dir.dl)) doesn't work anymore in reuse_tbf(). Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-08-07encoding: Change function signature to use UL TBFs where it makes senseDaniel Willmann1-2/+2
encode_rbb() and write_packet_uplink_assignment are only called with UL TBFs so change the function signature to reflect that. Ticket: SYS#389 Sponsored by: On-Waves ehf
2014-05-30tbf/bts, encoding: Keep track of WAIT_RELEASE state for DL assignmentDaniel Willmann1-1/+1
The current code does not properly distinguish between DL assignments to reuse a tbf (after it was put in state WAIT_RELEASE) and DL assignments for an active tbf to change the allocation of the PDCH timeslots. This patch introduces a new variable was_releasing which remembers if trigger_dl_ass() was called with a tbf in state WAIT_RELEASE. In that case we have to set the CONTROL_ACK field in the download assignment. This should allow us to send DL assignments to change PDCH TS allocation of a tbf before we enter FLOW state.
2014-01-15rlc/tbf: Move v_n into gprs_rlc_ul_window and adapt the testsDaniel Willmann1-1/+1
v_n is part of the UL window handling so move it inside the ul_window
2014-01-15tbf: Kill the tsc member as it duplicates dataHolger Hans Peter Freyther1-2/+2
We can just use first_ts and the trx/pdch to extract this information. Avoid duplication of data.
2013-12-12encoding: Factor out encode_rbb to help testingDaniel Willmann1-13/+22
2013-12-12encoding: Use ul_window ssn()/update_rbb() methods when encoding ul ACKDaniel Willmann1-20/+18
Use the ssn() and update_rbb() methods of gprs_rlc_ul_window when encoding the ACK/NACK packet in write_packet_uplink_ack()
2013-12-12encoding: Change wording to match that of 3GPP TS 04.60Daniel Willmann1-1/+1
The spec (in ch. 9.1.8.1) speaks of RECEIVED or INVALID in the RLC receiver, so change the wording in the log message to match.
2013-12-04rlc: Make the RLC types only operate on the BSNHolger Hans Peter Freyther1-3/+3
The code has an internal optimization to only use window_size space. This means that the caller needed to know that only half of the size was used. Change the API to work on the BSN and do the mapping internally. The compiler should have plenty of opportunity to propagate the constant(s) but this has not been verified.
2013-11-26rlc: Test the basic of the gprs_rlc_v_n code for remembering the stateHolger Hans Peter Freyther1-2/+0
2013-11-26tbf/rlc: Move the v_n handling into a dedicated objectHolger Hans Peter Freyther1-1/+1
2013-11-26tbf/rlc: Big change and move the window handling out to the rlcHolger Hans Peter Freyther1-2/+2
The send and receive window is now managed by an external object. There are some issues that can only be solved with C++11 but it is progres and removes some of the spaghetti code. For GPRS the sns and ws is hardcoded. Move that into the window code.
2013-11-23tbf: Make the ws and sns number "private" (they should also be const)Holger Hans Peter Freyther1-1/+1
2013-10-30tbf: Make tfi private and update the codeHolger Hans Peter Freyther1-5/+5
All logging code that used tbf->tfi is now using tbf_name to print the the TBF. External code is now using tfi() which is inlined and should result in the same code being generated as before (+debug code that can be stripped).
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: Go through the trx to get the ARFCNHolger Hans Peter Freyther1-2/+2
2013-10-30misc: Change the logging for the tbf and what to logHolger Hans Peter Freyther1-1/+1
TLLIs got printed as TBF. Fix that but also rename things to TFI. The TFI is not required to be unique per BTS but it is the indicator we use right now.
2013-10-30bts/tbf: Move the lists into the BTS and do the look-up from the BTSHolger Hans Peter Freyther1-0/+1
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-30encoding: Move the functions into the encoding classHolger Hans Peter Freyther1-7/+8
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-0/+456