diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-24 17:05:48 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-11-26 20:57:24 +0100 |
commit | df6b4f52e05e699b9a96a920973bff6241b5a853 (patch) | |
tree | 433c1d5a236191f6ed4cb500054447ffae0712f6 /src/decoding.cpp | |
parent | 9eb8ace2608980f6c5e68610210fc6dd921b41ff (diff) |
tbf/rlc: Move the parsing of RBB to Decoding, move window marking out
Move the parsing of the bitbmap out of the TBF code into Decoding.
Move the updating of the V_B into the V_B class. Add some comments
about handling the mod_sns, mod_sns_half parameters by using template
code.
Diffstat (limited to 'src/decoding.cpp')
-rw-r--r-- | src/decoding.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/decoding.cpp b/src/decoding.cpp index e7ec99ab..0f70872a 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -83,3 +83,17 @@ uint8_t Decoding::get_ms_class_by_capability(MS_Radio_Access_capability_t *cap) return 0; } +/** + * show_rbb needs to be an array with 65 elements + */ +void Decoding::extract_rbb(const uint8_t *rbb, char *show_rbb) +{ + for (int i = 63; i >= 0; i--) { + uint8_t bit; + + bit = (rbb[i >> 3] >> (7 - (i&7))) & 1; + show_rbb[i] = bit ? '1' : 'o'; + } + + show_rbb[64] = '\0'; +} |