translate_pdu - AboudyKreidieh/truck-code GitHub Wiki

The translate_pdu process is responsible for post-processing messages that have been collected during the logging process into a format that is human-interpretable. This is to assist in the analysis of vehicle performance during the research and development procedure, and to facilitate the procedure of debugging the device during production from the perspective of the internal vehicle properties communicated via the J-bus.

As discussed in this page, messages are provided by the J-bus as generic PDU-formatted messages, which serve as a compact form of passing vehicle state information. This is also the format that the messages are logged and stored. An example of a logged file can be seen in the figure below.

In order to transform the messages in the file into the formats described here, the translate_pdu can be called as follows:

./translate_pdu INFILE -o OUTFILE

This takes the path to the above file as an input and creates an output file in the path OUTFILE (defaulted to j1939_output.txt) of the form seen in the figure below:

If, alternatively, you would like to return the messages in a slightly more compact format where the names of each element is not returned, this can be done by adding a -n flag to the command:

./translate_pdu INFILE -o OUTFILE -n

The resulting file can be seen in the figure below:

Return to Software Processes