From 28f160e76c3c53029bc6e8de101b2d7ee26eea16 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 5 Sep 2019 14:48:35 +0200 Subject: Introduce osmo_tdef infra and timer VTY commands This will allow for configuration of some of the timers by the user, and allow him to inspect current values being used. It will be also useful for TTCN3 tests which may want to test some of the timers without having to wait for lots of time. Timers are splitted into 2 groups: BTS controlled ones and PCU controlled ones. The BTS controlled ones are read-only by the user (hence no "timer" VTY command is provided to change them). TbfTest.err output changes due to timers being set up correctly as a consequence of changes. Other application such as pcu_emu.cpp and pcu_main.cpp had to previosuly set the initial values by hand (and did so), but apparently TbfTest.c was missing that part, which is now fixed for free. Depends: libosmocore.git Id56a1226d724a374f04231df85fe5b49ffd2c43c Change-Id: I5cfb9ef01706124be262d4536617b9edb4601dd5 --- src/tbf.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/tbf.h') diff --git a/src/tbf.h b/src/tbf.h index 16ccf43e..6eab9d0d 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -42,10 +42,6 @@ struct gprs_rlcmac_bts; * TBF instance */ -#define T_ASS_AGCH_USEC 200000 /* waiting after IMM.ASS confirm */ -#define T_ASS_PACCH_SEC 2 /* timeout for pacch assignment */ -#define T_REJ_PACCH_USEC 2000 /* timeout for tbf reject for PRR*/ - enum gprs_rlcmac_tbf_state { GPRS_RLCMAC_NULL = 0, /* new created TBF */ GPRS_RLCMAC_ASSIGN, /* wait for downlink assignment */ @@ -193,7 +189,7 @@ enum tbf_counters { /* TBF counters from 3GPP TS 44.060 ยง13.4 */ #define GPRS_RLCMAC_FLAG_TO_DL_ASS 7 #define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */ -#define T_START(tbf, t, sec, usec, r, f) tbf->t_start(t, sec, usec, r, f, __FILE__, __LINE__) +#define T_START(tbf, t, T, r, f) tbf->t_start(t, T, r, f, __FILE__, __LINE__) #define TBF_SET_STATE(t, st) do { t->set_state(st, __FILE__, __LINE__); } while(0) #define TBF_SET_ASS_STATE_DL(t, st) do { t->set_ass_state_dl(st, __FILE__, __LINE__); } while(0) @@ -250,7 +246,7 @@ struct gprs_rlcmac_tbf { void stop_timers(const char *reason); bool timers_pending(enum tbf_timers t); void t_stop(enum tbf_timers t, const char *reason); - void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force, + void t_start(enum tbf_timers t, int T, const char *reason, bool force, const char *file, unsigned line); int establish_dl_tbf_on_pacch(); -- cgit v1.2.3