Attention is currently required from: fixeria, pespin. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/31066 )
Change subject: ts_51_011: Implement Extended BCD Coding ......................................................................
Patch Set 2:
(1 comment)
File pySim/ts_51_011.py:
https://gerrit.osmocom.org/c/pysim/+/31066/comment/dd3adffb_b258fb4c PS2, Line 366: 'dialing_nr'/ExtendedBcdAdapter(BcdAdapter(Rpad(Bytes(10)))),
But then it's not really a BcdAdapter, if it simply translates the */# characters? I don't want to b […]
I thought about the naming when writing the code, and the problem is that it *is* and adapter in the construct world. It also *does* convert BCD. Just not from bytes to BCD but it translates a BCD string to an Extended BCD string.
So if you really wanted to be clear, you would have to rename the old BcdAdpater to BytesToBcdAdapter, and then the new one to BcdToExtdBcdAdapter or soemthing like that.
In the end I didn't come up with a clean solution that doesn't need to rename everything.
I'm also not convinced why we would always only directly convert between bytes and extended BCD like you presented. There may be BCD data which is already in form of a string of digits whcih we want to interpret as extended BCD.