On 19 Apr 2016, at 16:06, msuraev@sysmocom.de wrote:
From: Max msuraev@sysmocom.de
Add convenience function to append range1024 encoded data (see 3GPP TS 44.018 Annex J) to a given bitvec.
include/osmocom/core/bitvec.h | 3 +++ src/bitvec.c | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+)
diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index c3c1153..704573c 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -44,6 +44,8 @@ #include <talloc.h> #include <stdbool.h>
+#include <osmocom/gsm/protocol/gsm_04_08.h>
the code itself looks okay (adding lo+hi seems to result in 8 bits. But I think the place is wrong. The bit vector should not know about GSM (different layers, different library). Sure you are only using a data structure but let's keep our boundaries right.
The closest we have as an example is msgb + tlv. One in GSM and one in Core. Can you add a bitvec_gsm.h or similar.
holger