aboutsummaryrefslogtreecommitdiffstats
path: root/python/misc_utils
diff options
context:
space:
mode:
authorRoman Khassraf <roman@khassraf.at>2015-09-26 08:29:13 +0200
committerRoman Khassraf <roman@khassraf.at>2015-09-26 08:29:13 +0200
commit5ec7987f8af7871b66fcb84171522c83c6c4582b (patch)
treee1386d63698b4a1ef4aea2ae39c8be483483d2a8 /python/misc_utils
parent351d217b77e89c16d838b5ca20e1fbae33afe531 (diff)
Added functions to get first and last arfcn of a band
Diffstat (limited to 'python/misc_utils')
-rw-r--r--python/misc_utils/arfcn.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/python/misc_utils/arfcn.py b/python/misc_utils/arfcn.py
index afe8ab6..e7edfb5 100644
--- a/python/misc_utils/arfcn.py
+++ b/python/misc_utils/arfcn.py
@@ -44,6 +44,24 @@ def get_bands():
return __band_conf.keys()
+def get_first_arfcn(band):
+ """
+ Returns the first arfcn (i.e. the one with the lowest number) in the given band.
+ """
+ if band in __band_conf:
+ conf = __band_conf.get(band)
+ return conf['first_arfcn']
+
+
+def get_last_arfcn(band):
+ """
+ Returns the last arfcn (i.e. the one with the highest number) in the given band
+ """
+ if band in __band_conf:
+ conf = __band_conf.get(band)
+ return conf['last_arfcn']
+
+
def is_valid_arfcn(arfcn, band):
"""
Returns True if arfcn is valid in the given band, else False