aboutsummaryrefslogtreecommitdiffstats
path: root/tests/edge
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@espeweb.net>2020-12-16 15:59:45 +0100
committerpespin <pespin@sysmocom.de>2021-01-05 10:34:25 +0000
commitda971ee5026479e869ed75d944404d398c548497 (patch)
tree30bf447c2d828264e51d09f5422ea05421c48d47 /tests/edge
parent86fad1ec4e246110b9d8ae66fd7bc30e1cedb5de (diff)
Convert GprsMS and helpers classes to C
As we integrate osmo-pcu more and more with libosmocore features, it becomes really hard to use them since libosmocore relies heavily on C specific compilation features, which are not available in old C++ compilers (such as designated initializers for complex types in FSMs). GprsMs is right now a quite simple object since initial design of osmo-pcu made it optional and most of the logic was placed and stored duplicated in TBF objects. However, that's changing as we introduce more features, with the GprsMS class getting more weight. Hence, let's move it now to be a C struct in order to be able to easily use libosmocore features there, such as FSMs. Some helper classes which GprsMs uses are also mostly move to C since they are mostly structs with methods, so there's no point in having duplicated APIs for C++ and C for such simple cases. For some more complex classes, like (ul_,dl_)tbf, C API bindings are added where needed so that GprsMs can use functionalitites from that class. Most of those APIs can be kept afterwards and drop the C++ ones since they provide no benefit in general. Change-Id: I0b50e3367aaad9dcada76da97b438e452c8b230c
Diffstat (limited to 'tests/edge')
-rw-r--r--tests/edge/EdgeTest.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/edge/EdgeTest.cpp b/tests/edge/EdgeTest.cpp
index 67ed2a73..8fa76dd5 100644
--- a/tests/edge/EdgeTest.cpp
+++ b/tests/edge/EdgeTest.cpp
@@ -619,7 +619,7 @@ static void test_rlc_unit_encoder()
write_offset = 0;
memset(data, 0, sizeof(data));
- OSMO_ASSERT(llc.chunk_size() == 1);
+ OSMO_ASSERT(llc_chunk_size(&llc) == 1);
count_payload = -1;
@@ -767,7 +767,7 @@ static void test_rlc_unit_encoder()
write_offset = 0;
memset(data, 0, sizeof(data));
- OSMO_ASSERT(llc.chunk_size() == 10);
+ OSMO_ASSERT(llc_chunk_size(&llc) == 10);
count_payload = -1;
ar = Encoding::rlc_data_to_dl_append(&rdbi, cs,
@@ -899,7 +899,7 @@ static void test_rlc_unit_encoder()
write_offset = 0;
memset(data, 0, sizeof(data));
- OSMO_ASSERT(llc.chunk_size() == 0);
+ OSMO_ASSERT(llc_chunk_size(&llc) == 0);
count_payload = -1;
ar = Encoding::rlc_data_to_dl_append(&rdbi, cs,
@@ -1167,7 +1167,6 @@ static void uplink_header_type_2_parsing_test(BTS *the_bts,
uint8_t ts_no, uint32_t tlli, uint32_t *fn, uint16_t qta,
uint8_t ms_class)
{
- struct pcu_l1_meas meas;
int tfi = 0;
uint8_t data[79] = {0};
struct gprs_rlc_ul_header_egprs_2 *egprs2 = NULL;