Skip to content

Commit

Permalink
Fix sdsm decoder optional fields (#212)
Browse files Browse the repository at this point in the history
<!-- 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
MishkaMN authored Jan 10, 2024
1 parent eb5d276 commit cd35b17
Show file tree
Hide file tree
Showing 3 changed files with 326 additions and 371 deletions.
100 changes: 50 additions & 50 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
name: Docker

on:
push:
branches-ignore:
- "develop"
- "master"
- "release/*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and Push carma-messenger-ui Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-ui/
push: true
tags: usdotfhwastoldev/carma-messenger-ui:${{ github.ref_name }}-carma-messenger-ui

- name: Build and Push carma-messenger-core Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-core/
push: true
tags: usdotfhwastoldev/carma-messenger-core:${{ github.ref_name }}-carma-messenger-core

- name: Build and Push chevrolet_tahoe_2018 Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-config/chevrolet_tahoe_2018/
push: true
tags: usdotfhwastoldev/carma-messenger-config:${{ github.ref_name }}-chevrolet_tahoe_2018

- name: Build and Push development Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-config/development/
push: true
tags: usdotfhwastoldev/carma-messenger-config:${{ github.ref_name }}-development

name: Docker

on:
push:
branches-ignore:
- "develop"
- "master"
- "release/*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and Push carma-messenger-ui Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-ui/
push: true
tags: usdotfhwastoldev/carma-messenger-ui:${{ github.ref_name }}-carma-messenger-ui

- name: Build and Push carma-messenger-core Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-core/
push: true
tags: usdotfhwastoldev/carma-messenger-core:${{ github.ref_name }}-carma-messenger-core

- name: Build and Push chevrolet_tahoe_2018 Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-config/chevrolet_tahoe_2018/
push: true
tags: usdotfhwastoldev/carma-messenger-config:${{ github.ref_name }}-chevrolet_tahoe_2018

- name: Build and Push development Docker Image
uses: docker/build-push-action@v3
with:
context: ./carma-messenger-config/development/
push: true
tags: usdotfhwastoldev/carma-messenger-config:${{ github.ref_name }}-development

Loading

0 comments on commit cd35b17

Please sign in to comment.