aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2022-02-12 21:53:18 +0100
committerHarald Welte <laforge@osmocom.org>2022-02-15 15:35:35 +0100
commit3bb516b2b1537c435719a0218b97dd33578adf3b (patch)
treeac37add93bfde61799d29d2433e2c1b926b1438f
parentaceb2a548a9ca9e892bcaa40a531014d89b2e3e0 (diff)
Improve IST/UST check documentation (for the user manual)
-rw-r--r--pySim/ts_31_102.py14
-rw-r--r--pySim/ts_31_103.py11
2 files changed, 15 insertions, 10 deletions
diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py
index 7d0eb28..3995dfa 100644
--- a/pySim/ts_31_102.py
+++ b/pySim/ts_31_102.py
@@ -644,7 +644,12 @@ class EF_UST(EF_UServiceTable):
self._cmd.card.update_ust(int(arg), 0)
def do_ust_service_check(self, arg):
- """Check consistency between services of this file and files present/activated"""
+ """Check consistency between services of this file and files present/activated.
+
+ Many services determine if one or multiple files shall be present/activated or if they shall be
+ absent/deactivated. This performs a consistency check to ensure that no services are activated
+ for files that are not - and vice-versa, no files are activated for services that are not. Error
+ messages are printed for every inconsistency found."""
selected_file = self._cmd.rs.selected_file
num_problems = selected_file.ust_service_check(self._cmd)
# obtain list of currently active services
@@ -802,13 +807,6 @@ class EF_EST(EF_UServiceTable):
"""Deactivate a service within EF.UST"""
self._cmd.card.update_est(int(arg), 0)
- def do_est_service_check(self, arg):
- """Check consistency between services of this file and files present/activated"""
- # obtain list of currently active services
- (service_data, sw) = self._cmd.rs.read_binary_dec()
- active_services = service_data.keys()
-
-
# TS 31.102 Section 4.2.48
class EF_ACL(TransparentEF):
def __init__(self, fid='6f57', sfid=None, name='EF.ACL', size={32, None},
diff --git a/pySim/ts_31_103.py b/pySim/ts_31_103.py
index f04f480..66124a8 100644
--- a/pySim/ts_31_103.py
+++ b/pySim/ts_31_103.py
@@ -125,9 +125,16 @@ class EF_IST(EF_UServiceTable):
self._cmd.card.update_ist(int(arg), 0)
def do_ist_service_check(self, arg):
- """Check consistency between services of this file and files present/activated"""
+ """Check consistency between services of this file and files present/activated.
+
+ Many services determine if one or multiple files shall be present/activated or if they shall be
+ absent/deactivated. This performs a consistency check to ensure that no services are activated
+ for files that are not - and vice-versa, no files are activated for services that are not. Error
+ messages are printed for every inconsistency found."""
selected_file = self._cmd.rs.selected_file
- selected_file.ust_service_check(self._cmd)
+ num_problems = selected_file.ust_service_check(self._cmd)
+ self._cmd.poutput("===> %u service / file inconsistencies detected" % num_problems)
+
# TS 31.103 Section 4.2.8
class EF_PCSCF(LinFixedEF):