ts_102_221: Implement File Descriptor using construct

This automatically adds encoding support, which is needed for upcoming
CREATE FILE support.

Change-Id: Ia40dba4aab6ceb9d81fd170f7efa8dad1f9b43d0
This commit is contained in:
Harald Welte
2022-02-13 17:52:28 +01:00
parent ee670bc1c6
commit 747a978478
5 changed files with 50 additions and 43 deletions

View File

@@ -528,8 +528,7 @@ class PySimCommands(CommandSet):
self._cmd.poutput("# file: %s (%s)" % (
self._cmd.rs.selected_file.name, self._cmd.rs.selected_file.fid))
fd = fcp_dec['file_descriptor']
structure = fd['structure']
structure = self._cmd.rs.selected_file_structure()
self._cmd.poutput("# structure: %s" % str(structure))
for f in df_path_list:
@@ -545,8 +544,8 @@ class PySimCommands(CommandSet):
self._cmd.poutput("update_binary " + str(result[0]))
elif structure == 'cyclic' or structure == 'linear_fixed':
# Use number of records specified in select response
if 'num_of_rec' in fd:
num_of_rec = fd['num_of_rec']
num_of_rec = self._cmd.rs.selected_file_num_of_rec()
if num_of_rec:
for r in range(1, num_of_rec + 1):
if as_json:
result = self._cmd.rs.read_record_dec(r)