-
Notifications
You must be signed in to change notification settings - Fork 158
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
Error validating DENM message on TimestampIts #212
Comments
Hi @liviolima80, are you using some custom ASN.1 stuff? Does Vanetza's ItsAsn1 test case run successfully on your system? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good morning,
I'm using Vanetza for generating DENM messages. When I create the DENM message I set detectionTime and referenceTime in the following way:
vanetza::ManualRuntime runtime_;
uint64_t detectionTime = runtime().now().time_since_epoch()).count();
uint64_t referenceTime= runtime().now().time_since_epoch()).count();
asn_uint642INTEGER(&denm.management.detectionTime, detectionTime);
asn_uint642INTEGER(&denm.management.referenceTime, referenceTime);
I verified that detectionTime and referenceTime are correctly set to elapsed ms from 1/1/2004
When I try to validate the DENM message with the validate() function of vanetza::asn1::Denm I get the following error:
error TimestampIts: value too large (.......\vanetza\vanetza\asn1\its\TimestampIts.c:26)
Investingating the check function for TimestampIts fields there is a control where the decoded field is compared to LONG_MAX (see asn_INTEGER2long function). Since long are 4 bytes and TimestampIts comes from 8 bytes values this control will always fail.
Can you help me to understand where is the issue?
Regards
The text was updated successfully, but these errors were encountered: