aboutsummaryrefslogtreecommitdiffstats
path: root/tests/alloc/MslotTest.cpp
AgeCommit message (Collapse)AuthorFilesLines
2023-05-03pcu_l1_if_phy: fix API function namesPhilipp Maier1-2/+2
The functions l1if_open_pdch and l1if_close_pdch have a misleading naming since what they actually do is opening and closing the TRX since they return and accept a context (obj) that is valid for a whole TRX. This also explains why the other functions accept a timeslot as parameter in addition to the context. Let's rename those functions so that it is clear what they do. Related: OS#6022 Change-Id: I395a60b2fba39bac4facec78989bac20f0cef0d3
2023-02-27pcu_l1_if_phy: add new PHY API function to disconnect PDCHPhilipp Maier1-0/+1
There is a function l1if_connect_pdch, but no complementary function like we have it with l1if_open_pdch and l1if_close_pdch. The reason for this is that the PHY implementations that rely on a femtocell DSP do not need to disconnect the pdch explcitly. However, the planned support for the E1 based Ercisson RBS CCU will require an explicit disconnect. So lets add a function call for this. Change-Id: Ied88f3289bda87c48f5f9255c4591470633cc805 Related: OS#5198
2021-12-14treewide: remove FSF address2021q4Oliver Smith1-4/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I4a49dbeeec89b22624c968152118aecf8886dac6
2021-02-19tests: Replace deprecated API log_set_print_filenamePau Espin Pedrol1-1/+1
Change-Id: Idcc4875592c81f17ac98c4f6098492b3d9dd33d2
2021-01-20Allow multiple bts objects in PCUPau Espin Pedrol1-4/+4
This patch doesn't really tests whether osmo-pcu can work on a multi-bts environment, but it prepares the data structures to be able to do so at any later point in time. Change-Id: I6b10913f46c19d438c4e250a436a7446694b725a
2021-01-19Unify BTS into a C usable structurePau Espin Pedrol1-16/+8
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
2021-01-18Split PCU global PCU object from BTS objectPau Espin Pedrol1-4/+8
Currently the BTS object (and gprs_rlcmac_bts struct) are used to hold both PCU global fields and BTS specific fields, all mangled together. The BTS is even accessed in lots of places by means of a singleton. This patch introduces a new struct gprs_pcu object aimed at holding all global state, and several fields are already moved from BTS to it. The new object can be accessed as global variable "the_pcu", reusing and including an already exisitng "the_pcu" global variable only used for bssgp related purposes so far. This is only a first step towards having a complete split global pcu and BTS, some fields are still kept in BTS and will be moved over follow-up smaller patches in the future (since this patch is already quite big). So far, the code still only supports one BTS, which can be accessed using the_pcu->bts. In the future that field will be replaced with a list, and the BTS singletons will be removed. The cur_fn output changes in TbfTest are actually a side effect fix, since the singleton main_bts() now points internally to the_pcu->bts, hence the same we allocate and assign in the test. Beforehand, "the_bts" was allocated in the stack while main_bts() still returned an unrelated singleton BTS object instance. Related: OS#4935 Change-Id: I88e3c6471b80245ce3798223f1a61190f14aa840
2018-04-01use osmo_init_logging2() with proper talloc ctxNeels Hofmeyr1-1/+1
There is a duality of initialization: early_init() in bts.cpp wants to init logging even before static instances get initialized. Make sure that tall_pcu_ctx is initialized during early_init() as well. There is a build context that does not seem to include bts.cpp (osmo-pcu-remote), so to be sure, init tall_pcu_ctx as NULL and both in early_init() as well as pcu_main.cpp, init both tall_pcu_ctx and logging if it is still NULL. Change-Id: I2199b62d0270bd35dec2283e8f5b364b7c63915b
2018-03-11implement support for 3-digit MNC with leading zerosNeels Hofmeyr1-0/+1
Receive the mnc_3_digits flag from the PCU interface. Bump the PCU interface to 9. This is one part of the three identical pcuif_proto.h patches: - I49cd762c3c9d7ee6a82451bdf3ffa2a060767947 (osmo-bts) - I787fed84a7b613158a5618dd5cffafe4e4927234 (osmo-pcu) - I78f30aef7aa224b2e9db54c3a844d8f520b3aee0 (osmo-bsc) Add 3-digit flags and use the new RAI and LAI API from libosmocore throughout the code base to be able to handle an MNC < 100 that has three digits (leading zeros). Depends: Id2240f7f518494c9df6c8bda52c0d5092f90f221 (libosmocore), Ib7176b1d65a03b76f41f94bc9d3293a8a07d24c6 (libosmocore) Change-Id: I787fed84a7b613158a5618dd5cffafe4e4927234
2018-02-21Simplify TS alloc: move slot check into functionsMax1-0/+10
Move timeslot applicability check outside of nested for loop into separate functions and document them. Add corresponding tests. This allows us to clarify types used in TS-related computations. Change-Id: Ic39e848da47dc11357782362fdf6206d2c1457c2 Related: OS#2282
2018-01-25Add tests for find_multi_slots()Max1-0/+177
* make function public * add tests Change-Id: I4174703808335c19341cd5b5f4422496d958967f