diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-01-14 16:48:38 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-01-19 16:28:10 +0100 |
commit | 2182e627cda3ada77a203f9549260046278caf0e (patch) | |
tree | f2f60225f1d1a037354dd6f946229bc7268433f0 /src/gprs_ms.h | |
parent | 793583ea2173c94b2dc779ab565fcf629a1d52b3 (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/gprs_ms.h')
-rw-r--r-- | src/gprs_ms.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 6391f726..12809f10 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -49,7 +49,7 @@ enum ms_counter_id { MS_CTR_DL_CTRL_MSG_SCHED, }; -struct BTS; +struct gprs_rlcmac_bts; struct gprs_rlcmac_trx; struct GprsMs; @@ -63,7 +63,7 @@ struct GprsMs { struct gpr_ms_callback cb; bool app_info_pending; - struct BTS *bts; + struct gprs_rlcmac_bts *bts; struct gprs_rlcmac_ul_tbf *ul_tbf; struct gprs_rlcmac_dl_tbf *dl_tbf; struct llist_head old_tbfs; /* list of gprs_rlcmac_tbf */ @@ -102,7 +102,7 @@ struct GprsMs { struct rate_ctr_group *ctrs; }; -struct GprsMs *ms_alloc(struct BTS *bts, uint32_t tlli); +struct GprsMs *ms_alloc(struct gprs_rlcmac_bts *bts, uint32_t tlli); int ms_first_common_ts(const struct GprsMs *ms); void ms_set_reserved_slots(struct GprsMs *ms, struct gprs_rlcmac_trx *trx, |