The doIt.sh
script will copy the generated C code for the specified year into the asn1c_combined
directory. It will also compile the example converter program.
This script expects the necessary files to have already been generated by the generate-files.sh
script.
The necessary files can be generated using the generate-files.sh
script. This script will reference the necessary ASN.1 files from the j2735-asn-files
directory from the specified year and generate the C code in the generated-files
directory.
The generate-files.sh
script requires the asn1c
compiler to be installed. The asn1c
compiler can be installed in WSL using the following commands:
cd ./usdot-asn1c
aclocal
test -f configure || autoreconf -iv
./configure
make
sudo make install
The 'j2735-asn-files' subdirectory should contain the ASN.1 files for the J2735 standard. These are organized by year.
The generate-files.sh
script will reference the necessary files from the j2735-asn-files
directory when generating the C code.
Redistribution of the ASN files is not permitted, so they are not included in this repository. You must obtain them from SAE and place them in the j2735-asn-files
directory under the appropriate year subdirectory.
A table of the ASN files for each year is provided below.
Year | Source |
---|---|
2016 | https://www.sae.org/standards/content/j2735set_201603/ |
2020 | https://www.sae.org/standards/content/j2735set_202007/ |
The doIt.sh
and generate-files.sh
scripts uses the following environment variables:
J2735_YEAR
- The year of the J2735 standard to use. For example,2020
.
The following compile flags must be set for the converter-example.c to compile (whether you need this or not is another story).
- -DPDU= // this allows the #ifndef statements in the above c file to work correctly.
- -DASN_PDU_COLLECTION // if you have several message types you want to use.