Coder Social home page Coder Social logo

use Canmatrix create dbc about canmatrix HOT 7 OPEN

maxceng avatar maxceng commented on May 26, 2024
use Canmatrix create dbc

from canmatrix.

Comments (7)

ebroecker avatar ebroecker commented on May 26, 2024

Hi @maxceng

https://github.com/ebroecker/canmatrix/wiki/signal-Byteorder:

little endian == Intel == MOST-SIGNIFICANT-BYTE-LAST
big endian == Motorola == MOST-SIGNIFICANT-BYTE-FIRST

is_litte_endian = False means "big endian" means Motorola
which seems correct to me.

Could you provide an example?

from canmatrix.

maxceng avatar maxceng commented on May 26, 2024

from canmatrix.

ebroecker avatar ebroecker commented on May 26, 2024

Hi @maxceng

I still cannot reproduce the issue.

Look at following code:

import canmatrix

network = canmatrix.CanMatrix()

sig_name = "my_name"
sig_comment  = "my_comment"
sig_name2 = "my_name2"
signal = canmatrix.Signal(name=sig_name, comments=sig_comment, is_little_endian=True)
signal2 = canmatrix.Signal(name=sig_name, comments=sig_comment, is_little_endian=False)

network.add_signal(signal)
network.add_signal(signal2)


canmatrix.formats.dumpp({"": network}, "output.dbc", "dbc")

which produces:

VERSION "created by canmatrix"


NS_ :

BS_:

BU_: 


BO_ 3221225472 VECTOR__INDEPENDENT_SIG_MSG: 0 Vector__XXX
 SG_ my_name0 : 0|0@1- (1,0) [0|0] "" Vector__XXX
 SG_ my_name1 : 7|0@0- (1,0) [0|0] "" Vector__XXX

This seems ok for me: @1 vs. @0.

Could you please provide more detail, what is going wrong at your side?
Thanks

from canmatrix.

maxceng avatar maxceng commented on May 26, 2024

from canmatrix.

maxceng avatar maxceng commented on May 26, 2024

from canmatrix.

ebroecker avatar ebroecker commented on May 26, 2024

Hi @maxceng

you need only to give the export-encoding:

canmatrix.formats.dumpp({"":network}, "output.dbc", "dbc", dbcExportEncoding="utf8")

from canmatrix.

maxceng avatar maxceng commented on May 26, 2024

from canmatrix.

Related Issues (20)

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.