server: add --fast-init to skip redundant card resets
pysim's init_card() resets the card once per profile candidate in CardProfile.pick(), once in RuntimeState.__init__ and again in PysimApp.equip(); on typical readers each reconnect costs ~1.3s and a normal init/equip does 7-8 of them (measured: equip 9.85s, startup ~14.8s). fastinit.py mirrors pySim.app.init_card() with the resets removed: pick_profile_no_reset() runs all profile probes back-to-back on one connection, FastRuntimeState.reset() is a software reset (select MF, clear selected_adf/scp, ATR from the transport) and the equip/reset commands are routed through do_equip_fast (one reconnect via wait_for_card) and do_reset_fast (always a physical reset). Enabled with --fast-init; stock behavior remains the default. Tests for the reset-free pick, the soft reset and the explicit reset paths. Docs updated; SW cache v88 -> v89.
This commit is contained in:
+1
-1
@@ -362,7 +362,7 @@
|
||||
<p class="text-sm mb-3">Values persist server-side until restart. When the card issues PLI, the server injects the dictionary values into the TERMINAL RESPONSE.</p>
|
||||
|
||||
<h4 id="status-polling" class="font-medium mb-1">5.5.5 STATUS polling</h4>
|
||||
<p class="text-sm mb-3">A <strong>Send STATUS</strong> button issues a manual STATUS (F2). A <strong>Polling</strong> toggle enables background polling: after a configurable idle interval (server CLI <code class="font-mono text-sm">--poll-interval</code>, 1–255 s, default 30 s) the server sends STATUS and handles any pending proactive command. Polling stops and card state resets if the card is removed.</p>
|
||||
<p class="text-sm mb-3">A <strong>Send STATUS</strong> button issues a manual STATUS (F2). A <strong>Polling</strong> toggle enables background polling: after a configurable idle interval (server CLI <code class="font-mono text-sm">--poll-interval</code>, 1–255 s, default 30 s, <code class="font-mono text-sm">0</code> disables polling) the server sends STATUS and handles any pending proactive command. Polling stops and card state resets if the card is removed.</p>
|
||||
|
||||
<h3 id="profiler" class="text-lg font-medium mb-2">5.6 Profiler</h3>
|
||||
<p class="text-sm mb-2">Verifies that a card matches a named <strong>profile</strong> — an ordered set of rules describing the expected file system and (optionally) file contents. Profiles are stored in <code class="font-mono text-sm">localStorage</code>.</p>
|
||||
|
||||
Reference in New Issue
Block a user