0
0
Fork 0
Codesys-MCP-SP21-plus/tests
Karstein Phobic Nyvold Kvistad c81ce33a4b feat(live-values): pump skeleton + VAR-block parser
Task 6 of v0.3 plan (parser + pump class; full --live-values CLI
wiring is Task 7).

parseVarNames(text) extracts variable names from any VAR /
VAR_INPUT / VAR_OUTPUT / VAR_GLOBAL / etc. block. Handles:
  - one name per declaration line
  - 'AT %QX0.1' location prefix
  - := initializer
  - inline (* ... *) and // line comments
  - multi-line (* ... *) blocks (state threaded across lines)
Doesn't handle the multi-name shorthand 'a, b : INT;' -- vanishingly
rare in practice, cost of getting it wrong is just a missing overlay.

LiveValuesPump owns a setInterval. Each tick:
  - reads tui-state.json via the injected readSelection
  - reads the POU's .st file from the mirror
  - parseVarNames -> per-var read_variable round-trip (errors per-var
    are silent, others may succeed)
  - writeLiveValues snapshot

Reentrancy guard: if a tick is still in flight when the next
interval fires, skip the new tick rather than queueing. Errors at any
layer are swallowed -- pump must never crash the server.

start()/stop() lifecycle so the server can hand it to the existing
shutdown path.
2026-04-29 09:55:18 +02:00
..
integration test+docs(symbol-config): 10 vitest e2e prep tests + README + function-test entry 2026-04-28 23:52:34 +02:00
tui tui(v0.3): useLiveValues hook + wire into Browser/Viewer 2026-04-29 09:49:15 +02:00
unit feat(live-values): pump skeleton + VAR-block parser 2026-04-29 09:55:18 +02:00
bench-results-v5.json test(bench): v5 sweep -- fix set_pou_code params, all 10 cases pass 2026-04-26 19:30:48 +02:00
bench-results.json fix: 4 broken-tool fixes (compile json long, connect_to_device LoginMode, 2026-04-26 16:53:25 +02:00
bench.mjs test(bench): v5 sweep -- fix set_pou_code params, all 10 cases pass 2026-04-26 19:30:48 +02:00
mock_watcher.py fix(test): retry on PermissionError in mock_watcher (Win race) 2026-04-29 08:34:06 +02:00
test-fixes.mjs fix(create_folder): try project.create_folder(name, SV_POU) first; drop ScriptManager cache 2026-04-26 17:16:44 +02:00
TEST_OVERVIEW.md rename: Codesys-MCP-SP22+ -> Codesys-MCP-SP21+ + multi-install README + missing tools 2026-04-26 22:02:46 +02:00