aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2022-04-05 14:45:18 +0200
committerHarald Welte <laforge@osmocom.org>2022-04-05 14:45:18 +0200
commitc30bed235e9fe6339140a374abcb0c292f6a030e (patch)
tree7ec1287df1313d705bf377d26055cdfc58a1f4e4
parent0dcdfbfe94952d739255fdb96145ead01abb7c75 (diff)
ts_102_221: Add encode/write support of EF.ARR records
With this change, we can also encode/write EF.ARR records, not just decode/read. Change-Id: Id0da2b474d05aba12136b9cae402ad8326700182
-rw-r--r--pySim/ts_102_221.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pySim/ts_102_221.py b/pySim/ts_102_221.py
index 713d169..bf63f55 100644
--- a/pySim/ts_102_221.py
+++ b/pySim/ts_102_221.py
@@ -672,6 +672,11 @@ class EF_ARR(LinFixedEF):
# 'un-flattening' decoder, and hence would be unable to encode :(
return dec[0]
+ def _encode_record_bin(self, in_json):
+ # we can only guess if we should decode for EF or DF here :(
+ arr_seq = DataObjectSequence('arr', sequence=[AM_DO_EF, SC_DO])
+ return arr_seq.encode_multi(in_json)
+
@with_default_category('File-Specific Commands')
class AddlShellCommands(CommandSet):
def __init__(self):