Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sdsm decoder optional fields (#212)
<!-- Thanks for the contribution, this is awesome. --> # PR Details ## Description The SDSM decoder is treating every field as if optional and doing if check whether if the field is available. However, this check is should not be done on required fields because the required field may have 0 as a valid entry but the if value == 0 check may erroneously detect that the field is unavailable and set it to unavailable status (for example 0 speed is valid). This if check should only be present for the optional fields in asn1 spec. <!--- Describe your changes in detail --> ## Related GitHub Issue usdot-fhwa-stol/carma-platform#2263 <!--- This project only accepts pull requests related to open GitHub issues or Jira Keys --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please DO NOT name partially fixed issues, instead open an issue specific to this fix --> <!--- Please link to the issue here: --> ## Related Jira Key CDAR-634 https://usdot-carma.atlassian.net/browse/CDAR-634 <!-- e.g. CAR-123 --> ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> ## How Has This Been Tested? Integration tested on Simulation 1 PC, all unit tests pass <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [X] Defect fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [X] I have added any new packages to the sonar-scanner.properties file - [ ] My change requires a change to the documentation. - [X] I have updated the documentation accordingly. - [X ] I have read the [**CONTRIBUTING**](https://github.com/usdot-fhwa-stol/carma-platform/blob/develop/Contributing.md) document. - [X] I have added tests to cover my changes. - [X] All new and existing tests passed.
- Loading branch information