Closed v0-e closed 5 months ago
Thank you for your issue. I'll add a compilation option to suppress all identifier conversions beyond the necessary -
-> _
replacement in the next release. Further along, rasn
will probably move towards some kind of annotation in order to conserve the original identifier in the rust bindings (something along the lines of #[identifier="stationID"]
).
As of release 0.1.2, the compiler generates the appropriate identifier
annotation. I agree that further along, the identifier conversion should become configurable, but let's leave that for another PR.
Hi @6d7a, Just want to start by saying a big thank you for the awesome work on the compiler!
On the issue, the compiler is currently replacing uppercase letters of ASN.1 identifiers to an underscore and the respective lowercase. For example the ETSI ITS ItsPduHeader is currently compiled into (using https://librasn.github.io):
That is,
protocolVersion
is converted toprotocol_version
,messageID
tomessage_i_d
, andstationID
tostation_i_d
. In the current JER implementation,rasn
uses the struct field names to encode the JSON names of name/value pairs. Instead of,we have,
Which goes a bit against X.697 27.3.2 a) 2021.
Could we add an option, or disable the conversion altogether, to preserve the original ASN.1 identifiers format in the compiler?