aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ta_control/ta_control_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ta_control/ta_control_test.c')
-rw-r--r--tests/ta_control/ta_control_test.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/ta_control/ta_control_test.c b/tests/ta_control/ta_control_test.c
index 2e981b38..253491a8 100644
--- a/tests/ta_control/ta_control_test.c
+++ b/tests/ta_control/ta_control_test.c
@@ -26,36 +26,35 @@
#include <osmo-bts/logging.h>
#include <osmo-bts/gsm_data.h>
#include <osmo-bts/ta_control.h>
+#include <osmo-bts/bts_trx.h>
void lchan_ms_ta_ctrl_test(int16_t toa256_start, unsigned int steps)
{
- struct gsm_lchan lchan = { };
+ struct gsm_bts_trx trx = { };
+ struct gsm_bts_trx_ts ts = { .trx = &trx };
+ struct gsm_lchan lchan = { .ts = &ts };
unsigned int i;
uint8_t rqd_ta_after;
uint8_t rqd_ta_before;
int16_t toa256 = toa256_start;
- /* Arbitrary value, high enough so that a computation can happen. */
- lchan.meas.num_ul_meas = 10;
-
printf("toa256_start = %u / 256 = %u, steps = %u\n", toa256_start,
toa256_start / 256, steps);
for (i = 0; i < steps; i++) {
printf("Step #%u\n", i);
- printf(" lchan.rqd_ta (before) = %u\n", lchan.rqd_ta);
+ printf(" lchan.ta_ctrl.current (before) = %u\n", lchan.ta_ctrl.current);
printf(" toa256 (before) = %u / 256 = %u\n", toa256,
toa256 / 256);
- rqd_ta_before = lchan.rqd_ta;
+ rqd_ta_before = lchan.ta_ctrl.current;
- lchan.meas.ms_toa256 = toa256;
- lchan_ms_ta_ctrl(&lchan);
+ lchan_ms_ta_ctrl(&lchan, rqd_ta_before, toa256);
- rqd_ta_after = lchan.rqd_ta;
+ rqd_ta_after = lchan.ta_ctrl.current;
toa256 -= (rqd_ta_after - rqd_ta_before) * 256;
- printf(" lchan.rqd_ta (after) = %u\n", lchan.rqd_ta);
+ printf(" lchan.ta_ctrl.current (after) = %u\n", lchan.ta_ctrl.current);
printf(" toa256 (after) = %u / 256 = %u\n", toa256,
toa256 / 256);
}