-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEFAULT field with UPER encoding not managed correctly + help to debug the compiler #407
Comments
I can confirm this issue, however, I suspect that the Update: The extension marker
|
See also #383 for a very similar problem description. |
#290 mentions a manual fix for this problem. This ticket is open for over two years by now. Time to get this fixed finally ;-) |
Thank you very much @riebl , It solved my issue! |
Hello,
Thanks for the tool that you developed!
I am having a similar issue as #378.
In my case, I am trying to receive CPMs as defined by the ETSI TR 103 562 from a node which didn't use the asn1c compiler. Unfortunately for me, the CPM decoding results almost everytime in failure.
The results I obtain:
At the same time, some CAMs are transmitted by the node as well and the decoding never fails. By looking a bit in the main difference between CAM and CPM asn1 definitions, I noticed that the CAM does not use the DEFAULT type of field while the CPM yes.
Moreover, by looking into the code generated by asn1c, I obtained an unexpected result. For example:
driveDirection DriveDirection DEFAULT forward
(see OriginatingVehicleContainer) is compiled asDriveDirection_t driveDirection;
(see the complete code generated in this Vanetza link). When looking into the OSS asn1 compiler documentation, I found this document which states that both OPTIONAL and DEFAULT fields should work in a similar way. However, this does not seem the case with asn1c.I would expected that
driveDirection DriveDirection DEFAULT forward
would be compiled asDriveDirection_t *driveDirection;
using the UPER encoding rules.Shortly, I am expecting DEFAULT fields to be considered similarly to OPTIONAL ones but this is not the case.
I tried a naive approach of replacing all DEFAULT by OPTIONAL but the decoding still failed.
Does anyone know a fix or could help me by indicating a way of how to solve this issue?
Thanks in advance!
Q
The text was updated successfully, but these errors were encountered: