API 参考¶
ecu.test 的程序目录在 Help/api 中包含附加文档和示例。目前包含以下内容:
信息
HTML 文档 index.html 作为入口页,可帮助用户在现有文档中便捷导航。
远程控制并自动化 ecu.test¶
在 test case 和 Trace analysis 中获取静态与动态信息¶
Internal API: 可通过
api.访问的 ecu.test Internal API 命令概览Trace Analysis API: 用于在自定义 Python Trace step 模板中控制 ecu.test Trace analysis 的可用命令概览
使用 ecu.test 中的专用对象¶
Advanced operations of package variable types: ecu.test 变量类型的高级操作概览
Advanced properties of bus-related objects: ecu.test 中总线相关对象扩展属性概览
Advanced properties of diagnostics-related objects: ecu.test 中诊断相关对象扩展属性概览
Ethernet API: 用于接收、发送、分析和组装 Ethernet 报文的命令概览
Advanced properties of media-related objects: ecu.test 中媒体相关对象扩展属性概览
Advanced properties of DLT logging-related objects: ecu.test 中 DLT 日志相关对象扩展属性概览
在自定义报告生成器中提取信息¶
Report API: 可在自定义报告生成器中使用的命令概览
为 ecu.test 开发自定义扩展¶
Object API: 用于创建和修改 ecu.test 相关文件的面向对象接口命令概览
Parameter Set Generator API: 面向 Parameter generator for projects(项目参数生成器) 的命令概览
Package Generator API: 面向 Package generator for projects(项目 Package 生成器) 的命令概览
Project Generator API: 面向 Project generator(Project 生成器) 的命令概览
Test management API(测试管理 API):User test management adapter(用户测试管理适配器) 的接口概览
Tools(工具)
UserTool API: 面向 User-defined tools(用户自定义工具) 的命令概览
Model-based Bus Port API: 面向所有支持基于模型总线访问工具的 BusToModelPathResolver 接口说明
UserUtility API: 面向 User-defined utilities(用户自定义实用工具) 的命令概览
ExampleUtilities: 两个示例实用工具,包含源代码和文档,可作为创建实用工具的模板
ecu.test Interface Python Library¶
ecu.test Interface Python Library 提供用于开发自定义 ecu.test 扩展的公共 Python 接口。Python wheel ecutest-interface 位于 <ecu.test installation directory>/res 中。
在 Python 开发环境中使用 pip install <path to wheel> 安装该 wheel。这样在开发自定义扩展时即可获得 IDE 自动补全和类型检查。
已安装的 wheel 也可帮助 AI 生成扩展代码。请明确告知 AI 使用
ecutest-interface 作为其信息来源。
面向 AI 的示例提示词:
Create a parameter set generator for ecu.test.
Use the ecutest-interface library for this.
For instructions, read the README files, docstrings, and type information included
in the library.
The parameter set generator shall ...
包含的接口¶
自定义检查,用于 Package、Project 和 Analysis Package
自定义 Trace 同步,用于 Trace 同步和 Recording 信息