aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-06-29 14:05:55 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-07-03 13:17:22 +0200
commit699b8dca49df30b7bf6db7090eb416d1ad4fd46d (patch)
treeb773f4e49d2768c8279796590914e18d3ce678b7
parentccc34e4d30b962a2963c004d003d3851801ffb3b (diff)
ms: Add first_common_ts method to GprsMs
This method gets the index (0 based) of first common time slot used by the TBFs attach to it. It expects that all of them have the same notion of this. If no TBF is attached, -1 will be returned. Sponsored-by: On-Waves ehf
-rw-r--r--src/gprs_ms.cpp11
-rw-r--r--src/gprs_ms.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp
index 0c1ae65..1014ea3 100644
--- a/src/gprs_ms.cpp
+++ b/src/gprs_ms.cpp
@@ -518,3 +518,14 @@ uint8_t GprsMs::current_cs_dl() const
return cs;
}
+int GprsMs::first_common_ts() const
+{
+ if (m_dl_tbf)
+ return m_dl_tbf->first_common_ts;
+
+ if (m_ul_tbf)
+ return m_ul_tbf->first_common_ts;
+
+ return -1;
+}
+
diff --git a/src/gprs_ms.h b/src/gprs_ms.h
index 3d0195c..17ee41b 100644
--- a/src/gprs_ms.h
+++ b/src/gprs_ms.h
@@ -76,6 +76,8 @@ public:
uint8_t current_cs_ul() const;
uint8_t current_cs_dl() const;
+ int first_common_ts() const;
+
gprs_llc_queue *llc_queue();
const gprs_llc_queue *llc_queue() const;