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=email :
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.



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41734?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I7b7f61aae6b7df6946dadf2f78fddf92995603ec
Gerrit-Change-Number: 41734
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Attention: dexter <[email protected]>
Gerrit-Comment-Date: Tue, 23 Dec 2025 10:02:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <[email protected]>

Reply via email to