aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoding.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-05 13:16:24 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:34 +0100
commitf2f24b09593bb91e84538e7f6c9e51dd642bf5e0 (patch)
tree13226498a42c6a4a1eefe2840017bc74508a33f9 /src/decoding.cpp
parent192bf33ffb14de601451343cae53838d8e7feeb7 (diff)
edge: Add a bitvec based Decoding::extract_rbb function
This shall replace the old one after the transition to bitvec based RBBs. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/decoding.cpp')
-rw-r--r--src/decoding.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/decoding.cpp b/src/decoding.cpp
index 4c79c83b..f4b539b1 100644
--- a/src/decoding.cpp
+++ b/src/decoding.cpp
@@ -329,6 +329,18 @@ void Decoding::extract_rbb(const uint8_t *rbb, char *show_rbb)
show_rbb[64] = '\0';
}
+void Decoding::extract_rbb(const struct bitvec *rbb, char *show_rbb)
+{
+ unsigned int i;
+ for (i = 0; i < rbb->cur_bit; i++) {
+ uint8_t bit;
+ bit = bitvec_get_bit_pos(rbb, i);
+ show_rbb[i] = bit == 1 ? 'R' : 'I';
+ }
+
+ show_rbb[i] = '\0';
+}
+
int Decoding::rlc_parse_ul_data_header(struct gprs_rlc_data_info *rlc,
const uint8_t *data, GprsCodingScheme cs)
{