README.md
1# h2idl工具使用手册
2
3- [工具简介](#工具简介)
4 - [用途](#用途)
5 - [需求背景](#需求背景)
6- [工具使用](#工具使用)
7 - [安装python](#安装python)
8 - [使用方法](#使用方法)
9 - [参数说明](#参数说明)
10 - [命令举例](#命令举例)
11
12
13## 工具简介
14### 用途
15
16本工具用于将C/C++头文件(.h)转换为接口描述文件(.idl)
17
18### 需求背景
19
20对于存量接口或者已有C/C++接口,开发者期望能提供工具可以自动将C/C++头文件转换为idl文件,以提高HDI开发效率。
21
22## 工具使用
23### 安装python
24本工具需要安装python 3.8及以上版本,请根据环境选择下载对应的安装包。Python下载地址:https://www.python.org/downloads/
25
26### 使用方法
27
28```bash
29python idl_generator.py -f <*.h> -o <directory>
30```
31
32### 参数说明
33```
34 -h, --help show this help message and exit
35 -v, --version Display version information
36 -f <*.h>, --file <*.h>
37 Compile the C/C++ header file
38 -o <directory>, --out <directory>
39 Place generated .idl files into the <directory>
40```
41
42### 命令举例
43```bash
44python idl_generator.py -f ./h/audio/audio_adapter.h -o out
45```