Giter Site home page Giter Site logo

canmatrix's Introduction

##Canmatrix is a python package to read and write several CAN database formats.##

###About

Canmatrix implements a "Python Can Matrix Object" which describes the can-communication and the needed objects (Boardunits, Frames, Signals, Values, ...) Canmatrix also includes two Tools (canconvert and cancompare) for converting and comparing CAN databases.

There is some outdated german Documentation and windows ".exe" of both scripts at my personal homepage There are several importers (read) and exporters (write) for this object.

supported file formats for import:

  • .dbc candb / Vector
  • .dbf Busmaster (open source!)
  • .kcd kayak (open source!)
  • .arxml autosar system description
  • .yaml dump of the python object
  • .xls(x) excel xls-import, works with .xls-file generated by this lib
  • .sym peak pcan can description

supported file formats for export:

  • .dbc
  • .dbf
  • .kcd
  • .xls(x)
  • .json Canard (open source!)
  • .arxml (very basic implementation)
  • yaml (dump of the python object)
  • sym

###Install instructions Install canmatrix with either "pip install canmatrix" or "python setup.py install"

This installs the canmatrix package into your python installation.

In addition to the canmatrix package there are 2 scripts installed with this package:

  1. canconvert:

    converts CAN database formats between all supported formats.

    Example: "canconvert someArSystemdescription.arxml file.dbc"

  2. cancompare:

    compares 2 CAN databases (of different or same format).

    Example: "cancompare file1.dbc file2.dbc"

If you are using a *NIX-System, these scripts should be callable from command line

If you are using a Windows system, these scripts are usually installed at the location of your python installation. For example 'C:\python3.4\Scripts' or 'C:\python2.7\Scripts'


###Dependencies

Canmatrix depends on:


###Examples

There are some example python scripts in the example-folder

examples/convert.py some-matrix.dbc some-matrix.dbf examples/convert.py some-matrix.arxml some-matrix.dbc


###Fileformats

  • all formats support im-/export of signals and frames

  • dbc:

    --dbcImportEncoding

                      Import charset of dbc (relevant for units), maybe
                      utf-8 default iso-8859-1
    

    --dbcImportCommentEncoding

                      Import charset of Comments in dbc default iso-8859-1
    

    --dbcExportEncoding

                      Export charset of dbc (relevant for units), maybe
                      utf-8 default iso-8859-1
    

    --dbcExportCommentEncoding

                      Export charset of comments in dbc default iso-8859-1
    

    --dbcCharset=CHARSET

                      set charset for dbc-file
    

    --dbcCommentCharset=CHARSET

                      set charset for comments in dbc-file 
    
  • dbf:

    --dbfImportEncoding

                      Import charset of dbf, maybe utf-8 default iso-8859-1
    

    --dbfExportEncoding

                      Export charset of dbf, maybe utf-8 default iso-8859-1
    
  • sym:

    --symImportEncoding

                      Import charset of sym format, maybe utf-8 default
                      iso-8859-1
    

    --symExportEncoding

                      Export charset of sym format, maybe utf-8 default
                      iso-8859-1
    
  • xls(x):

    --xlsMotorolaBitFormat

                      Excel format for startbit of motorola coded signals
                      Valid values: msb, lsb, msbreverse default msbreverse
    

more about starbits...

  • arxml
  • yaml
  • json
  • kdc
  • csv

Export

Format ECUs Mux S/R of Signal Cycletype Cycletime Baudrate Extended Byteorder scaling min/max attributes value tables signal groups
arxml + + + +
dbc + + + + + + + + + + + +
dbf + + + + + + + + + + +
json +
kcd + + + + + +
sym + + + + + +
xls(x) + + + + + + + + +
csv + + + + + + + + * +

Import

Format ECUs Mux S/R of Signal Cycletype Cycletime Baudrate Extended Byteorder scaling min/max attributes value tables signal groups
arxml + + + + + + + + + + + +
dbc + + + + + + + + + + + +
dbf + + + + + + + + + + +
kcd + + + + +
sym + + + + + +
xls(x) + + + + + + p p p

Have Fun,

feel free to contact me for any suggestions

Eduard

canmatrix's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.