# Ecb Typescript

> Write TypeScript code for EcuBus-Pro (ECB) automotive diagnostics. Provides API reference for UDS, CAN, LIN, DoIP, SOME/IP, CRC, Crypto, SerialPort, and test framework. Use when writing ECB scripts, working with automotive protocols, or developing diagnostic services. Use when this capability is needed.

- Skill: `tomevault-io/ecb-typescript` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/ecb-typescript`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/ecb-typescript/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/ecb-typescript

---


# ECB TypeScript Development

## API Reference

**Read the type definitions from `node_modules/@types/ECB/` to get accurate API information and code examples.**

### Type Definition Files

| File | Content |
|------|---------|
| `index.d.ts` | Main exports, global `Util` instance |
| `uds.d.ts` | UDS services (DiagRequest, DiagResponse), CAN/LIN/DoIP/SOMEIP types, test framework, signals, variables, SerialPort |
| `crc.d.ts` | CRC class and built-in CRC algorithms |
| `cryptoExt.d.ts` | CMAC function |
| `secureAccess.d.ts` | SecureAccessDll class for security key generation |
| `utli.d.ts` | HexMemoryMap and S19MemoryMap classes |

### Workflow

1. Read the relevant `.d.ts` files to understand available APIs and see JSDoc examples
2. Write code based on the type definitions
3. Import from `'ECB'` module

### Key Points

- Use `Util.Init(fn)` for initialization code
- Use `Util.End(fn)` for cleanup code  
- Use `Util.Register(jobName, fn)` to register job handlers
- Use `Util.On*()` methods for event handling (CAN, LIN, Signal, Key, Var)
- `process.env.PROJECT_ROOT` provides the ECB project root path
- Service/Job names follow `TesterName.ServiceName` format

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/ecubus) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

