aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_coding_scheme.cpp
AgeCommit message (Collapse)AuthorFilesLines
2019-04-08Update MCS selection for retransmissionMax1-42/+0
In 3GPP TS 44.060 the selection of MCS for retransmissions is defined as separate tables (8.1.1.1 and 8.1.1.2) depending on the value of resegmentation bit (which is opposite to the way EGPRS_ARQ are defined in the source code). Let's follow the same idea and explicitly check for resegmentation bit value and use separate tables. This also makes it easier to add proper support for special cases (MCS-6-9 and MCS-5-7) and padding in future independently for different ARQ types. The code is also moved to c to avoid unnecessary conversions to and from cpp class. Change-Id: Ia73baeefee7a58834f0fc50e3b8bf8d5e3eb7815
2019-03-27MCS: add Channel Coding Command encoderMax1-4/+1
Add function to encode MCS value as proper EDGE or GPRS Channel Coding value according to 3GPP TS 44.060 and corresponding helpers. Use it for everything except IA Rest Octet encoding which is done in a follow-up patches to make sure that we distinguish between encoding-related changes to test output and unrelated changes. Change-Id: I127fb29f5aaf77a7f6c4c565dfeb3b711af9845d
2019-03-26MCS: add mcs_is_*() helpersMax1-4/+4
In preparation for Channel Coding Command encoder in follow-up patches let's add necessary helpers. Those are similar to previously used helpers from GprsCodingScheme class but without CamelCase and with less typo chances between Gprs and Egprs cases. Change-Id: I6699cbc8d7ae766fa4d2b3d37e5f9ff1cf158b7e
2019-03-24MCS: move Mode enum outside of class definitionMax1-12/+2
Move Mode (EDGE/GPRS) definition and related functions outside of GprsCodingScheme class. This allows us to use standard libosmocore value_string functions. Change-Id: I3baaac7f1ca3f5b88917a23c1679d63847455f47
2019-03-19MCS: use value_string for conversionMax1-20/+14
Change-Id: I212ebb892ab162821633974d5a6c7e315d308370
2019-03-19MCS: move HeaderType enum outside of class definitionMax1-52/+16
Move functions which compute number of blocks or bits depending on header type and corresponding enum outside of GprsCodingScheme class. This will allows us to use standard libosmocore value_sting functions in upcoming patches for IA Rest Octet encoding/decoding. Change-Id: Id0873f85e1f16a72e17e7fbc4ad76b194917067f
2019-03-13MCS: remove unused functionMax1-5/+0
Change-Id: I32ab5ac36a0db90f2bea670b7684784b83a90b6b
2019-03-12Make get_retx_mcs() into regular functionMax1-1/+14
Moving from header-defined inline function allows us to hide egprs_mcs_retx_tbl definition and simplify further changes. Change-Id: I95258d1558a3b918ae83f1a69e7c3de2b97e5627
2019-03-12MCS: move Coding Scheme enum outside of class definitionMax1-6/+6
Move generic MCS enum to C header file to simplify further modifications to GprsCodingScheme class in follow-up patches. This also allows us to use standard libosmocore value_sting functions in upcoming patches for IA Rest Octet encoding/decoding. Related: OS#3014 Change-Id: I993b49d9a82b8c7ad677d52d11003794aeabe117
2019-02-26MCS: internalize 'family' parameterMax1-22/+24
There's no need to expose it in header file as it's only used internally for consistency checks. Change-Id: Ic705615cd2a8ca077efef9ea62a2a676f70b4aed
2018-01-04cosmetic: clarify coding scheme and puncturingMax1-22/+22
* use appropriate types for coding scheme parameters * add comment regarding possible number of RLCMAC blocks The code in create_dl_acked_block() has underlying assumption that rlc.num_data_blocks can never be more than 2, which is true and is enforced by appropriate asserts but is not obvious when looking at the function code alone. It's equally hard for Coverity which leads to false positives in scan. Lets' make this assumption explicit by putting it into for(;;) condition alongside with corresponding comment. Fixes: CID143070 Change-Id: If599a6c8a6ef56d847604fcf41bb71decccd8a78
2016-07-12Add data structure for ARQ-II in EGPRS DLAravind Sirsikar1-0/+32
Modify the existing data structure to support ARQ-II for Retx in EGPRS DL. This will also hadle compilation issue related to renaming the variable. Change-Id: I734b1024bb32f2daa43af4adf59f4a17f2294afe
2016-02-08cs: Add GprsCodingScheme::optionalPaddingBitsJacob Erlbeck1-14/+20
Return the amount of optional padding bits, which is 6*8 for MCS-3 and MCS-6 and 0 for all other coding schemes. The padding is needed the encode 68 byte data blocks (MCS-8) with these schemes. See TS 44.060, 9.3.2.1 and Annex J for details. Sponsored-by: On-Waves ehf
2016-02-08cs: Add family related methodsJacob Erlbeck1-16/+62
Add family handling and the related methods family, isFamilyCompatible, isCombinable, decToSingleBlock to GprsCodingScheme. Sponsored-by: On-Waves ehf
2016-02-05edge: Add numDataHeaderBitsUL/DL and numDataBlockHeaderBits methodsJacob Erlbeck1-18/+48
These methods are added to GprsCodingScheme to avoid related switch statements in the RLC block encoder for EGPRS. Sponsored-by: On-Waves ehf
2016-02-05edge: Fix RLC message sizeJacob Erlbeck1-2/+18
Currently the RLC message length that is obtained from the DSP is reduced by 1 if the last byte of the buffer includes spare bits. While this worked well with GPRS, these bits are being used to encode RLC blocks in EGPRS mode. Thus this last byte must not be chopped off. The functionality of the code is not affected by this, since the modified length value is not used. This commit adds GprsCodingScheme::usedSizeDL/UL to return the number of bytes needed to encode the message block. If there are single bits at the end that are to be used (EGPRS), the functions return the number of full bytes plus 1 (which is the buffer size reported by the DSP and returned by sizeUL/sizeDL). The commit also removes the len parameter from rcv_data_block_acknowledged. Sponsored-by: On-Waves ehf
2016-02-01edge: Show current mode in VTYJacob Erlbeck1-0/+10
Add the current mode to the output of the 'show ms imsi' and 'show ms tlli' commands. Sponsored-by: On-Waves ehf
2016-02-01edge: Add methods and operators to GprsCodingSchemeJacob Erlbeck1-0/+56
Add a few new operators and methods to support the use of GprsCodingScheme instead of the plain integer currently used. Sponsored-by: On-Waves ehf
2015-12-15edge: Add information about data blocks to GprsCodingSchemeJacob Erlbeck1-18/+30
This commit adds the methods maxDataBlockBytes and numDataBlocks which provide information about the data areas within RLC messages. In these areas, the extension bytes, TLLI, and the LLC data are stored. Sponsored-by: On-Waves ehf
2015-12-15edge: Add header type property to GprsCodingSchemeJacob Erlbeck1-16/+22
The header type depends on the coding scheme, for GPRS there is a single data header type per direction, for EGPRS there are 3 per direction. In addition, control block header types are used with CS-1 only, so there is one of the per direction altogether for GRPS and EGPRS. This commit adds the header type enum and two methods headerTypeData and headerTypeControl. Sponsored-by: On-Waves ehf
2015-12-15edge: Add GprsCodingScheme classJacob Erlbeck1-0/+104
Currently the coding scheme is checked and compared at different places which makes in cumbersome to extend it for EGPRS. This class encapsules the coding scheme and provides required meta information like sizes as well as helper methods. Sponsored-by: On-Waves ehf