aboutsummaryrefslogtreecommitdiffstats
path: root/src/sba.h
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-01-14 16:48:38 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2021-01-19 16:28:10 +0100
commit2182e627cda3ada77a203f9549260046278caf0e (patch)
treef2f60225f1d1a037354dd6f946229bc7268433f0 /src/sba.h
parent793583ea2173c94b2dc779ab565fcf629a1d52b3 (diff)
Unify BTS into a C usable structure
Previous work on BTS class started to get stuff out of the C++ struct into a C struct (BTS -> struct gprs_glcmac_bts) so that some parts of it were accessible from C code. Doing so, however, ended up being messy too, since all code needs to be switching from one object to another, which actually refer to the same logical component. Let's instead rejoin the structures and make sure the struct is accessible and usable from both C and C++ code by rewriting all methods to be C compatible and converting 3 allocated suboject as pointers. This way BTS can internally still use those C++ objects while providing a clean APi to both C and C++ code. Change-Id: I7d12c896c5ded659ca9d3bff4cf3a3fc857db9dd
Diffstat (limited to 'src/sba.h')
-rw-r--r--src/sba.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sba.h b/src/sba.h
index 27dae212..a6e3f829 100644
--- a/src/sba.h
+++ b/src/sba.h
@@ -26,7 +26,7 @@ extern "C" {
#include <osmocom/core/linuxlist.h>
}
-struct BTS;
+struct gprs_rlcmac_bts;
struct gprs_rlcmac_pdch;
/*
@@ -45,10 +45,10 @@ struct gprs_rlcmac_sba {
*
* TODO: Add a flush method..
*/
-class SBAController {
+struct SBAController {
friend class PollController;
public:
- SBAController(BTS &bts);
+ SBAController(struct gprs_rlcmac_bts &bts);
int alloc(uint8_t *_trx, uint8_t *_ts, uint32_t *_fn, uint8_t ta);
gprs_rlcmac_sba *find(uint8_t trx, uint8_t ts, uint32_t fn);
@@ -62,6 +62,6 @@ public:
void free_sba(gprs_rlcmac_sba *sba);
private:
- BTS &m_bts;
+ struct gprs_rlcmac_bts &m_bts;
llist_head m_sbas;
};