You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The generation of the Pack functions does not correctly pack CAN messages that contain mutliplex signals and instead packs all the signals in the CAN message regardless of wether they are multiplex values and what the multiplex master signals value is.
This creates a bug where when a user tries to call the generated Pack_ function with a set of signal values set corresponding to a particular master multiplexor signal set then other multiplex signals that where not part of the set will overwrite these values.
Let me show an example:
Below is a .dbc defining an example CAN message with multiplex signals and a multiplex signal master
The above code is packing all the multiplex signals for each byte regardless of the master signal mux_master value!
This problem becomes more apparent when you also enable the
TESTDB_USE_SIGFLOAT section in the above code and it runs for example the
in the above code. This signal due to its -32767 offset will now overwrite all the other signals in the _d[2] (byte 2) of the CAN message regardless of what the multiplex master signal value is. If I want to only send the signals associated with the mux master value of 1 well I can't as the above mux2_sig1_ro value will overwrite the contents of byte2.
The text was updated successfully, but these errors were encountered:
Hello,
The generation of the Pack functions does not correctly pack CAN messages that contain mutliplex signals and instead packs all the signals in the CAN message regardless of wether they are multiplex values and what the multiplex master signals value is.
This creates a bug where when a user tries to call the generated Pack_ function with a set of signal values set corresponding to a particular master multiplexor signal set then other multiplex signals that where not part of the set will overwrite these values.
Let me show an example:
Below is a .dbc defining an example CAN message with multiplex signals and a multiplex signal master
Calling the coderdbc tool generates the following Pack function for this CAN message in the output testdb.c file
generates this in the output file gencode/lib/testdb.c:
The above code is packing all the multiplex signals for each byte regardless of the master signal mux_master value!
This problem becomes more apparent when you also enable the
TESTDB_USE_SIGFLOAT section in the above code and it runs for example the
in the above code. This signal due to its -32767 offset will now overwrite all the other signals in the _d[2] (byte 2) of the CAN message regardless of what the multiplex master signal value is. If I want to only send the signals associated with the mux master value of 1 well I can't as the above mux2_sig1_ro value will overwrite the contents of byte2.
The text was updated successfully, but these errors were encountered: