-
Hi all! I need to send NA values for several J1939 signals from message. NA indicator is signal values with all bits set to 1. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
your signals in question ought to exhibit named values where all bits to are set. You can specify these values to be used by passing a string for the signal's value for import cantools
db = cantools.database.load_file('motohawk.dbc')
msg = db.get_message_by_name('ExampleMessage')
raw_data = message.encode({
'Enable': 'Enabled',
'AverageRadius': 'NotAvailable', # <- all bits 1, needs to be added to the DBC file
'Temperature': 'NotAvailable', # <- same as above
}) Possibly, a more generic mechanism will be added in the future, but in my experience this works rather well.. |
Beta Was this translation helpful? Give feedback.
-
as far as I know it is possible to define some choices besides ranged values. I'm not an expert in DBC, though. (ARXML definitely allows this.) |
Beta Was this translation helpful? Give feedback.
as far as I know it is possible to define some choices besides ranged values. I'm not an expert in DBC, though. (ARXML definitely allows this.)