Error Action Recovery: add Action Indicator / Proactive Command / None selector per TS 102 226 §7.3.3
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
<tbody>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">C-APDU</td><td class="py-1 px-2 font-mono">22</td><td class="py-1 px-2">APDU</td></tr>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">Immediate Action</td><td class="py-1 px-2 font-mono">81</td><td class="py-1 px-2">Проактивная команда или action indicator</td></tr>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">Error Action</td><td class="py-1 px-2 font-mono">82</td><td class="py-1 px-2">Условное восстановление при ошибках с проактивной командой</td></tr>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">Error Action</td><td class="py-1 px-2 font-mono">82</td><td class="py-1 px-2">Условное восстановление при ошибках с action indicator или проактивной командой</td></tr>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">Script Chaining</td><td class="py-1 px-2 font-mono">83</td><td class="py-1 px-2">Многопакетное выполнение скрипта с флагами First/Intermediary/Last</td></tr>
|
||||
<tr><td class="py-1 px-2">Response Type</td><td class="py-1 px-2 font-mono">-</td><td class="py-1 px-2">Индикатор типа ответа: expanded/compact/none</td></tr>
|
||||
</tbody>
|
||||
@@ -114,7 +114,7 @@
|
||||
<ul class="text-sm list-disc pl-5 mb-2">
|
||||
<li><strong>Тип действия:</strong> Немедленное (00), отложенное (01) или условное (02) выполнение</li>
|
||||
<li><strong>Условия запуска:</strong> Сопоставление SW (любая ошибка, конкретный SW, диапазон SW, конкретная команда)</li>
|
||||
<li><strong>Действие восстановления:</strong> Проактивная команда (DISPLAY TEXT, PLAY TONE, REFRESH) для уведомления или отката</li>
|
||||
<li><strong>Действие восстановления:</strong> Action Indicator (81 session indication / 82 early response) или проактивная команда (DISPLAY TEXT, PLAY TONE, REFRESH) для уведомления или отката</li>
|
||||
<li><strong>Количество попыток:</strong> Число повторных попыток до отказа (0=без повтора)</li>
|
||||
</ul>
|
||||
|
||||
|
||||
+2
-2
@@ -102,7 +102,7 @@
|
||||
<tbody>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">C-APDU</td><td class="py-1 px-2 font-mono">22</td><td class="py-1 px-2">Raw APDU hex</td></tr>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">Immediate Action</td><td class="py-1 px-2 font-mono">81</td><td class="py-1 px-2">Proactive command or action indicator</td></tr>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">Error Action</td><td class="py-1 px-2 font-mono">82</td><td class="py-1 px-2">Conditional error recovery with proactive command fallback</td></tr>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">Error Action</td><td class="py-1 px-2 font-mono">82</td><td class="py-1 px-2">Conditional error recovery with action indicator or proactive command</td></tr>
|
||||
<tr class="border-b border-gray-200 dark:border-slate-700"><td class="py-1 px-2">Script Chaining</td><td class="py-1 px-2 font-mono">83</td><td class="py-1 px-2">Multi-packet script execution with First/Intermediary/Last flags</td></tr>
|
||||
<tr><td class="py-1 px-2">Response Type</td><td class="py-1 px-2 font-mono">-</td><td class="py-1 px-2">Expanded/Compact/None response parsing indicator</td></tr>
|
||||
</tbody>
|
||||
@@ -114,7 +114,7 @@
|
||||
<ul class="text-sm list-disc pl-5 mb-2">
|
||||
<li><strong>Action Type:</strong> Immediate (00), delayed (01), or conditional (02) execution</li>
|
||||
<li><strong>Trigger Conditions:</strong> SW pattern matching (any error, specific SW, SW range, specific command fails)</li>
|
||||
<li><strong>Recovery Action:</strong> Proactive command (DISPLAY TEXT, PLAY TONE, REFRESH) to notify user or fallback</li>
|
||||
<li><strong>Recovery Action:</strong> Action Indicator (81 session indication / 82 early response) or Proactive Command (DISPLAY TEXT, PLAY TONE, REFRESH) to notify user or fallback</li>
|
||||
<li><strong>Retry Count:</strong> Number of retry attempts before giving up (0=no retry)</li>
|
||||
</ul>
|
||||
|
||||
|
||||
+36
-11
@@ -2109,7 +2109,12 @@ function buildErrorActionRow(rowIdx) {
|
||||
|
||||
<div class="border border-gray-300 dark:border-slate-600 rounded p-2">
|
||||
<div class="text-xs mb-2 font-medium text-gray-700 dark:text-slate-300">Recovery Action:</div>
|
||||
<div class="error-recovery-builder"></div>
|
||||
<select class="error-recovery-type text-xs border border-gray-300 dark:border-slate-600 rounded px-2 py-1 dark:bg-slate-700 dark:text-slate-300" onchange="onRecoveryTypeChange(this)">
|
||||
<option value="none">None</option>
|
||||
<option value="action">Action Indicator</option>
|
||||
<option value="proactive" selected>Proactive Command</option>
|
||||
</select>
|
||||
<div class="error-recovery-body mt-1"></div>
|
||||
</div>
|
||||
|
||||
<div class="flex gap-2 items-center">
|
||||
@@ -2144,6 +2149,25 @@ function buildBerPcHtml() {
|
||||
</div>`;
|
||||
}
|
||||
|
||||
function onRecoveryTypeChange(sel) {
|
||||
const body = sel.nextElementSibling;
|
||||
if (sel.value === 'action') {
|
||||
body.innerHTML = `<select class="ber-action text-xs border border-gray-300 dark:border-slate-600 rounded px-1 py-1 dark:bg-slate-700 dark:text-slate-300 font-mono" onchange="updateBerRow(this)">
|
||||
<option value="81">81 (Session indication)</option>
|
||||
<option value="82">82 (Early response)</option>
|
||||
</select>`;
|
||||
} else if (sel.value === 'proactive') {
|
||||
body.innerHTML = buildBerPcHtml();
|
||||
const pc = body.querySelector('.ber-pc');
|
||||
berPopulateDevices(pc);
|
||||
onBerPcTypeChange(pc.querySelector('.ber-pc-type'));
|
||||
} else {
|
||||
body.innerHTML = '';
|
||||
}
|
||||
const row = sel.closest('.ber-row');
|
||||
if (row) updateBerRow(sel);
|
||||
}
|
||||
|
||||
function onBerSubTypeChange(sel) {
|
||||
const body = sel.closest('.ber-sub-body') || sel.parentElement.querySelector('.ber-sub-body');
|
||||
const st = sel.value;
|
||||
@@ -2154,11 +2178,8 @@ function onBerSubTypeChange(sel) {
|
||||
|
||||
if (type === 'error') {
|
||||
body.innerHTML = buildErrorActionRow(row.dataset.berIdx);
|
||||
const recoveryBuilder = body.querySelector('.error-recovery-builder');
|
||||
recoveryBuilder.innerHTML = buildBerPcHtml();
|
||||
const pc = recoveryBuilder.querySelector('.ber-pc');
|
||||
berPopulateDevices(pc);
|
||||
onBerPcTypeChange(pc.querySelector('.ber-pc-type'));
|
||||
const recoveryType = body.querySelector('.error-recovery-type');
|
||||
onRecoveryTypeChange(recoveryType);
|
||||
} else {
|
||||
body.innerHTML = `<select class="ber-action text-xs border border-gray-300 dark:border-slate-600 rounded px-1 py-1 dark:bg-slate-700 dark:text-slate-300 font-mono" onchange="updateBerRow(this)">
|
||||
<option value="81">81 (Session indication)</option>
|
||||
@@ -2263,7 +2284,7 @@ function genErrorActionValue(row, tag) {
|
||||
const maskInput = row.querySelector('.error-sw-mask');
|
||||
const valueInput = row.querySelector('.error-sw-value');
|
||||
const cmdNumInput = row.querySelector('.error-cmd-num');
|
||||
const recoveryBuilder = row.querySelector('.error-recovery-builder');
|
||||
const recoveryType = row.querySelector('.error-recovery-type');
|
||||
const retryCount = row.querySelector('.error-retry-count');
|
||||
|
||||
if (!actionType) return '';
|
||||
@@ -2301,10 +2322,14 @@ function genErrorActionValue(row, tag) {
|
||||
|
||||
value += swMask + swValue;
|
||||
|
||||
if (recoveryBuilder) {
|
||||
const recoveryValue = genBerPcValue(recoveryBuilder, '81');
|
||||
if (recoveryValue) {
|
||||
value += recoveryValue.slice(2);
|
||||
if (recoveryType) {
|
||||
const rt = recoveryType.value;
|
||||
if (rt === 'proactive') {
|
||||
const rv = genBerPcValue(recoveryType.parentElement, '81');
|
||||
if (rv) value += rv.slice(2);
|
||||
} else if (rt === 'action') {
|
||||
const a = recoveryType.parentElement.querySelector('.ber-action');
|
||||
if (a) value += '8101' + a.value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user