-
Notifications
You must be signed in to change notification settings - Fork 406
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
For Motorola format in DBC, after use canmatrix.formats.loadp function to load, the start_bit are not right #829
Comments
VERSION "" NS_ : BS_: BU_: Bot VCU EPS VDC VIU BO_ 134 Bot_ExtBrkReq: 16 Bot |
{'': CanMatrix(type=<matrix_class.CAN: 1>, attributes={'DBName': 'VCU_Matrix'}, ecus=[Ecu(name='Bot', comment=None), Ecu(name='VCU', comment=None), Ecu(name='EPS', comment=None), Ecu(name='VDC', comment=None), Ecu(name='VIU', comment=None)], frames=[Frame(name='Bot_ExtBrkReq', arbitration_id=ArbitrationId(id=134, extended=False), size=16, transmitters=['Bot'], is_complex_multiplexed=False, is_fd=False, comment='å\x88¶å\x8a¨ç\x94¨ç\x94µå\xad\x90å\x8a©å\x8a\x9bæ³µå¤\x96é\x83¨å\x88¶å\x8a¨è¯·æ±\x82\nBot external brake request', signals=[Signal(name='BotBotBrkPedlPrsd', start_bit=2, size=1, is_little_endian=False, is_signed=False, offset=Decimal('0'), factor=Decimal('1'), unit='', receivers=['VCU', 'VDC'], comment='表å¾\x81驾驶å\x91\x98踩å\x88¶å\x8a¨è¸\x8fæ\x9d¿ç\x9a\x84ä¿¡å\x8f·\nSignal that corrVCUonds to the information if the driver is applying the brake pedal', multiplex=None, mux_value=None, is_float=False, is_ascii=False, type_label='', enumeration=None, comments={}, attributes={'GenSigStartValue': '0', 'GenSigSendType': 'Cyclic'}, values={0: 'False', 1: 'True'}, mux_val_grp=[], muxer_for_signal=None, calc_min_for_none=True, calc_max_for_none=True, cycle_time=0, initial_value=Decimal('0'), min=Decimal('0'), max=Decimal('1')), Signal(name='BotBotBrkPedlPrsdVldy', start_bit=0, size=2, is_little_endian=False, is_signed=False, offset=Decimal('0'), factor=Decimal('1'), unit='', receivers=['VCU', 'VDC'], comment='驾驶å\x91\x98å\x88¶å\x8a¨è¸\x8fæ\x9d¿ä¿¡å\x8f·æ\x9c\x89æ\x95\x88æ\x80§\nQualifier for sigEbbBrkPedlPrsd', multiplex=None, mux_value=None, is_float=False, is_ascii=False, type_label='', enumeration=None, comments={}, attributes={'GenSigStartValue': '0', 'GenSigSendType': 'Cyclic'}, values={0: 'Not initialized', 1: 'Normal', 2: 'Faulty', 3: 'Reserved'}, mux_val_grp=[], muxer_for_signal=None, calc_min_for_none=True, calc_max_for_none=True, cycle_time=0, initial_value=Decimal('0'), min=Decimal('0'), max=Decimal('3')), Signal(name='BotBotPedlTrvlOutpDrvr', start_bit=8, size=12, is_little_endian=False, is_signed=True, offset=Decimal('-5'), factor=Decimal('0.015625'), unit='mm', receivers=['VCU', 'VDC'], comment='表å¾\x81驾驶å\x91\x98å\x88¶å\x8a¨è¯·æ±\x82ç\x9a\x84æ\x8e¨æ\x9d\x86è¡\x8cç¨\x8b\nSignal that corrVCUonds to the driver brake request', multiplex=None, mux_value=None, is_float=False, is_ascii=False, type_label='', enumeration=None, comments={}, attributes={'GenSigStartValue': '0', 'GenSigSendType': 'Cyclic'}, values={4095: 'Init/Error'}, mux_val_grp=[], muxer_for_signal=None, calc_min_for_none=True, calc_max_for_none=True, cycle_time=0, initial_value=Decimal('-5.000000'), min=Decimal('-5'), max=Decimal('47')), Signal(name='BotBotBrkPedlTrvlOutp', start_bit=20, size=12, is_little_endian=False, is_signed=False, offset=Decimal('-5'), factor=Decimal('0.015625'), unit='mm', receivers=['VCU', 'VDC'], comment='表å¾\x81å®\x9eé\x99\x85æ\x8e¨å\x8a¨æ¶²å\x8e\x8bæµ\x81é\x87\x8fç\x9a\x84æ\x8e¨æ\x9d\x86è¡\x8cç¨\x8b\nSignal that represents the actual shifted hydraulic volume', multiplex=None, mux_value=None, is_float=False, is_ascii=False, type_label='', enumeration=None, comments={}, attributes={'GenSigStartValue': '0', 'GenSigSendType': 'Cyclic'}, values={4095: 'Init/Error'}, mux_val_grp=[], muxer_for_signal=None, calc_min_for_none=True, calc_max_for_none=True, cycle_time=0, initial_value=Decimal('-5.000000'), min=Decimal('-5'), max=Decimal('47')), Signal(name='BotBotBrkPedlTrvlOutpVldy', start_bit=38, size=2, is_little_endian=False, is_signed=False, offset=Decimal('0'), factor=Decimal('1'), unit='', receivers=['VCU', 'VDC'], comment='EbbBrkPedlTrvlOutpä¿¡å\x8f·æ\x9c\x89æ\x95\x88æ\x80§\nQualifier for sigEbbBrkPedlTrvlOutp', multiplex=None, mux_value=None, is_float=False, is_ascii=False, type_label='', enumeration=None, comments={}, attributes={'GenSigStartValue': '0', 'GenSigSendType': 'Cyclic'}, values={0: 'Not initialized', 1: 'Normal', 2: 'Faulty', 3: 'Reserved'}, mux_val_grp=[], muxer_for_signal=None, calc_min_for_none=True, calc_max_for_none=True, cycle_time=0, initial_value=Decimal('0'), min=Decimal('0'), max=Decimal('3')), Signal(name='BotBotPedlTrvlOutpDrvrVldy', start_bit=36, size=2, is_little_endian=False, is_signed=False, offset=Decimal('0'), factor=Decimal('1'), unit='', receivers=['VCU', 'VDC'], comment='EbbBrkPedlTrvlOutpDrvrä¿¡å\x8f·æ\x9c\x89æ\x95\x88æ\x80§\nQualifier for sigEbbBrkPedlTrvlOutpDrvr', multiplex=None, mux_value=None, is_float=False, is_ascii=False, type_label='', enumeration=None, comments={}, attributes={'GenSigStartValue': '0', 'GenSigSendType': 'Cyclic'}, values={0: 'Not initialized', 1: 'Normal', 2: 'Faulty', 3: 'Reserved'}, mux_val_grp=[], muxer_for_signal=None, calc_min_for_none=True, calc_max_for_none=True, cycle_time=0, initial_value=Decimal('0'), min=Decimal('0'), max=Decimal('3')), Signal(name='BotBotExtReqSts', start_bit=46, size=2, is_little_endian=False, is_signed=False, offset=Decimal('0'), factor=Decimal('1'), unit='', receivers=['VCU', 'VDC'], comment='eBoosterå¤\x96é\x83¨å\x88¶å\x8a¨è¯·æ±\x82å\x8a\x9fè\x83½ç\x8a¶æ\x80\x81\nSignal to indicate that an external brake request can be executed by the eBooster', multiplex=None, mux_value=None, is_float=False, is_ascii=False, type_label='', enumeration=None, comments={}, attributes={'GenSigStartValue': '0', 'GenSigSendType': 'Cyclic'}, values={0: 'Not initialized', 1: 'Not available', 2: 'Available', 3: 'Reserved'}, mux_val_grp=[], muxer_for_signal=None, calc_min_for_none=True, calc_max_for_none=True, cycle_time=0, initial_value=Decimal('0'), |
Hi @CXZ1988 , the motorola startbit is arbitrariness of candb++. I just discussed it here: #821 to get the same startbit as candb++ shows you (with default settings) just use there is also information about byte-order and starbits here: |
Hello @ebroecker , |
Based on the Vector_DBC_File_Format_Documentation PDF, there is one point:
start_bit = unsigned_integer ;
The start_bit value specifies the position of the signal within the data field of the frame.
For signals with byte order Intel (little endian) the position of the least-significant bit is given.
For signals with byte order Motorola (big endian) the position of the most significant bit is given.
For Motorola format DBC, the start_bit value from the Class CanMatrix(after use canmatrix.formats.loadp to load one DBC) seems not right.
See below two comments for an example:
don't know where this start_bit=8 come from(calculated or from the original DBC), but it is wrong per my understand.
Sorry that I just add two comments below for your references. 1st one can save as *.dbc and be opened. 2nd one is partly from canmatrix.formats.loadp function.
The text was updated successfully, but these errors were encountered: