Attention is currently required from: laforge.

dexter has posted comments on this change by dexter. ( 
https://gerrit.osmocom.org/c/pysim/+/42741?usp=email )

Change subject: pySim/global_platform: make functionality available outside of 
cmd2
......................................................................


Patch Set 2:

(1 comment)

Patchset:

PS1:
> I don't really like the approach to expose lots of functions at the module 
> that are not part of some […]
I am also not so convinced with the current approach. We need to find something 
that allows us to decouple the business logic (global platform, lchan, etc.) 
from the user interface (cmd2)


My first idea would be to have an abstract base class that accepts an lchan via 
its constructor. The lchan, can then be accessed by methods implemented by a 
specific class. With such a base class we could implement all kinds of utility 
classes. And it would be a simple scheme.

I have also tried to explore an alternative where we would separate the nested 
AddlShellCommands from the ADF_SD class. I thought we then could keep the 
business logic method (the ones we have currently split aside) inside ADF_SD to 
access them from the AddlShellCommands, which is now outside. Unfortunately 
this quickly becomes a mess since the lchan object is somewhere in the _cmd 
object and that only exists in AddlShellCommands. We could pass a reference to 
the ADF_SD object and access the methods by passing the lchan object from the 
AddlShellCommands object, but that would be also not a clean solution. I think 
removing the dependency to cmd2 on that level is very complicated.

Which path do you think we should take?



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/42741?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: Idf4e4b58bf49ba62b2c22de4c49a2dcacfa872cb
Gerrit-Change-Number: 42741
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Comment-Date: Tue, 12 May 2026 09:01:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <[email protected]>

Reply via email to