Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the output of human opposite to that of cantools? #154

Open
guoh27 opened this issue Nov 6, 2024 · 1 comment
Open

Why is the output of human opposite to that of cantools? #154

guoh27 opened this issue Nov 6, 2024 · 1 comment

Comments

@guoh27
Copy link

guoh27 commented Nov 6, 2024

The DBC:

VERSION ""


NS_ : 
	NS_DESC_
	CM_
	BA_DEF_
	BA_
	VAL_
	CAT_DEF_
	CAT_
	FILTER
	BA_DEF_DEF_
	EV_DATA_
	ENVVAR_DATA_
	SGTYPE_
	SGTYPE_VAL_
	BA_DEF_SGTYPE_
	BA_SGTYPE_
	SIG_TYPE_REF_
	VAL_TABLE_
	SIG_GROUP_
	SIG_VALTYPE_
	SIGTYPE_VALTYPE_
	BO_TX_BU_
	BA_DEF_REL_
	BA_REL_
	BA_DEF_DEF_REL_
	BU_SG_REL_
	BU_EV_REL_
	BU_BO_REL_
	SG_MUL_VAL_

BS_:

BU_: New_Node_1

BO_ 0 New_Message_1: 8 New_Node_1
 SG_ New_Signal_8 : 56|8@1- (1,0) [-128|127] "" Vector__XXX
 SG_ New_Signal_7 : 48|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_6 : 40|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_5 : 32|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_4 : 24|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_3 : 16|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_2 : 8|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_1 : 7|8@0- (1,0) [-128|127] "xx" Vector__XXX



BA_DEF_  "MultiplexExtEnabled" ENUM  "No","Yes";
BA_DEF_  "BusType" STRING ;
BA_DEF_DEF_  "MultiplexExtEnabled" "No";
BA_DEF_DEF_  "BusType" "CAN";

dbcparser format human output

Name:       New_Message_1
  ID:         0x0
  Length:     0x8
  Sender:     New_Node_1
  Layout:
                          Bit
             7   6   5   4   3   2   1   0
           +---+---+---+---+---+---+---+---+
         0 |--x|   |   |   |   |   |   |   |
           +---+---+---+---+---+---+---+---+
             +-- New_Signal_1                            
           +---+---+---+---+---+---+---+---+
         1 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_2
           +---+---+---+---+---+---+---+---+
         2 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_3
           +---+---+---+---+---+---+---+---+
         3 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_4
           +---+---+---+---+---+---+---+---+
         4 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_5
           +---+---+---+---+---+---+---+---+
         5 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_6
           +---+---+---+---+---+---+---+---+
         6 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_7
           +---+---+---+---+---+---+---+---+
         7 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_8

cantools dump output

Name:           New_Message_1
  Id:             0x0
  Length:         8 bytes
  Cycle time:     - ms
  Senders:        New_Node_1
  Layout:

                          Bit

             7   6   5   4   3   2   1   0
           +---+---+---+---+---+---+---+---+
         0 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_1
           +---+---+---+---+---+---+---+---+
         1 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
             +-- New_Signal_2
           +---+---+---+---+---+---+---+---+
         2 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
             +-- New_Signal_3
           +---+---+---+---+---+---+---+---+
         3 |<-----------------------------x|
     B     +---+---+---+---+---+---+---+---+
     y       +-- New_Signal_4
     t     +---+---+---+---+---+---+---+---+
     e   4 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
             +-- New_Signal_5
           +---+---+---+---+---+---+---+---+
         5 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
             +-- New_Signal_6
           +---+---+---+---+---+---+---+---+
         6 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
             +-- New_Signal_7
           +---+---+---+---+---+---+---+---+
         7 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
             +-- New_Signal_8

Is the

           +---+---+---+---+---+---+---+---+
         0 |--x|   |   |   |   |   |   |   |
           +---+---+---+---+---+---+---+---+
             +-- New_Signal_1 

right?

@guoh27
Copy link
Author

guoh27 commented Nov 6, 2024

This dbc is actually overlapping, but output seems no problem.

BO_ 0 New_Message_1: 8 New_Node_1
 SG_ New_Signal_8 : 56|8@1- (1,0) [-128|127] "" Vector__XXX
 SG_ New_Signal_7 : 48|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_6 : 40|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_5 : 32|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_4 : 24|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_3 : 16|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_2 : 8|8@1- (1,0) [-128|127] "xx" Vector__XXX
 SG_ New_Signal_1 : 0|8@0- (1,0) [-128|127] "xx" Vector__XXX
 Name:       New_Message_1
  ID:         0x0
  Length:     0x8
  Sender:     New_Node_1
  Layout:
                          Bit
             7   6   5   4   3   2   1   0
           +---+---+---+---+---+---+---+---+
         0 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_1
           +---+---+---+---+---+---+---+---+
         1 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_2
           +---+---+---+---+---+---+---+---+
         2 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_3
           +---+---+---+---+---+---+---+---+
         3 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_4
           +---+---+---+---+---+---+---+---+
         4 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_5
           +---+---+---+---+---+---+---+---+
         5 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_6
           +---+---+---+---+---+---+---+---+
         6 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_7
           +---+---+---+---+---+---+---+---+
         7 |<-----------------------------x|
           +---+---+---+---+---+---+---+---+
                                         +-- New_Signal_8

the New_Signal_1 is Big Endian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant