dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35248?usp=email )
Change subject: runtime: do not use the _scc object of the card object to select MF
......................................................................
runtime: do not use the _scc object of the card object to select MF
The constructor of the RuntimeState object selects the MF befor it does
some other steps. However it does this through the _scc object of the
card object. This method is before we had lchan abstraction, so we
should now use the lchan object like in all other places.
Related: OS#5418
Change-Id: I9a751c0228c77077e3fabb50a9a68e4489e7151c
---
M pySim/runtime.py
1 file changed, 16 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/48/35248/1
diff --git a/pySim/runtime.py b/pySim/runtime.py
index 58df22d..2447222 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -64,7 +64,7 @@
self.mf.add_file(f)
# go back to MF before the next steps (addon probing might have changed DF)
- self.card._scc.select_file('3F00')
+ self.lchan[0].select('MF')
# add application ADFs + MF-files from profile
apps = self._match_applications()
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/35248?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9a751c0228c77077e3fabb50a9a68e4489e7151c
Gerrit-Change-Number: 35248
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: dexter, fixeria, laforge.
Hello Jenkins Builder, fixeria, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/34932?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: runtime: refactor file selection methods select and select_file
......................................................................
runtime: refactor file selection methods select and select_file
The implementation of the methods select and select_file of class
RuntimeLchan is a bit complex. We access the card directly in several
places which makes it difficult to track the state changes. We should
clean this up so that we call self.rs.card.select_adf_by_aid/
self.scc.select_file from a single place only.
This means that the method select uses the method select_file. This
results in a much cleaner implementation. We also should take care
that the important states that we track (selected_file, selected_adf,
etc.) are updated by a single private method. Since the update always
must happen after a select _select_post is a good place to do this.
Related: OS#5418
Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2
---
M pySim/runtime.py
1 file changed, 73 insertions(+), 40 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/32/34932/3
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34932?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I9ae213f3b078983f3e6d4c11db38fdbe504c84f2
Gerrit-Change-Number: 34932
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35251?usp=email )
Change subject: runtime: explain how file probing works
......................................................................
runtime: explain how file probing works
We use a trick to probe a file (that does not exist in the local file
model yet). Let's explain further how that works, in particular why we
do not have to upate any state if probing fails.
Change-Id: I2a8af73654251d105af8de1c17da53dfa10dc669
Related: OS#5418
---
M pySim/runtime.py
1 file changed, 20 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/51/35251/1
diff --git a/pySim/runtime.py b/pySim/runtime.py
index 028bef1..1155433 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -256,6 +256,12 @@
"Cannot select unknown file by name %s, only hexadecimal 4 digit FID is allowed" % fid)
try:
+ # We access the card through the select_file method of the scc object.
+ # If we succeed, we know that the file exists on the card and we may
+ # proceed with creating a new CardEF object in the local file model at
+ # run time. In case the file does not exist on the card, we just abort.
+ # The state on the card (selected file/application) wont't be changed,
+ # so we do not have to update any state in that case.
(data, sw) = self.scc.select_file(fid)
except SwMatchError as swm:
k = self.interpret_sw(swm.sw_actual)
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/35251?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I2a8af73654251d105af8de1c17da53dfa10dc669
Gerrit-Change-Number: 35251
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35250?usp=email )
Change subject: runtime: cosmetic: prnounce file reference data
......................................................................
runtime: cosmetic: prnounce file reference data
One of the most important properties of the RuntimeLchan are the
selected_file/adf properties. Let's reformat the code so that those
properties are more pronounced.
Change-Id: I4aa028f66879b7d6c2a1cd102cda8d8ca5ff48b1
Related: OS#5418
---
M pySim/runtime.py
1 file changed, 17 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/50/35250/1
diff --git a/pySim/runtime.py b/pySim/runtime.py
index 670babc..028bef1 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -170,11 +170,13 @@
def __init__(self, lchan_nr: int, rs: RuntimeState):
self.lchan_nr = lchan_nr
self.rs = rs
+ self.scc = self.rs.card._scc.fork_lchan(lchan_nr)
+
+ # File reference data
self.selected_file = self.rs.mf
self.selected_adf = None
self.selected_file_fcp = None
self.selected_file_fcp_hex = None
- self.scc = self.rs.card._scc.fork_lchan(lchan_nr)
def add_lchan(self, lchan_nr: int) -> 'RuntimeLchan':
"""Add a new logical channel from the current logical channel. Just affects
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/35250?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I4aa028f66879b7d6c2a1cd102cda8d8ca5ff48b1
Gerrit-Change-Number: 35250
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35249?usp=email )
Change subject: runtime: explain why we may access the card object directly
......................................................................
runtime: explain why we may access the card object directly
When we are in the constructor of RuntimeState, we may/must access the
card object directly. Let's explain why, since it may not be immediately
obvious.
Change-Id: I01f74d5f021d46679d1c9fa83fb8753382b0f88f
Related: OS#5418
---
M pySim/runtime.py
1 file changed, 20 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/49/35249/1
diff --git a/pySim/runtime.py b/pySim/runtime.py
index 2447222..670babc 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -110,6 +110,12 @@
# probe for those applications
for f in sorted(set(apps_profile) - set(apps_taken), key=str):
try:
+ # we can not use the lchan provided methods select, or select_file
+ # since those method work on an already finished file model. At
+ # this point we are still in the initialization process, so it is
+ # no problem when we access the card object directly without caring
+ # about updating other states. For normal selects at runtime, the
+ # caller must use the lchan provided methods select or select_file!
data, sw = self.card.select_adf_by_aid(f.aid)
self.selected_adf = f
if sw == "9000":
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/35249?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I01f74d5f021d46679d1c9fa83fb8753382b0f88f
Gerrit-Change-Number: 35249
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/35151?usp=email )
Change subject: gprs_rlcmac_sched: rewrite logic around idle block skip
......................................................................
Abandoned
after a discussion we noticed that this patch goes in the wrong direction.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/35151?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Iadb62748b18605bf158169b317f880352bc0a5a6
Gerrit-Change-Number: 35151
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: jolly <andreas(a)eversberg.eu>
Gerrit-MessageType: abandon