Command filter: FETCH and TERMINAL RESPONSE are separate entries (v2.7.1)

- the old "FETCH: ANY PROACTIVE" grouping label is gone: filter_label() now
  gives every command its own label, so the menu lists FETCH and TERMINAL
  RESPONSE individually — the multi-select filter (and the presets) cover the
  combinations that the grouping used to bundle
- the proactive presets keep their meaning: they name FETCH and TERMINAL
  PROFILE and reach the rest (a TERMINAL RESPONSE included) through the SW
  91xx rule; selecting FETCH now also brings its GET RESPONSE, which carries
  the fetched proactive command
- tests: the proactive-preset case follows the split (a TERMINAL RESPONSE is
  covered by 91xx, not by its name) plus a new case pinning the separate
  labels and the FETCH/GR pairing; 527 Python + 73 Node tests
- PWA_VERSION/pyproject/version.py 2.7.1, SW cache simtrace-analyser-v81
This commit is contained in:
catarrh committed 2026-10-17 23:58:23 +03:00
1 parent e0134c769a
commit 024527ada4
6 files changed
+30 -10

No files matched your search

+20 -2
View File
@@ -26,6 +26,8 @@ eval(
);
let el = () => ({});
function filterLabelOf(m) { return filter_label(m); }
const INS = {
SELECT: 'a4', 'READ BINARY': 'b0', 'READ RECORD': 'b2',
'UPDATE BINARY': 'd6', 'UPDATE RECORD': 'dc',
@@ -73,15 +75,31 @@ test('the GET RESPONSE linkage follows the selected commands', () => {
test('the proactive preset: FETCH, TERMINAL PROFILE and SW 91xx initiators', () => {
const set = new Set(['preset:proactive']);
assert.equal(matchesFilter(msg('FETCH'), 0, set), true);
assert.equal(matchesFilter(msg('TERMINAL RESPONSE'), 0, set), true);
assert.equal(matchesFilter(msg('TERMINAL PROFILE'), 0, set), true);
// A TERMINAL RESPONSE comes along through its 91xx answer, not its name.
assert.equal(matchesFilter(msg('TERMINAL RESPONSE', { sw1: '91', sw2: '00' }), 0, set), true);
assert.equal(matchesFilter(msg('ENVELOPE', { sw1: '91', sw2: '30' }), 0, set), true);
assert.equal(matchesFilter(msg('UPDATE BINARY', { sw1: '91', sw2: '00' }), 0, set), true);
// Novelties: a plain ENVELOPE (90 00) and unrelated commands stay out.
// A plain ENVELOPE/TERMINAL RESPONSE (90 00) and unrelated commands stay out.
assert.equal(matchesFilter(msg('ENVELOPE'), 0, set), false);
assert.equal(matchesFilter(msg('TERMINAL RESPONSE'), 0, set), false);
assert.equal(matchesFilter(msg('SELECT'), 0, set), false);
});
test('FETCH and TERMINAL RESPONSE are separate commands now', () => {
// Every command keeps its own label; the multi-select filter (or the
// preset's SW 91xx rule) covers the combinations.
assert.equal(filterLabelOf(msg('FETCH')), 'FETCH');
assert.equal(filterLabelOf(msg('TERMINAL RESPONSE')), 'TERMINAL RESPONSE');
const set = new Set(['cmd:FETCH']);
assert.equal(matchesFilter(msg('FETCH'), 0, set), true);
assert.equal(matchesFilter(msg('TERMINAL RESPONSE'), 0, set), false);
// The FETCH's GET RESPONSE (the proactive command itself) follows it.
const gr = msg('GET RESPONSE', { response_for: 'FETCH' });
STATE = { messages: [msg('FETCH'), gr] };
assert.equal(matchesFilter(gr, 1, set), true);
});
test('the proactive+events preset adds ENVELOPE', () => {
const set = new Set(['preset:proactive-events']);
assert.equal(matchesFilter(msg('ENVELOPE'), 0, set), true);