aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Sirsikar <Arvind.Sirsikar@radisys.com>2016-05-31 17:23:12 +0530
committerAravind Sirsikar <Arvind.Sirsikar@radisys.com>2016-05-31 17:23:12 +0530
commita36b5d7896da2b4f76ae30ba3b796b8b2689eda8 (patch)
treee095ab8da03c2e010f9358723a03ca8277d3766f
parent93ef548a43348d6a8c6c0bb301f2d60daeb7abc4 (diff)
parentcb846ecbbc1204ab6b20a5e16341568a3f2c0337 (diff)
Merge branch 'master' of git://git.osmocom.org/osmo-pcu into Integration
-rw-r--r--src/decoding.cpp3
-rw-r--r--src/decoding.h3
-rw-r--r--src/encoding.cpp31
3 files changed, 35 insertions, 2 deletions
diff --git a/src/decoding.cpp b/src/decoding.cpp
index 16564ab..45bb844 100644
--- a/src/decoding.cpp
+++ b/src/decoding.cpp
@@ -32,7 +32,7 @@ extern "C" {
#include <string.h>
#define LENGTH_TO_END 255
-/*
+/*!
* \returns num extensions fields (num frames == offset) on success,
* -errno otherwise.
*/
@@ -197,6 +197,7 @@ int Decoding::rlc_data_from_ul_data(
e = rdbi->e;
if (e) {
if (chunks_size > 0) {
+ /* Block without LI means it only contains data of one LLC PDU */
chunks[num_chunks].offset = offs;
chunks[num_chunks].length = LENGTH_TO_END;
chunks[num_chunks].is_complete = is_last_block;
diff --git a/src/decoding.h b/src/decoding.h
index ce83bd0..d1371d5 100644
--- a/src/decoding.h
+++ b/src/decoding.h
@@ -28,10 +28,11 @@ struct bitvec;
class Decoding {
public:
+ /* represents (parts) LLC PDUs within one RLC Data block */
struct RlcData {
uint8_t offset;
uint8_t length;
- bool is_complete;
+ bool is_complete; /* if this PDU ends in this block */
};
static int rlc_data_from_ul_data(
diff --git a/src/encoding.cpp b/src/encoding.cpp
index 67a6082..6855f12 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -897,6 +897,16 @@ unsigned int Encoding::rlc_copy_from_aligned_buffer(
return rdbi->data_len;
}
+/*!
+ * \brief (GPRS) put llc pdu into an rlc/mac block. fragment the llc pdu if needed
+ * \param rdbi rlc/mac block info
+ * \param llc llc pdu
+ * \param offset given offset within the rlc/mac block
+ * \param num_chunks count the chunks (llc pdu data) within rlc/mac
+ * \param data_block buffer holds rlc/mac data
+ * \param is_final if this is the last rlc/mac within a TBF
+ * \return the state of the rlc/mac like if there is more space for another chunk
+ */
static Encoding::AppendResult rlc_data_to_dl_append_gprs(
struct gprs_rlc_data_block_info *rdbi,
gprs_llc *llc, int *offset, int *num_chunks,
@@ -1018,6 +1028,16 @@ static Encoding::AppendResult rlc_data_to_dl_append_gprs(
return Encoding::AR_COMPLETED_BLOCK_FILLED;
}
+/*!
+ * \brief (EGPRS) put llc pdu into an rlc/mac block. fragment the llc pdu if needed
+ * \param rdbi rlc/mac block info
+ * \param llc llc pdu
+ * \param offset given offset within the rlc/mac block
+ * \param num_chunks count the chunks (llc pdu data) within rlc/mac
+ * \param data_block buffer holds rlc/mac data
+ * \param is_final if this is the last rlc/mac within a TBF
+ * \return the state of the rlc/mac like if there is more space for another chunk
+ */
static Encoding::AppendResult rlc_data_to_dl_append_egprs(
struct gprs_rlc_data_block_info *rdbi,
gprs_llc *llc, int *offset, int *num_chunks,
@@ -1160,6 +1180,17 @@ static Encoding::AppendResult rlc_data_to_dl_append_egprs(
return Encoding::AR_COMPLETED_BLOCK_FILLED;
}
+/*!
+ * \brief Encoding::rlc_data_to_dl_append
+ * \param rdbi rlc/mac block info
+ * \param cs the coding scheme to use
+ * \param llc llc pdu
+ * \param offset given offset within the rlc/mac block
+ * \param num_chunks count the chunks (llc pdu data) within rlc/mac
+ * \param data_block buffer holds rlc/mac data
+ * \param is_final if this is the last rlc/mac within a TBF
+ * \return the state of the rlc/mac like if there is more space for another chunk
+ */
Encoding::AppendResult Encoding::rlc_data_to_dl_append(
struct gprs_rlc_data_block_info *rdbi, GprsCodingScheme cs,
gprs_llc *llc, int *offset, int *num_chunks,