EcuBus-Pro worker script API — modules re-exported here are bundled into resources/lib/js/index.js
and loaded inside a Node.js worker_thread for diagnostics, panels, and automation scripts.
Remarks
Architecture
Worker thread: user TypeScript/JavaScript runs here with a restricted API surface.
Main process: hardware (CAN, LIN, DoIP, SOME/IP via vSomeIP, etc.) and IPC handlers live here.
Bridge: RPC (postMessage with type: 'rpc') and events (type: 'event') connect the worker to
UdsTester (src/main/workerClient.ts), which dispatches to NodeClass (src/main/nodeItem.ts).
Throughout this folder, public APIs use TSDoc conventions (@param, @returns, @throws, @example,
@remarks, @category, @module) so they render cleanly in TypeDoc and IDE hovers.
Example: Basic script shape
import { Util } from'ecubus-worker'// bundled path depends on your project template
Util.Init(async () => { // runs after worker is wired to the main process })
EcuBus-Pro worker script API — modules re-exported here are bundled into
resources/lib/js/index.jsand loaded inside a Node.jsworker_threadfor diagnostics, panels, and automation scripts.Remarks
Architecture
postMessagewithtype: 'rpc') and events (type: 'event') connect the worker toUdsTester(src/main/workerClient.ts), which dispatches toNodeClass(src/main/nodeItem.ts).Primary entry points
UtilClassoutput,setSignal,setVar, …Documentation tags
Throughout this folder, public APIs use TSDoc conventions (
@param,@returns,@throws,@example,@remarks,@category,@module) so they render cleanly in TypeDoc and IDE hovers.Example: Basic script shape