-
Notifications
You must be signed in to change notification settings - Fork 67
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
Fix SDSM encoding in CARMA Streets Plugin #571
Conversation
JsonToJ3224SDSMConverter converter; | ||
std::string valid_json_str = R"( | ||
{ | ||
"msg_cnt": 128, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The encoding error was this msg_cnt value out of range. Definition of this refer to: https://github.com/usdot-fhwa-stol/CARMASensitive/blob/b63ca0c26a68680ef575d2c995e2620d5068b006/J2735_201603_2023-06-22.asn#L3938
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah figured that out too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was not the cause of the initial errors though since it was failing with message count of 3
PR Details
Description
Meant to fix encoding issues faced when attempting to encoded SDSM JSON messages sent from the SDSM service. Previous encoding logic was attempt to reduce the amount of raw pointers used in creating the SDSM message from the JSON payload by creating smart pointers instead. This logic was able to create seemly valid C Structs, inspected using asn print functions but encoding these would return errors similar to the one displayed below
To get functional encoding logic, this PR revert to using raw pointers and memory allocation
Related Issue
CDAR-585
Motivation and Context
Get working SDSM encoding logic
How Has This Been Tested?
Unit testing
Types of changes
Checklist:
V2XHUB Contributing Guide