Open BrandtHill opened 3 years ago
Key: Your proposed solution is correct and will interoperate with others (which is the key thing). This is the preferred method to solve name conflicts of this type (asn1c is prone to this while ASN tools are not).
Extra credit would be to send an eMail to SAE corporate showing what you did and recommending that the relevant committee consider to rename to new type to be 'RwmSnapShot' (look at the first couple of pages of the standard for details).
In this standard (SAE J2945/3) SAE used a new editor who had a bit less experience in ASN and in checking his work. In prior SAE J2735 standards and other prior volumes of SAE J2945/x the editor (myself) would cross check to detect and correct such dupes as well as looking at other "ITS" standards for similar content. Also be mindful that this specific standard does not follow the common name space and module naming rules used for 15+ years in other ITS/DSRC work of the time (from SAE, IEEE, NMEA, and others).
I have found a workaround, but I still believe it's an issue, so creating one here.
Background
Following the example in
examples/sample.source.J2735
, one can create source files for the SAE J2735 DSRC Message Set as well as an executable utilty,j2735-dump
, which allows the encoding/decoding of J2735 payloads.Another standard exists, SAE J2945. This document/standard, J2945/3, defines a new message type: the
RoadWeatherMessage
, orRWM
for short. Annex I in the document provides an ASN1 definition for theRoadWeatherMessage
and Annex J provides instruction on how to edit the J2735 v2016 ASN1 file to include the newRoadWeatherMessage
type as a possible data type forMessageFrame
and a few additional, optional fields for theTravelerInformation
.Upon editing the
J2735_201603.asn1
file, your file should contain a newRoadWeatherMessage
module and a handful of additions to theDSRC
module.Compilation Issue
Before editing the asn1 file, I made a copy at
J2735_201603_original.asn1
. By editing theMakefile
to use this original file instead, I ranmake
and the result is as expected: an executablej2735-dump
that functions correctly.Now, while pointing the
Makefile
back to the editedasn1
file, (runningmake distclean
first) an errors occurs at theProbeVehicleData
point:What I think is happening
In the existing
DSRC
module, a typeSnapshot
exists:This type is only used once, in ProbeVehicleData (where the compilation error occurs):
The additional
RoadWeatherMessage
module brings a new typeSnapShot
:The issue seems to be due to the similarly named types that differ only the capitalization of the second 's'.
My workaround
The new
SnapShot
type is referenced only three times: its definition and two members. I changedSnapShot
toRwmSnapShot
by editing the following linesAfter changing the name to avoid conflict, the compilation is successful.
Is the library case insensitive? Is this a known issue/limitation?