aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2021-06-05 10:12:43 +0200
committerHarald Welte <laforge@osmocom.org>2021-06-05 10:47:17 +0200
commit8f892fbbe855154becf9c7a7ef3d5c44adc616f1 (patch)
tree9aadc6e6512b3b84e5591ad6fd1759aa393ef268
parent07c7b1f59239ebbe4d9103108ba8e0b3b084faf8 (diff)
ts_102_221: Add construct for contents of EF.UMPC
-rw-r--r--pySim/ts_102_221.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py
index 38a69de..3665939 100644
--- a/pySim/ts_102_221.py
+++ b/pySim/ts_102_221.py
@@ -18,7 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
from pytlv.TLV import *
-from struct import pack, unpack
+from construct import *
+from pySim.construct import *
from pySim.utils import *
from pySim.filesystem import *
from bidict import bidict
@@ -599,7 +600,8 @@ class EF_ARR(LinFixedEF):
class EF_UMPC(TransparentEF):
def __init__(self, fid='2f08', sfid=0x08, name='EF.UMPC', desc='UICC Maximum Power Consumption'):
super().__init__(fid, sfid=sfid, name=name, desc=desc, size={5,5})
-
+ addl_info = FlagsEnum(Byte, req_inc_idle_current=1, support_uicc_suspend=2)
+ self._construct = Struct('max_current_mA'/Int8ub, 't_op_s'/Int8ub, 'addl_info'/addl_info)
class CardProfileUICC(CardProfile):