diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 666ffba3..fd6d82d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,11 +10,10 @@ jobs: image: ubuntu:jammy-20230126 env: working-directory: /asn1_codec - BUILD_WRAPPER_OUT_DIR: "$GITHUB_WORKSPACE/bw-output" options: "--user root" steps: - name: checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v5 # Checkout the code from the repository - name: Install necessary dependencies @@ -76,70 +75,34 @@ jobs: echo "export CC=gcc" >> ~/.bashrc working-directory: ${{ env.working-directory }} - - name: Install sonar-scanner and build-wrapper - uses: SonarSource/sonarcloud-github-c-cpp@v3 - # Install SonarScanner and build-wrapper for code analysis - - name: Build and Generate test coverage run: | - sudo su - root - sudo chmod o+w /root - sudo chmod 755 -R /__w/asn1_codec/asn1_codec/ - export BUILD_WRAPPER_OUT_DIR=$GITHUB_WORKSPACE/bw-output - build-wrapper-linux-x86-64 --out-dir $GITHUB_WORKSPACE/bw-output ./build.sh - mkdir coverage - cd coverage - gcov $GITHUB_WORKSPACE/kafka-test/src/*.cpp --object-directory /__w/asn1-codec/asn1-codec/build/kafka-test/CMakeFiles/Kafka-TestLib.dir/src/ - gcov $GITHUB_WORKSPACE/src/*.cpp --object-directory /__w/asn1-codec/asn1-codec/build/CMakeFiles/ppm_tests.dir/src/ + chmod +x build.sh + ./build.sh + mkdir -p coverage + gcovr \ + --root $GITHUB_WORKSPACE \ + --object-directory $GITHUB_WORKSPACE/build \ + --sonarqube coverage/coverage.xml \ + --exclude '.*pugixml.*' \ + --exclude '.*librdkafka.*' working-directory: ${{ env.working-directory }} - name: Archive code coverage results - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: asn1-codec path: /__w/asn1-codec/asn1-codec/coverage/ # Archive code coverage results for later reference - - name: Archive buildwrapper output - uses: actions/upload-artifact@v4 - with: - name: asn1-codec - path: /home/runner/work/asn1-codec/asn1-codec/bw-output - # Archive build-wrapper output - - - uses: actions/setup-java@v4 + - uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '17' - - name: Setup SonarScanner - uses: warchant/setup-sonar-scanner@v7 - - - name: Generate sonar properties file - run: | - # Generate SonarScanner properties file - cat < /tmp/sonar-scanner.properties - sonar.host.url=https://sonarcloud.io - sonar.projectName=asn1-codec - sonar.projectVersion=1.0 - sonar.projectKey=usdot-jpo-ode_asn1-codec - sonar.organization=usdot-jpo-ode - sonar.sources=src,kafka-test/src,include - sonar.cfamily.build-wrapper-output=bw-output - sonar.cfamily.gcov.reportsPath=/__w/asn1-codec/asn1-codec/coverage/ - sonar.sonar.projectBaseDir=/home/runner/work/asn1-codec/asn1-codec/ - sonar.exclusions=**/*.java - sonar.coverage.exclusions=**/*.java - sonar.exclusions=pugixml/tests/data/** - # Set Git as SCM sensor - sonar.scm.disabled=true - sonar.scm.provider=git - sonar.sourceEncoding=UTF-8 - EOF - - name: SonarScanner - if: github.event.pull_request.base.repo.owner.login == 'usdot-jpo-ode' + - name: SonarScanner + if: github.event_name != 'pull_request' || github.event.pull_request.base.repo.owner.login == 'usdot-jpo-ode' uses: usdot-fhwa-stol/actions/sonar-scanner@main with: - sonar-properties-path: /tmp/sonar-scanner.properties sonar-token: ${{ secrets.SONAR_TOKEN }} - working-dir: $GITHUB_WORKSPACE + working-dir: ${{ github.workspace }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index ba134fbb..4f0173c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ VOLUME ["/asn1_codec_share"] RUN apk add --upgrade --no-cache \ bash \ librdkafka \ - librdkafka-dev + librdkafka-dev \ + supervisor # === BUILDER IMAGE === @@ -70,6 +71,7 @@ VOLUME ["/asn1_codec_share"] # copy the built files from the builder COPY --from=builder /asn1_codec /asn1_codec COPY --from=builder /build /build +COPY ./supervisord.conf /etc/ # Use jemalloc for better performance than Alpine's built-in memory allocator, esp. with multithreading RUN apk add --upgrade --no-cache jemalloc diff --git a/Dockerfile.debug b/Dockerfile.debug index dd39c4cb..78ed5e00 100644 --- a/Dockerfile.debug +++ b/Dockerfile.debug @@ -8,7 +8,8 @@ VOLUME ["/asn1_codec_share"] RUN apk add --upgrade --no-cache \ bash \ librdkafka \ - librdkafka-dev + librdkafka-dev \ + supervisor # === BUILDER IMAGE === @@ -74,6 +75,7 @@ ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2 # copy the built files from the builder COPY --from=builder /asn1_codec /asn1_codec COPY --from=builder /build /build +COPY ./supervisord.conf /etc/ # Add test data. This changes frequently so keep it low in the file. ADD ./docker-test /asn1_codec/docker-test diff --git a/Dockerfile.dev b/Dockerfile.dev index 27e3c5a6..428c5b07 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -8,7 +8,8 @@ VOLUME ["/asn1_codec_share"] RUN apk add --upgrade --no-cache \ bash \ librdkafka \ - librdkafka-dev + librdkafka-dev \ + supervisor # === BUILDER IMAGE === @@ -75,7 +76,8 @@ RUN apk update && apk add vim nano # copy the built files from the builder COPY --from=builder /asn1_codec /asn1_codec -COPY --from=builder /build /build +COPY --from=builder /build /build +COPY ./supervisord.conf /etc/ # Add test data. This changes frequently so keep it low in the file. ADD ./docker-test /asn1_codec/docker-test diff --git a/Dockerfile.standalone b/Dockerfile.standalone index 74092557..a29cd8fe 100644 --- a/Dockerfile.standalone +++ b/Dockerfile.standalone @@ -8,7 +8,8 @@ VOLUME ["/asn1_codec_share"] RUN apk add --upgrade --no-cache \ bash \ librdkafka \ - librdkafka-dev + librdkafka-dev \ + supervisor # === BUILDER IMAGE === @@ -66,6 +67,7 @@ ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2 # copy the built files from the builder COPY --from=builder /asn1_codec /asn1_codec COPY --from=builder /build /build +COPY ./supervisord.conf /etc/ # Add test data. This changes frequently so keep it low in the file. ADD ./docker-test /asn1_codec/docker-test diff --git a/Dockerfile.testing b/Dockerfile.testing index 6ec0d940..f334b860 100644 --- a/Dockerfile.testing +++ b/Dockerfile.testing @@ -9,7 +9,8 @@ RUN apk add --upgrade --no-cache \ bash \ python3 \ librdkafka \ - librdkafka-dev + librdkafka-dev \ + supervisor # === BUILDER IMAGE === @@ -75,6 +76,7 @@ ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2 # copy the built files from the builder COPY --from=builder /asn1_codec /asn1_codec COPY --from=builder /build /build +COPY ./supervisord.conf /etc/ # run ACM RUN chmod 7777 /asn1_codec/run_acm.sh diff --git a/asn1c_combined/generated-files/2016.tar.gz b/asn1c_combined/generated-files/2016.tar.gz index 95ea9bd4..c8ca91f6 100644 Binary files a/asn1c_combined/generated-files/2016.tar.gz and b/asn1c_combined/generated-files/2016.tar.gz differ diff --git a/asn1c_combined/generated-files/2020.tar.gz b/asn1c_combined/generated-files/2020.tar.gz index d6274e69..a7c6bb42 100644 Binary files a/asn1c_combined/generated-files/2020.tar.gz and b/asn1c_combined/generated-files/2020.tar.gz differ diff --git a/asn1c_combined/generated-files/2024.tar.gz b/asn1c_combined/generated-files/2024.tar.gz index b0c87e4e..97dada9d 100644 Binary files a/asn1c_combined/generated-files/2024.tar.gz and b/asn1c_combined/generated-files/2024.tar.gz differ diff --git a/asn1c_combined/semi-asn-files/2016/SEMI_v2.3.0_070616.asn b/asn1c_combined/semi-asn-files/2016/SEMI_v2.3.0.1_060325.asn similarity index 95% rename from asn1c_combined/semi-asn-files/2016/SEMI_v2.3.0_070616.asn rename to asn1c_combined/semi-asn-files/2016/SEMI_v2.3.0.1_060325.asn index 6b1e38be..e51049ac 100644 --- a/asn1c_combined/semi-asn-files/2016/SEMI_v2.3.0_070616.asn +++ b/asn1c_combined/semi-asn-files/2016/SEMI_v2.3.0.1_060325.asn @@ -1,6 +1,7 @@ --- Version: 2.3.0-draft --- Date: 2016-07-06 --- Updated by Frank perry at Leidos +-- Version: 2.3.0.1-draft +-- Date: 2025-06-03 +-- Updated by Daniel McCoy Stephenson at Trihydro Corporation +-- Previously updated by Frank perry at Leidos -- Developed by Purser Sturgeon II -- at Southwest Research Institute -- for the USDOT Connected Vehicle Test Bed @@ -28,6 +29,7 @@ -- Add TimeToLive to ServiceRecord -- Changed Weather/wipers/DSRC.WiperStatusFront to DSRC.WiperStatus -- Changed Weather/wipers/DSRC.WiperStatusRear to DSRC.WiperStatus +-- 2.3.0.1: Updated OCTET STRING constraint for advisoryMessage to (0..7000) to support multi-region ASD TIMs SEMI DEFINITIONS AUTOMATIC TAGS ::= BEGIN @@ -411,13 +413,13 @@ AdvisoryDetails ::= SEQUENCE { distType DistributionType, startTime DSRC.DFullTime OPTIONAL, stopTime DSRC.DFullTime OPTIONAL, - advisoryMessage OCTET STRING (SIZE(0..1400)) -- Encoded advisory message + advisoryMessage OCTET STRING (SIZE(0..7000)) -- Encoded advisory message } AdvisoryBroadcast ::= SEQUENCE { messagePsid Psid, -- PSID of advisory message broadcastInst BroadcastInstructions OPTIONAL, -- Broadcast instructions - advisoryMessage OCTET STRING (SIZE(0..1400)) -- Encoded advisory message + advisoryMessage OCTET STRING (SIZE(0..7000)) -- Encoded advisory message } BroadcastInstructions ::= SEQUENCE { diff --git a/asn1c_combined/semi-asn-files/2020/SEMI_v2.4.0_121223_j2020.asn b/asn1c_combined/semi-asn-files/2020/SEMI_v2.4.0.1_060325_j2020.asn similarity index 96% rename from asn1c_combined/semi-asn-files/2020/SEMI_v2.4.0_121223_j2020.asn rename to asn1c_combined/semi-asn-files/2020/SEMI_v2.4.0.1_060325_j2020.asn index 38d8a0dc..73209dad 100644 --- a/asn1c_combined/semi-asn-files/2020/SEMI_v2.4.0_121223_j2020.asn +++ b/asn1c_combined/semi-asn-files/2020/SEMI_v2.4.0.1_060325_j2020.asn @@ -1,5 +1,5 @@ --- Version: 2.4.0-draft --- Date: 2023-12-12 +-- Version: 2.4.0.1-draft +-- Date: 2025-06-03 -- Updated by Daniel McCoy Stephenson at Trihydro -- Previously updated by Frank perry at Leidos -- Developed by Purser Sturgeon II @@ -30,6 +30,7 @@ -- Changed Weather/wipers/DSRC.WiperStatusFront to DSRC.WiperStatus -- Changed Weather/wipers/DSRC.WiperStatusRear to DSRC.WiperStatus -- 2.4.0: Imported dependencies from J2735 ASN 2020 files +-- 2.4.0.1: Updated OCTET STRING constraint for advisoryMessage to (0..7000) to support multi-region ASD TIMs SEMI DEFINITIONS AUTOMATIC TAGS ::= BEGIN @@ -436,13 +437,13 @@ AdvisoryDetails ::= SEQUENCE { distType DistributionType, startTime DFullTime OPTIONAL, stopTime DFullTime OPTIONAL, - advisoryMessage OCTET STRING (SIZE(0..1400)) -- Encoded advisory message + advisoryMessage OCTET STRING (SIZE(0..7000)) -- Encoded advisory message } AdvisoryBroadcast ::= SEQUENCE { messagePsid Psid, -- PSID of advisory message broadcastInst BroadcastInstructions OPTIONAL, -- Broadcast instructions - advisoryMessage OCTET STRING (SIZE(0..1400)) -- Encoded advisory message + advisoryMessage OCTET STRING (SIZE(0..7000)) -- Encoded advisory message } BroadcastInstructions ::= SEQUENCE { diff --git a/asn1c_combined/semi-asn-files/2024/SEMI_v2.4.1_111524_j2024.asn b/asn1c_combined/semi-asn-files/2024/SEMI_v2.4.2_050925_j2024.asn similarity index 95% rename from asn1c_combined/semi-asn-files/2024/SEMI_v2.4.1_111524_j2024.asn rename to asn1c_combined/semi-asn-files/2024/SEMI_v2.4.2_050925_j2024.asn index b83a7c39..91c086cc 100644 --- a/asn1c_combined/semi-asn-files/2024/SEMI_v2.4.1_111524_j2024.asn +++ b/asn1c_combined/semi-asn-files/2024/SEMI_v2.4.2_050925_j2024.asn @@ -1,7 +1,7 @@ --- Version: 2.4.1-draft --- Date: 2024-11-15 --- Updated by Ivan Yourshaw at Neaera Consulting --- Previously updated by Daniel McCoy Stephenson at Trihydro +-- Version: 2.4.2-draft +-- Date: 2025-05-09 +-- Updated by Daniel McCoy Stephenson at Trihydro Corporation +-- Previously updated by Ivan Yourshaw at Neaera Consulting -- Previously updated by Frank perry at Leidos -- Developed by Purser Sturgeon II -- at Southwest Research Institute @@ -32,6 +32,7 @@ -- Changed Weather/wipers/DSRC.WiperStatusRear to DSRC.WiperStatus -- 2.4.0: Imported dependencies from J2735 ASN 2020 files -- 2.4.1: Update OIDs for imported modules to match J2735 2024 ASN files +-- 2.4.2: Updated OCTET STRING constraint for advisoryMessage to (0..7000) to support multi-region ASD TIMs SEMI DEFINITIONS AUTOMATIC TAGS ::= BEGIN @@ -441,13 +442,13 @@ AdvisoryDetails ::= SEQUENCE { distType DistributionType, startTime DFullTime OPTIONAL, stopTime DFullTime OPTIONAL, - advisoryMessage OCTET STRING (SIZE(0..1400)) -- Encoded advisory message + advisoryMessage OCTET STRING (SIZE(0..7000)) -- Encoded advisory message } AdvisoryBroadcast ::= SEQUENCE { messagePsid Psid, -- PSID of advisory message broadcastInst BroadcastInstructions OPTIONAL, -- Broadcast instructions - advisoryMessage OCTET STRING (SIZE(0..1400)) -- Encoded advisory message + advisoryMessage OCTET STRING (SIZE(0..7000)) -- Encoded advisory message } BroadcastInstructions ::= SEQUENCE { diff --git a/build.sh b/build.sh index ef468422..2c7bbded 100644 --- a/build.sh +++ b/build.sh @@ -22,7 +22,7 @@ ls -la && pwd # build asn1_codec mkdir build cd build -cmake .. +cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. cmake --build . make ctest --output-on-failure \ No newline at end of file diff --git a/data/InputData.encoding.asd.tim.16regions.1008nodes.xml b/data/InputData.encoding.asd.tim.16regions.1008nodes.xml new file mode 100644 index 00000000..6c2c8974 --- /dev/null +++ b/data/InputData.encoding.asd.tim.16regions.1008nodes.xml @@ -0,0 +1 @@ +us.dot.its.jpo.ode.model.OdeAsdPayload12345678-1234-1234-1234-12345678912313032025-05-09T16:16:30.463Z8320002025-05-09T16:16:30.215ZTMCfalse1234567891234567892025-05-09T16:16:27.995Z3POST41.44440858-106.8073816541.29369333-105.6293327oneyear12345678MessageFrameMessageFrameUPERIeee1609Dot2DataIeee1609Dot2DataCOERAdvisorySituationDataAdvisorySituationDataUPERus.dot.its.jpo.ode.plugin.j2735.DdsAdvisorySituationData15650000000012345678123456785414444086-1068073817412936933-105629332712345678202000316000031603311185296123456789123456789null0413575088-1067422730111111111111111120251852963200050ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463004885null \ No newline at end of file diff --git a/data/InputData.encoding.asd.tim.17regions.1071nodes.invalid.xml b/data/InputData.encoding.asd.tim.17regions.1071nodes.invalid.xml new file mode 100644 index 00000000..1b5d61a2 --- /dev/null +++ b/data/InputData.encoding.asd.tim.17regions.1071nodes.invalid.xml @@ -0,0 +1 @@ +us.dot.its.jpo.ode.model.OdeAsdPayload12345678-1234-1234-1234-12345678912313032025-05-09T16:16:30.463Z8320002025-05-09T16:16:30.215ZTMCfalse1234567891234567892025-05-09T16:16:27.995Z3POST41.44440858-106.8073816541.29369333-105.6293327oneyear12345678MessageFrameMessageFrameUPERIeee1609Dot2DataIeee1609Dot2DataCOERAdvisorySituationDataAdvisorySituationDataUPERus.dot.its.jpo.ode.plugin.j2735.DdsAdvisorySituationData15650000000012345678123456785414444086-1068073817412936933-105629332712345678202000316000031603311185296123456789123456789null0413575088-1067422730111111111111111120251852963200050ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463004885null \ No newline at end of file diff --git a/data/InputData.encoding.asd.tim.7regions.441nodes.xml b/data/InputData.encoding.asd.tim.7regions.441nodes.xml new file mode 100644 index 00000000..157fe8f1 --- /dev/null +++ b/data/InputData.encoding.asd.tim.7regions.441nodes.xml @@ -0,0 +1 @@ +us.dot.its.jpo.ode.model.OdeAsdPayload12345678-1234-1234-1234-12345678912313032025-05-09T16:16:30.463Z8320002025-05-09T16:16:30.215ZTMCfalse1234567891234567892025-05-09T16:16:27.995Z3POST41.44440858-106.8073816541.29369333-105.6293327oneyear12345678MessageFrameMessageFrameUPERIeee1609Dot2DataIeee1609Dot2DataCOERAdvisorySituationDataAdvisorySituationDataUPERus.dot.its.jpo.ode.plugin.j2735.DdsAdvisorySituationData15650000000012345678123456785414444086-1068073817412936933-105629332712345678202000316000031603311185296123456789123456789null0413575088-1067422730111111111111111120251852963200050ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463ABCDEFGHIJKLMNOPQRSTUVWXYZ00413575088-10674227305000111111111110101101597-62020732-753918262-429157389-2437111190-23256114152-5372017084-6409202240-4641976623-316357455-1618114727-849219150-1695721356595436514114161304452152910917071214604833447190041039132703-1149418282338615303857154456125611751856453238315194200332427714352934717897477318972-37417574-5421104055-63064136612-1200669168-1252613815-4184226475-3821124283-219979406-1249027649-1978132331-1518540221-3060516647-695114665-89648920-1268414586-884718718-525317521569715463841117400576718796213137618-4243185752807898622403518781171317803-478230982-1676916469-718255025-1164018972-118516581-679314822-903016969-648018475-342919020-1817468611463004885null \ No newline at end of file diff --git a/docker-compose-confluent-cloud.yml b/docker-compose-confluent-cloud.yml index f697b995..7ef0b4b9 100644 --- a/docker-compose-confluent-cloud.yml +++ b/docker-compose-confluent-cloud.yml @@ -11,6 +11,7 @@ services: ACM_LOG_TO_CONSOLE: "true" ACM_LOG_TO_FILE: "false" ACM_LOG_LEVEL: ${ACM_LOG_LEVEL} + ACM_NUMBER_OF_PROCESSES: ${ACM_NUMBER_OF_PROCESSES:-1} CONFLUENT_KEY: ${CONFLUENT_KEY} CONFLUENT_SECRET: ${CONFLUENT_SECRET} restart: on-failure @@ -25,6 +26,7 @@ services: ACM_LOG_TO_CONSOLE: "true" ACM_LOG_TO_FILE: "false" ACM_LOG_LEVEL: ${ACM_LOG_LEVEL} + ACM_NUMBER_OF_PROCESSES: ${ACM_NUMBER_OF_PROCESSES:-1} CONFLUENT_KEY: ${CONFLUENT_KEY} CONFLUENT_SECRET: ${CONFLUENT_SECRET} restart: on-failure \ No newline at end of file diff --git a/docker-compose-debug.yml b/docker-compose-debug.yml index c68c854e..a869e4a7 100644 --- a/docker-compose-debug.yml +++ b/docker-compose-debug.yml @@ -3,9 +3,6 @@ services: build: context: . dockerfile: Dockerfile.debug - ports: - - "8080:8080" - - "9090:9090" environment: DOCKER_HOST_IP: ${DOCKER_HOST_IP} KAFKA_TYPE: "ON-PREM" @@ -13,4 +10,5 @@ services: ACM_LOG_TO_CONSOLE: "${ACM_LOG_TO_CONSOLE}" ACM_LOG_TO_FILE: "${ACM_LOG_TO_FILE}" ACM_LOG_LEVEL: "${ACM_LOG_LEVEL}" + ACM_NUMBER_OF_PROCESSES: ${ACM_NUMBER_OF_PROCESSES:-1} restart: on-failure \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 935a661a..f8bd7c50 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,30 +1,9 @@ version: '2' services: - zookeeper: - image: wurstmeister/zookeeper - ports: - - "2181:2181" - kafka: - image: wurstmeister/kafka - ports: - - "9092:9092" - environment: - KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP} - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_CREATE_TOPICS: "j2735asn1xer:1:1,j2735asn1per:1:1,topic.Asn1DecoderInput:1:1,topic.Asn1DecoderOutput:1:1,topic.Asn1EncoderInput:1:1,topic.Asn1EncoderOutput:1:1" - volumes: - - /var/run/docker.sock:/var/run/docker.sock asn1_codec: build: context: . dockerfile: Dockerfile - ports: - - "8080:8080" - - "9090:9090" - depends_on: - - kafka - links: - - kafka environment: DOCKER_HOST_IP: ${DOCKER_HOST_IP} KAFKA_TYPE: "ON-PREM" @@ -32,4 +11,5 @@ services: ACM_LOG_TO_CONSOLE: "${ACM_LOG_TO_CONSOLE}" ACM_LOG_TO_FILE: "${ACM_LOG_TO_FILE}" ACM_LOG_LEVEL: "${ACM_LOG_LEVEL}" + ACM_NUMBER_OF_PROCESSES: ${ACM_NUMBER_OF_PROCESSES:-1} restart: on-failure \ No newline at end of file diff --git a/docs/Release_notes.md b/docs/Release_notes.md index a5853471..55c94093 100644 --- a/docs/Release_notes.md +++ b/docs/Release_notes.md @@ -1,6 +1,17 @@ asn1_codec Release Notes ---------------------------- +Version 3.3.0, released April 2026 +---------------------------------------- +### **Summary** +This release adds support for running multiple Kafka consumer/producer processes to make efficient use +of resources within containers. + +Enhancements in this release: +- [Support multiple processes/consumers](https://github.com/neaeraconsulting/asn1_codec/pull/1) +- [Increase advisoryMessage Byte Limit to Support Full TIM Region Capacity](https://github.com/usdot-jpo-ode/asn1_codec/pull/77) +- [Update SonarCloud C/C++ Analysis Using compile_commands.json](https://github.com/usdot-jpo-ode/asn1_codec/pull/80) + Version 3.2.0, released October 2025 ---------------------------------------- ### **Summary** diff --git a/docs/configuration.md b/docs/configuration.md index d879f522..fc1f685c 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -54,6 +54,7 @@ The following environment variables are used by the ACM: | `KAFKA_TYPE` | If unset, a local kafka broker will be targeted. If set to "CONFLUENT", the application will target a Confluent Cloud cluster. | | `CONFLUENT_KEY` | Confluent Cloud Integration (if KAFKA_TYPE is set to "CONFLUENT") | | `CONFLUENT_SECRET` | Confluent Cloud Integration (if KAFKA_TYPE is set to "CONFLUENT") | +| `ACM_NUMBER_OF_PROCESSES` | Number of ACM processes/consumers to run per container | The `sample.env` file contains the default values for some of these environment variables. To use these values, copy the `sample.env` file to `.env` and modify the values as needed. @@ -108,13 +109,21 @@ the ACM will likely generate an error when doing constraint checking. Both the ENCODER and DECODER will check the ASN.1 constraints for the C structures that are built as data passes through the module. -## ACM Kafka Limitations +## Configuring ACM to use multiple Kafka partitions -With regard to the Apache Kafka architecture, each ACM process does **not** provide a way to take advantage of Kafka's scalable -architecture. In other words, each ACM process will consume data from a single Kafka topic and a single partition within -that topic. One way to consume topics with multiple partitions is to launch one ACM process for each partition; the -configuration file will allow you to designate the partition. In the future, the ACM may be updated to automatically -handle multiple partitions within a single topic. +Each ACM process does **not** provide a way to take advantage of Kafka's scalable architecture, but it is possible to +provide scalability by running multiple ACM processes. Each ACM process runs a single Kafka consumer. It is possible +for one consumer to consume messages from multiple partitions, but a single consumer by itself is not scalable. However, +there are two methods to add multiple ACM processes to efficiently handle multiple partitions by consuming them with +multiple consumers that run in parallel: + +1. Multiple ACM containers can be run via Docker Compose or within a Kubernetes cluster, or +2. A single container can be configured to run multiple consumer processes by setting the `ACM_NUMBER_OF_PROCESSES` +environment variable to a value greater than 1. + +These methods may be combined. For example, if the Kafka topics are configured with 100 partitions, 10 ACM +containers configured to run 10 consumers each could be used to provide one consumer per partition for maximum +throughput. ## ACM Logging diff --git a/run_acm.sh b/run_acm.sh index fe249569..7f9d2e21 100644 --- a/run_acm.sh +++ b/run_acm.sh @@ -6,7 +6,17 @@ if [ "${ACM_HTTP_SERVER}" == "true" ]; then echo "Starting HTTP Server" /build/acm -c /asn1_codec/config/${ACM_CONFIG_FILE} -v ${ACM_LOG_LEVEL} -R -H else - echo "Starting Kafka" - /build/acm -c /asn1_codec/config/${ACM_CONFIG_FILE} -b ${DOCKER_HOST_IP}:9092 -v ${ACM_LOG_LEVEL} -R + echo "Starting supervisord to run Kafka consumers" + + # Ensure number of processes is a positive number + case "${ACM_NUMBER_OF_PROCESSES}" in + ''|*[!0-9]*|0) + echo "Invalid ACM_NUMBER_OF_PROCESSES: ${ACM_NUMBER_OF_PROCESSES}. Expected a positive integer." >&2 + exit 1 + ;; + esac + + # Start supervisord + supervisord -n -c /etc/supervisord.conf fi diff --git a/sample.env b/sample.env index de3a084f..7469dbae 100644 --- a/sample.env +++ b/sample.env @@ -19,8 +19,14 @@ KAFKA_TYPE= CONFLUENT_KEY= CONFLUENT_SECRET= +# Number of concurrent processes/consumers to start in Kafka mode +# Default of 1 starts one consumer per container +# Increase to run more consumers per container +ACM_NUMBER_OF_PROCESSES=1 + # HTTP Server Port ACM_HTTP_SERVER_PORT=9999 # Number of threads to use for HTTP Server -ACM_HTTP_SERVER_CONCURRENCY=4 \ No newline at end of file +ACM_HTTP_SERVER_CONCURRENCY=4 + diff --git a/sonar-project.properties b/sonar-project.properties index b5cfe93b..20631c93 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,9 +1,14 @@ -sonar.projectKey=jpo-cvdp-key -sonar.projectName=jpo-cvdp +sonar.organization=usdot-jpo-ode +sonar.projectKey=usdot-jpo-ode_asn1-codec +sonar.projectName=asn1-codec sonar.projectVersion=1.0 -sonar.sources=src,cv-lib/src -sonar.cfamily.build-wrapper-output=bw-output -sonar.host.url=https://sonarqube.com -sonar.organization=aferber-github -sonar.login=feb286a32ec2f510525f9e3e44da3f81b4de57c0 -sonar.cfamily.gcov.reportsPath=./coverage + +sonar.sources=src,kafka-test/src,include +sonar.cfamily.compile-commands=build/compile_commands.json +sonar.coverageReportPaths=coverage/coverage.xml + +sonar.exclusions=**/*.java,pugixml/tests/data/** +sonar.coverage.exclusions=**/*.java +sonar.scm.disabled=true +sonar.scm.provider=git +sonar.sourceEncoding=UTF-8 \ No newline at end of file diff --git a/src/tests.cpp b/src/tests.cpp index d7a1078c..673de44a 100644 --- a/src/tests.cpp +++ b/src/tests.cpp @@ -80,63 +80,6 @@ const char* BATCH_JSON = R"({ "type": "SPAT", "timestamp": 1735713156407, "hex": { "type": "SDSM", "timestamp": 1735713156418, "hex": "00293fee4f4354451fe189d73d8db3487a47e59668527c20a5ee4b3eb1ad79e017f38b87cebd5ff6885eb08ddfc05a5bd727e18c7bccc1edac3cf96d7e7d0afc9e48" } { "type": "RSM", "timestamp": 1735713156419, "hex": "002182B72F00878190A929E86A88B1BFD51931DD5E3826BFFB8B343AFB6741300FE5C32BA3BBDE67193178F6B7A4C55D7F92AC0F0491F9F41C7FF5C0EAAC660564EC7395A3852EF80497084BD802D70CEE59F40525C774EA036AC088DCD87C1F53E812C941115332BD8AD799163C0A9C81C982D69E83F981552BFD669E5A5F2D16C74FA63E918F8F0F604A90F3A1C12E23BBAD93CB049305AD3E920B77A512C50E4CA153321E342E7B46E1E301A8A4E59014982D4A049305AD3E880A4C16A881C14BB827A1AA228030783694F4354452130736F1056E8D0514C69E86A88BA29495BE95B96477A30E24A8B850AE4165F37B57429305AA82946C0941100F20C350AD1F10EFBC12F596922EAF9F5EE842DA5CB6A3207E642A0903C5B0D861EC9F40E00D471F4F4B0459E06117072B5EC72EDD6E8A402049001556AA6ADA64EBB41999C5CFA6548032950FA47C8D7026AC31E9E66DAADAA6D910CD5064C14484DC189C9FC95A23DF37185E92AD35592B8E0E5EFD26B49962279A2B778687051070CE2BA22974CB3B0110112EADFF2FCBC29B8D28C75BF56B3AB2B823CFE3F939D142D716370A601AC78E4A5FBCF10807A140AB40F08C4344158FB9404A4FC4F5DF57B57F128327A46AD6AD1BBBBF0FF8413612022A903960AA847A131787C4361D860C2B5BD507FAF45ECD0BAF9DC89D2817EC92DDCFDD89C28532C350AD3DEA25C2100228D4347F980931D2B8DFE2BADCA94D615CA0CBEBB2A091E58BE2B51215BE98AE235E1515E348C6CA2AF567FF1CB6449305AD3E988951821392E876D923D4C0E367116255FE6BBB512CBBCD0D5A0FEA65F650A52B5E633EA40E8458E51282F562201A529BB46DA51247A862897C9696F1FB10774216AB8E3CF15D715DB2E514268A9DA38D309EF0FA0C539C893308E63BD5AFBA44436666541EA275627FC4448A5CC2AFBCB2A88869C4D09800949BB79F0573CD5AA7DE4F46A0" })"; -/** - * This unit test is currently failing with the fork of asn1c that we're using (currently `usdot-fhwa-stol/usdot-asn1c`). - * Since encoding BSMs is not a desired feature of the ACM, this test case has been commented out. - */ -// TEST_CASE("Encode BSM", "[encoding]" ) { // TODO: fix test case failing -// // prepare -// asn1_codec.setup_logger_for_testing(); - -// std::stringstream out1; -// CHECK(asn1_codec.file_test("unit-test-data/BSM.xml", out1) == EXIT_SUCCESS); -// parse_result = output_doc.load(out1, pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_trim_pcdata); -// CHECK(parse_result); -// payload_node = ode_payload_query.evaluate_node(output_doc).node(); -// CHECK(payload_node); -// byte_node = payload_node.child("MessageFrame").child("bytes"); -// CHECK(byte_node); -// CHECK(std::strcmp(byte_node.text().get(), BSM_HEX) == 0); -// } - -TEST_CASE("Encode ASD", "[encoding]" ) { - std::cout << "=== Encode ASD ===" << std::endl; - - // prepare - asn1_codec.setup_logger_for_testing(); - - std::stringstream out2; - CHECK(asn1_codec.file_test("unit-test-data/ASD.xml", out2) == EXIT_SUCCESS); - parse_result = output_doc.load(out2, pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_trim_pcdata); - CHECK(parse_result); - payload_node = ode_payload_query.evaluate_node(output_doc).node(); - CHECK(payload_node); - byte_node = payload_node.child("AdvisorySituationData").child("bytes"); - CHECK(byte_node); - CHECK(std::strcmp(byte_node.text().get(), ASD_BSM_HEX) == 0); -} - -/** - * This unit test is currently failing with the fork of asn1c that we're using (currently `usdot-fhwa-stol/usdot-asn1c`). - * Since encoding BSMs is not a desired feature of the ACM, this test case has been commented out. - */ -// TEST_CASE("Encode ASD_BSM", "[encoding]" ) { // TODO: fix test case failing -// // prepare -// asn1_codec.setup_logger_for_testing(); -// std::stringstream out3; -// CHECK(asn1_codec.file_test("unit-test-data/ASD_BSM.xml", out3) == EXIT_SUCCESS); -// parse_result = output_doc.load(out3, pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_trim_pcdata); -// CHECK(parse_result); -// payload_node = ode_payload_query.evaluate_node(output_doc).node(); -// CHECK(payload_node); -// byte_node = payload_node.child("AdvisorySituationData").child("bytes"); -// CHECK(byte_node); -// CHECK(std::strcmp(byte_node.text().get(), ASD_BSM_HEX) == 0); -// byte_node = payload_node.child("MessageFrame").child("bytes"); -// CHECK(byte_node); -// CHECK(std::strcmp(byte_node.text().get(), BSM_HEX) == 0); -// } - TEST_CASE("Encode 1609", "[encoding]" ) { std::cout << "=== Encode 1609 ===" << std::endl; @@ -154,73 +97,6 @@ TEST_CASE("Encode 1609", "[encoding]" ) { CHECK(std::strcmp(byte_node.text().get(), ONE609_BSM_HEX) == 0); } -TEST_CASE("Encode ASD_1609", "[encoding]" ) { - std::cout << "=== Encode ASD_1609 ===" << std::endl; - - // prepare - asn1_codec.setup_logger_for_testing(); - - std::stringstream out5; - CHECK(asn1_codec.file_test("unit-test-data/ASD_1609.xml", out5) == EXIT_SUCCESS); - parse_result = output_doc.load(out5, pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_trim_pcdata); - CHECK(parse_result); - payload_node = ode_payload_query.evaluate_node(output_doc).node(); - CHECK(payload_node); - byte_node = payload_node.child("Ieee1609Dot2Data").child("bytes"); - CHECK(byte_node); - CHECK(std::strcmp(byte_node.text().get(), ONE609_BSM_HEX) == 0); - byte_node = payload_node.child("AdvisorySituationData").child("bytes"); - CHECK(byte_node); - CHECK(std::strcmp(byte_node.text().get(), ASD_ONE609_HEX) == 0); -} - -/** - * This unit test is currently failing with the fork of asn1c that we're using (currently `usdot-fhwa-stol/usdot-asn1c`). - * Since encoding BSMs is not a desired feature of the ACM, this test case has been commented out. - */ -// TEST_CASE("Encode 1609_BSM", "[encoding]") { // TODO: fix test case failing -// // prepare -// asn1_codec.setup_logger_for_testing(); - -// std::stringstream out6; -// CHECK(asn1_codec.file_test("unit-test-data/1609_BSM.xml", out6) == EXIT_SUCCESS); -// parse_result = output_doc.load(out6, pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_trim_pcdata); -// CHECK(parse_result); -// payload_node = ode_payload_query.evaluate_node(output_doc).node(); -// CHECK(payload_node); -// byte_node = payload_node.child("Ieee1609Dot2Data").child("bytes"); -// CHECK(byte_node); -// CHECK(std::strcmp(byte_node.text().get(), ONE609_BSM_HEX) == 0); -// byte_node = payload_node.child("MessageFrame").child("bytes"); -// CHECK(byte_node); -// CHECK(std::strcmp(byte_node.text().get(), BSM_HEX) == 0); -// } - -/** - * This unit test is currently failing with the fork of asn1c that we're using (currently `usdot-fhwa-stol/usdot-asn1c`). - * Since encoding BSMs is not a desired feature of the ACM, this test case has been commented out. - */ -// TEST_CASE("Encode ASD_1609_BSM", "[encoding]") { // TODO: fix test case failing -// // prepare -// asn1_codec.setup_logger_for_testing(); - -// std::stringstream out7; -// CHECK(asn1_codec.file_test("unit-test-data/ASD_1609_BSM.xml", out7) == EXIT_SUCCESS); -// parse_result = output_doc.load(out7, pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_trim_pcdata); -// CHECK(parse_result); -// payload_node = ode_payload_query.evaluate_node(output_doc).node(); -// CHECK(payload_node); -// byte_node = payload_node.child("Ieee1609Dot2Data").child("bytes"); -// CHECK(byte_node); -// CHECK(std::strcmp(byte_node.text().get(), ONE609_BSM_HEX) == 0); -// byte_node = payload_node.child("MessageFrame").child("bytes"); -// CHECK(byte_node); -// CHECK(std::strcmp(byte_node.text().get(), BSM_HEX) == 0); -// byte_node = payload_node.child("AdvisorySituationData").child("bytes"); -// CHECK(byte_node); -// CHECK(std::strcmp(byte_node.text().get(), ASD_ONE609_HEX) == 0); -// } - TEST_CASE("Encode TIM with payload type 'OdeTimPayload'", "[encoding][odetimpayload]") { std::cout << "=== Encode TIM with payload type 'OdeTimPayload' ===" << std::endl; @@ -553,4 +429,55 @@ TEST_CASE("Http_Server::post_batch (application/x-ndjson)", "[decoding][http_ser CHECK(response.body.find("") != std::string::npos); CHECK(response.body.find("") != std::string::npos); CHECK(response.body.find("") != std::string::npos); +} + +/** + * A DataFrame can have 1 to 16 regions. 7 regions is a valid case. + */ +TEST_CASE("Encode ASD TIM with 7 regions should succeed", "[encoding][asd]") { + std::cout << "=== Encode ASD TIM with 7 regions should succeed ===" << std::endl; + + // prepare + asn1_codec.setup_logger_for_testing(); + + std::stringstream out10; + CHECK(asn1_codec.file_test("data/InputData.encoding.asd.tim.7regions.441nodes.xml", out10) == EXIT_SUCCESS); + parse_result = output_doc.load(out10, pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_trim_pcdata); + CHECK(parse_result); + payload_node = ode_payload_query.evaluate_node(output_doc).node(); + CHECK(payload_node); +} + +/** +* 16 regions is the maximum number of regions allowed in a DataFrame. +*/ +TEST_CASE("Encode ASD TIM with 16 regions should succeed", "[encoding][asd]") { + std::cout << "=== Encode ASD TIM with 16 regions should succeed ===" << std::endl; + + // prepare + asn1_codec.setup_logger_for_testing(); + + std::stringstream out10; + CHECK(asn1_codec.file_test("data/InputData.encoding.asd.tim.16regions.1008nodes.xml", out10) == EXIT_SUCCESS); + parse_result = output_doc.load(out10, pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_trim_pcdata); + CHECK(parse_result); + payload_node = ode_payload_query.evaluate_node(output_doc).node(); + CHECK(payload_node); +} + +/** +* 17 regions is not allowed in a DataFrame. +*/ +TEST_CASE("Encode ASD TIM with 17 regions should fail", "[encoding][asd]") { + std::cout << "=== Encode ASD TIM with 17 regions should fail ===" << std::endl; + + // prepare + asn1_codec.setup_logger_for_testing(); + + std::stringstream out10; + CHECK(asn1_codec.file_test("data/InputData.encoding.asd.tim.17regions.1071nodes.invalid.xml", out10) == EXIT_FAILURE); + parse_result = output_doc.load(out10, pugi::parse_default | pugi::parse_declaration | pugi::parse_doctype | pugi::parse_trim_pcdata); + CHECK(parse_result); + payload_node = ode_payload_query.evaluate_node(output_doc).node(); + CHECK(payload_node); } \ No newline at end of file diff --git a/supervisord.conf b/supervisord.conf new file mode 100644 index 00000000..c0bea72d --- /dev/null +++ b/supervisord.conf @@ -0,0 +1,33 @@ +; Supervisor config file. +; +; For more information on the config file, please see: +; http://supervisord.org/configuration.html + +[unix_http_server] +file=/build/supervisor.sock ; the path to the socket file + +[supervisord] +logfile=/build/supervisord.log ; main log file; default $CWD/supervisord.log +logfile_maxbytes=10MB ; max main logfile bytes b4 rotation; default 50MB +logfile_backups=2 ; # of main logfile backups; 0 means none, default 10 +loglevel=info ; log level; default info; others: debug,warn,trace +pidfile=/build/supervisord.pid ; supervisord pidfile; default supervisord.pid +nodaemon=true ; start in foreground if true; default false +silent=false ; no logs to stdout if true; default false +minfds=256 ; min. avail startup file descriptors; default 1024 +minprocs=20 ; min. avail process descriptors;default 200 +user=root + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=unix:///build/supervisor.sock ; use a unix:// URL for a unix socket + +[program:asn1codec] +command=/build/acm -c /asn1_codec/config/%(ENV_ACM_CONFIG_FILE)s -b %(ENV_DOCKER_HOST_IP)s:9092 -v %(ENV_ACM_LOG_LEVEL)s -i /build/logs/log_%(process_num)s.info -R +process_name=%(program_name)s_%(process_num)s +directory=/build +numprocs=%(ENV_ACM_NUMBER_OF_PROCESSES)s +autostart=true +autorestart=true \ No newline at end of file