canmatrix使用
通过canmatrix可以把车厂DBC文件转换成对应json和excel文件
1.安装python-pip
sudo apt-get install python-pip
2.安装依赖包
sudo pip install XlsxWriter xlwt-future
3.更新pip
pip install –upgrade pip
4.安装canmatrix
sudo pip install canmatrix
Collecting canmatrix
Downloading canmatrix-0.6-py2-none-any.whl (82kB)
100% |████████████████████████████████| 92kB 446kB/s
Requirement already satisfied: future in /usr/local/lib/python2.7/dist-packages (from canmatrix)
Installing collected packages: canmatrix
Successfully installed canmatrix-0.6
5.将DBC转换成jaon
canconvert –jsonExportAll bodycan.dbc bodycan.json
6.转换XLSX和XLS
canconvert bodycan.dbc bodycan.xlsx canconvert bodycan.dbc bodycan.xls