Skip to content
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

Transition to J2735 ASN 2020, Dockerfile Optimization & Updated SCMS Files #42

Merged
merged 65 commits into from
Feb 2, 2024

Conversation

dmccoystephenson
Copy link
Collaborator

@dmccoystephenson dmccoystephenson commented Jan 16, 2024

Transition to 2020

The ACM has transitioned to using the 2020 version of the J2735 ASN specification for compiling header and implementation files essential for message processing.

Updated ASN.1 Compiler Repository

We have adopted Leidos' fork of the ASN.1 Compiler, accessible at https://www.github.com/mouse07410/asn1c. This change was necessary due to the 'WITH SUCCESSORS' keyword in the 2020 J2735 ASN specification, which is not supported by the original repository (https://www.github.com/vlm/asn1c) currently.

Adjustments to the dockerfiles were made to accommodate this switch.

Modifications to doIt.sh Script

The doIt.sh script now directs to the 'asn1c_combined/j2735-asn-files/2020' directory, utilizing all *.asn files in that directory as input for the ASN.1 Compiler.

SEMI ASN File Updates

The SEMI file has been updated to be compatible with J2735 2020. Structure references had to be changed and import statements were added.

This file has been renamed to differentiate it from the previous version of the file.

The changelog included at the top of the file has been updated, including the following:

  • When the file was last updated
  • Who updated the file last and what company they work for (this followed the convention already present)
  • What got updated

Unit Tests

Three new unit tests have been introduced for encoding TIMs with OdeTimPayload/OdeAsdPayload payload types and decoding a BSM. Each unit test is now encapsulated within its own TEST_CASE instead of being grouped under a single TEST_CASE.

Unit tests associated with encoding BSMs have been commented out, as they are not a desired feature of the ACM and were failing after the transition to mouse07410/asn1c.

Test Data

There are some differences in the TravelerDataFrame structure between 2016 & 2020 that required some modifications to some test messages.

These include the following field renamings:

  • sspTimRights -> notUsed
  • duratonTime -> durationTime
  • sspLocationRights -> notUsed1
  • sspMsgRights1 -> notUsed2
  • sspMsgRights2 -> notUsed3

Testing

BSM Decoding & TIM Encoding have been verified to be working through manual testing. This involved spinning up the ACM & sending data to the relevant kafka topics.

ODE Updates

Transitioning to J2735 2020 requires some modifications to the ODE as well. These have been included in the following PR:
usdot-jpo-ode/jpo-ode#522

Dockerfile Optimization

Changes

Some changes have been made to the Dockerfiles with the aim to enhance performance and efficiency:

  1. Base Image: The base image in the Dockerfiles has been switched from Ubuntu to Alpine, resulting in smaller and faster deployments.
  2. Splitting Dockerfiles: The Dockerfiles are now divided into two images - the builder image and the runtime image. The project is built within the builder container, and only the necessary files are copied to a new container for deployment.

Testing

The changes have been thoroughly tested with the following results:

  1. Successful Compilation: The project compiles and starts up successfully.
  2. Passing Unit Tests: All unit tests pass within the Alpine container.
  3. Dev Cluster Deployment: When deployed to the development cluster, the data gets processed as expected.

These updates are expected to contribute to a more efficient and streamlined development and deployment process.

Updated SCMS Files

Changes

The purpose of the changes in this PR is to transition the ACM away from utilizing the 'scms-asn1' git submodule, opting instead to directly include the updated SCMS files within the project.

Git Submodule Changes

The 'scms-asn1' git submodule has been removed.

Updated SCMS Files

The SCMS files that were being used before were from 2018. These files are from 2021/2022 and include the following:

  • EtsiTs103097ExtensionModule v1.0
  • Ieee1609Dot2 v2.6
  • Ieee1609Dot2BaseTypes v2.4
  • Ieee1609Dot2Crl v3.2
  • Ieee1609Dot2CrlBaseTypes v3.2

The 'Ieee1609Dot2.asn' file depends on a structure defined in the 'EtsiTs103097ExtensionModule.asn' file.

Testing

  • The unit tests have been verified to pass with these changes.
  • The capability of the ACM to process a signed TIM for double-encoding has been verified.

dmccoystephenson and others added 30 commits July 24, 2023 13:24
Optimize Dockerfiles for Smaller and Faster Deployments
Enhance J2735 ASN File Handling in `doIt.sh` Script
@dmccoystephenson dmccoystephenson changed the title Transition to J2735 ASN 2020 & Dockerfile Optimization Transition to J2735 ASN 2020, Dockerfile Optimization & Updated SCMS Files Jan 30, 2024
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
asn1c_combined/doIt.sh Show resolved Hide resolved
data/InputData.encoding.tim.odetimpayload.xml Show resolved Hide resolved
data/asd/asd.v3.mf.xml Show resolved Hide resolved
data/examples/asn1c_input_tim.bin2xml Show resolved Hide resolved
src/acm.cpp Outdated Show resolved Hide resolved
src/acm.cpp Outdated Show resolved Hide resolved
@dmccoystephenson dmccoystephenson marked this pull request as draft January 31, 2024 23:03
…2024

Modified dockerfiles, added data documentation & refactored code for clarity
@dmccoystephenson dmccoystephenson marked this pull request as ready for review February 1, 2024 22:33
@dmccoystephenson
Copy link
Collaborator Author

This PR is ready for re-review.

@dan-du-car
Copy link
Contributor

dan-du-car commented Feb 2, 2024

Looks good. Thank you!

@dan-du-car dan-du-car merged commit 5b2b420 into usdot-jpo-ode:develop Feb 2, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants