aboutsummaryrefslogtreecommitdiffstats
path: root/mock-server/MockServer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename demo/ → jetting-interface/, mock-server/ → mock-jetting-controller/Thomas Vanbesien2026-03-231-541/+0
| | | | | Executables: QtXpl2Demo → JettingInterfaceDemo, Xpl2MockServer → MockJettingController. Dev log prefixes: "Demo" → "JI", "MockServer" → "MockJC". Window title → "Jetting Interface".
* Invert TCP connection model: client listens, server connectsThomas Vanbesien2026-03-231-168/+188
| | | | | | | | | | The XPL2 protocol specifies that the JI2 controller initiates connections to the client, not the other way around. Xpl2Client now listens on 3 ports via QTcpServer and accepts inbound connections; MockServer connects out with auto-retry on the 1s KA_PING tick. QML API: startListening/stopListening, listening+connected properties, host property removed. Mock server gains --host CLI arg.
* Imaging (m/n) commands: start/stop, masks, image count, n replyThomas Vanbesien2026-03-161-0/+50
|
* EV_ events with Q_GADGET status types, mock periodic emission, tabbed demo UIThomas Vanbesien2026-03-161-1/+105
|
* CF_ configuration commands with JettingParamsResult and SetterResult enumsThomas Vanbesien2026-03-161-0/+95
|
* CN_ control commands: typed API, dispatch, mock responses, demo UIThomas Vanbesien2026-03-161-0/+103
|
* GS_PH_VERSION command, per-printhead demo UI with --printheads CLI argThomas Vanbesien2026-03-161-0/+13
| | | | | | | | | | Add getPhVersion(printheadId) to Xpl2Client with phVersionReceived signal carrying all 8 response fields. Mock server echoes canned version data for any requested printhead ID. Demo app accepts --printheads N (default 10) to simulate N printheads. The UI shows a scrollable per-PH list with individual and bulk version query buttons, updating each row's version info on response.
* Unified socket slots, --wire-debug CLI flag, fix mock TX and disconnect loggingThomas Vanbesien2026-03-131-28/+62
| | | | | | | | Collapse 12 per-socket slots into 4 sender()-based slots. Replace runtime wireDebug QML property with static --wire-debug CLI flag on both demo and mock server. Route MockServer::sendKaPing through sendReply so KA_PING TX shows wire bytes. Simplify sendReply to deduce command token from wire data. Fix Xpl2Client disconnect logging (logTag takes pointer, null-sender fallback).
* Coalesce mock server into single MockServer classThomas Vanbesien2026-03-131-0/+122
Replace three independent EchoServer instances with one MockServer that owns three QTcpServers, shares a single KA_PING timer, and uses a flat client list with localPort() for port resolution.