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
Hello, I'm trying to compile two C-ITS message formats for Europe: DENM (version 1.3.1) and IVIM (version 1.3.1). I found all the ASN files (see attachments) and I have some examples in hexadecimal format (which I converted in binary files, see attachments).
If I compile only the DENM (with requested ASNs) or IVIM I can decode the messages without problems, but if I try to compile both messages (separated or all in the same folder), I can't decode DENM messages.
I think that a possible problem is related to one specific ASN: ITS-Container, to compile IVIM I have to use 2 different versions of this ASN, I have this error but it seems working.
WARNING: ASN.1 module ITS-Container is defined more than once, with different OIDs in ../asn_files/ITS-Container_old.asn
FATAL: Name "e_ITS_Container_CenDsrcTollingZoneID" is generated by ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container.asn:505 and ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container_old.asn:501
FATAL: Name "enum ITS_Container_CenDsrcTollingZoneID" is generated by ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container.asn:505 and ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container_old.asn:501
FATAL: Name "ITS_Container_CenDsrcTollingZoneID_PR" is generated by ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container.asn:505 and ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container_old.asn:501
FATAL: Name "enum ITS_Container_CenDsrcTollingZoneID_PR" is generated by ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container.asn:505 and ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container_old.asn:501
FATAL: Name "struct ITS_Container_CenDsrcTollingZoneID" is generated by ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container.asn:505 and ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container_old.asn:501
FATAL: Name "ITS_Container_CenDsrcTollingZoneID" is generated by ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container.asn:505 and ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container_old.asn:501
FATAL: ... 793 more name clashes not shown
FATAL: Name clashes encountered even with -fcompound-names flag
To compile I use this command:
asn1c -fcompound-names -findirect-choice -fincludes-quoted -no-gen-example -pdu=DENM -pdu=all *.asn for DENM (in the folder there are only the DENM related ASN.1)
asn1c -fcompound-names -findirect-choice -fincludes-quoted -no-gen-example -pdu=IVIM -pdu=all *.asn for IVIM (in the folder there are only the IVIM related ASN.1)
FATAL: Name "e_ITS_Container_CenDsrcTollingZoneID" is generated by ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container.asn:505 and ITS-Container.CenDsrcTollingZoneID at line ../asn_files/ITS-Container_old.asn:501
Try compiling DENM and IVIM asn.1 files with different -fprefix parameter, see #170. Compile them separately into two static or dynamic libraries (.so/.a) and then link them to your decoder.
I think @velichkov gave the complete solution. #170 allows both using -fprefix command-line parameter, and ASN1C_PREFIX env var.
@danielfacchetti Please report your results here. Note that in the unlikely case of the above not solving your problem - your only (AFAIK) other option would be to manually edit generated .c and .h files to resolve name collisions.
Hi @velichkov and @mouse07410 : thank you so much for the reply. I tried with the -fprefix parameter and now I can use both the message profiles. So no problem with the library (very good!)
Hello, I'm trying to compile two C-ITS message formats for Europe: DENM (version 1.3.1) and IVIM (version 1.3.1). I found all the ASN files (see attachments) and I have some examples in hexadecimal format (which I converted in binary files, see attachments).
If I compile only the DENM (with requested ASNs) or IVIM I can decode the messages without problems, but if I try to compile both messages (separated or all in the same folder), I can't decode DENM messages.
I think that a possible problem is related to one specific ASN: ITS-Container, to compile IVIM I have to use 2 different versions of this ASN, I have this error but it seems working.
To compile I use this command:
asn1c -fcompound-names -findirect-choice -fincludes-quoted -no-gen-example -pdu=DENM -pdu=all *.asn
for DENM (in the folder there are only the DENM related ASN.1)asn1c -fcompound-names -findirect-choice -fincludes-quoted -no-gen-example -pdu=IVIM -pdu=all *.asn
for IVIM (in the folder there are only the IVIM related ASN.1)asn1c -fcompound-names -findirect-choice -fincludes-quoted -no-gen-example -pdu=DENM -pdu=IVIM -pdu=all *.asn
for DENM+IVIMThe decoder code is the sequent:
The error is that rval.code is RC_FAIL and consume is 0.
What can I try to use both DENM and IVIM message format? Did I missed something?
Thanks!
DENM_IVIM_ASN_UPER.zip
The text was updated successfully, but these errors were encountered: