Skip to Content

CAPL to EcuBus-Pro Script (TypeScript)

In the automotive testing and diagnostics domain, CAPL (CANoe Programming Language) has long been an important tool for developing test automation scripts. It boasts powerful capabilities and a mature user base within the Vector CANoe ecosystem. However, as test scenarios diversify, cross-platform requirements increase, and the demand for greater flexibility and maintainability grows, is there an alternative solution?

EcuBus-Pro’s answer is to write scripts with TypeScript. EcuBus-Pro scripts use TypeScript as the development language and embrace modern software engineering practices. Compared with CAPL, TypeScript offers a richer ecosystem, greater extensibility, and native compatibility with DevOps workflows.

EcuBus-Pro Script IntelliSense

Because EcuBus-Pro scripts use TypeScript as the development language, you get type-based IntelliSense provided by the TypeScript type system.

Signal IntelliSense

CAPL vs EcuBus-Pro Script Syntax Comparison

INFO

Continuously updated. For more script APIs, see the API

FeatureCAPL ExampleEcuBus-Pro Script Example (TypeScript)
Type checkingWeak typing, no compile-time checksStrong typing, IDE hints + compile-time checks
Libraries & extensionsBuilt into the Vector environmentNPM ecosystem with abundant third-party libraries
Variable declarationint counter = 0;let counter: number = 0;
Print logswrite("Hello CAPL");console.log("Hello EcuBus-Pro");
Message receive eventon message CAN1.MyMsg{ write("Received");}Util.OnCan(0x1, (msg) => { console.log("Received");});
Event callbackon key 'a' { ... }Util.OnKey('a', () => { ... });
Variable watchon envVar EnvChecksumError { ... }Util.OnVar('EnvChecksumError', () => { ... });

Examples

Examples are continuously being improved; contributions are welcome.

  1. Monitor signal changes and print time intervals
  2. Monitor variable changes, send a LIN signal, and manually set an incorrect checksum