Attention is currently required from: dexter.
laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/41734?usp=email )
Change subject: esim.saip.FsProfileElement: Add file2pe() for single file conversion ......................................................................
Patch Set 3:
(1 comment)
File pySim/esim/saip/__init__.py:
https://gerrit.osmocom.org/c/pysim/+/41734/comment/df7e1368_78bda566?usp=ema... : PS3, Line 638: self.decoded[f.pe_name] = f.to_tuples()
There is something I am struggling with. There is already the add_file() method. […]
we could a) make sure that the caller-provided file is actually contained in self.files (which is how I intended it to be used) and not some completely different source b) pass a path into this function, resolve the File from self.files and then update it. This would incur the look-up cost, which is why I decided to permit passing the file instance directly
In any case, the fundamental problem is: * we have the decoded representation in self.files. It may not always be 100% correct yet as the code matures * we have very basic/inclomplete encoder capabilities, so re-encoding all the content (like files2pe below) is very likely to incur some losses in translation * during personalization, we still want to modify individual files. In case of EF.SMSP we want to replace the entire file contents, so calling a single-file `file2pe` sounds like the approach where at least we don't corrupt any other files
Due to the many nasty details of the SAIP file format, and it's various encoding options, referral to [various differnt versions of] templates with default content, etc. I think it will be a long time until we have code that can reliably and loss-free translate decoded -> files -> decoded for the whole PE.