aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_rlcmac.h
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-10-07 15:26:00 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-12-18 10:02:20 +0100
commitb83e2a7d5cae302fb33ad56fa6dbad7906165909 (patch)
treed398de81ccc921a64076baf0ca15202477b39594 /src/gprs_rlcmac.h
parent5cae087ae9ed58910af69e9869b5dca4c0234628 (diff)
Adding flow chart diagram of ongoing TBFs and their events
It is quite essential. It shows how TBFs are related and helps to estimate states and timers (timeouts) of the MS. In order to use it, it must be defined by a switch at gprs_rlcmac.h.
Diffstat (limited to 'src/gprs_rlcmac.h')
-rw-r--r--src/gprs_rlcmac.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h
index 1900d89b..c67a68bd 100644
--- a/src/gprs_rlcmac.h
+++ b/src/gprs_rlcmac.h
@@ -31,6 +31,9 @@ extern "C" {
}
#endif
+/* generate a diagram for debugging timing issues */
+//#define DEBUG_DIAGRAM
+
/* This special feature will delay assignment of downlink TBF by one second,
* in case there is already a TBF.
* This is usefull to debug downlink establishment during packet idle mode.
@@ -225,6 +228,11 @@ struct gprs_rlcmac_tbf {
uint32_t bw_octets; /* number of octets transmitted since bw_tv */
uint8_t cs; /* current coding scheme */
+
+#ifdef DEBUG_DIAGRAM
+ int diag; /* number where TBF is presented in diagram */
+ int diag_new; /* used to format output of new TBF */
+#endif
};
extern struct llist_head gprs_rlcmac_ul_tbfs; /* list of uplink TBFs */
@@ -262,6 +270,12 @@ struct gprs_rlcmac_cs {
extern struct gprs_rlcmac_cs gprs_rlcmac_cs[];
+#ifdef DEBUG_DIAGRAM
+void debug_diagram(int diag, const char *format, ...);
+#else
+#define debug_diagram(a, b, args...) ;
+#endif
+
int sba_alloc(uint8_t *_trx, uint8_t *_ts, uint32_t *_fn, uint8_t ta);
struct gprs_rlcmac_sba *sba_find(uint8_t trx, uint8_t ts, uint32_t fn);