Skip to content

feat: add CAN-TP worker API and can_tp example#376

Merged
frankie-zeng merged 1 commit into
ecubus:masterfrom
crazy0104:can_tp
May 30, 2026
Merged

feat: add CAN-TP worker API and can_tp example#376
frankie-zeng merged 1 commit into
ecubus:masterfrom
crazy0104:can_tp

Conversation

@crazy0104
Copy link
Copy Markdown
Contributor

Expose ISO 15765-2 transport layer to worker scripts via four new functions: CanTpCreateConnection, CanTpSendData, CanTpRecvData and CanTpCloseConnection. Connections are managed per-node in NodeClass and cleaned up automatically on close.

Also adds resources/examples/can_tp — a simulate-device example with a Tester node (CanTp* API) and an ECU node (Util.OnCan + output()), covering SF and MF transfers up to 500 bytes.

Changes:

  • src/main/worker/cantp.ts: new worker-side API module
  • src/main/worker/index.ts: export into worker bundle
  • src/main/workerClient.ts: canApi handler return type -> Promise
  • src/main/nodeItem.ts: implement canApi(), manage cantpSocketMap
  • resources/examples/can_tp/: example project with README (en/zh)

Expose ISO 15765-2 transport layer to worker scripts via four new
functions: CanTpCreateConnection, CanTpSendData, CanTpRecvData and
CanTpCloseConnection. Connections are managed per-node in NodeClass
and cleaned up automatically on close.

Also adds resources/examples/can_tp — a simulate-device example with
a Tester node (CanTp* API) and an ECU node (Util.OnCan + output()),
covering SF and MF transfers up to 500 bytes.

Changes:
- src/main/worker/cantp.ts: new worker-side API module
- src/main/worker/index.ts: export into worker bundle
- src/main/workerClient.ts: canApi handler return type -> Promise<any>
- src/main/nodeItem.ts: implement canApi(), manage cantpSocketMap
- resources/examples/can_tp/: example project with README (en/zh)
@frankie-zeng frankie-zeng self-requested a review May 30, 2026 13:16
@frankie-zeng frankie-zeng merged commit 43ffaf0 into ecubus:master May 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants