Skip to content

Commit

Permalink
Merge pull request #43 from Michael7371/psm-data-feed
Browse files Browse the repository at this point in the history
PSM Data Feed Addition
  • Loading branch information
payneBrandon authored Nov 27, 2023
2 parents 35e4202 + 5f9af98 commit d424a67
Show file tree
Hide file tree
Showing 43 changed files with 2,237 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Supported message types:
- SPaT
- SRM
- SSM
- PSM

1. Navigate to the [UDP sender Python scripts](<./scripts/tests/>) in the project.
2. Ensure the environment variable "DOCKER_HOST_IP" has been set in the shell that will be running the script. This must be set to the same IP that the ODE deployments are using.
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
KAFKA_ADVERTISED_HOST_NAME: ${DOCKER_HOST_IP}
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_CREATE_TOPICS: "topic.OdeBsmPojo:1:1,topic.OdeSpatTxPojo:1:1,topic.OdeSpatPojo:1:1,topic.OdeSpatJson:1:1,topic.FilteredOdeSpatJson:1:1,topic.OdeSpatRxJson:1:1,topic.OdeSpatRxPojo:1:1,topic.OdeBsmJson:1:1,topic.FilteredOdeBsmJson:1:1,topic.OdeTimJson:1:1,topic.OdeTimBroadcastJson:1:1,topic.J2735TimBroadcastJson:1:1,topic.OdeDriverAlertJson:1:1,topic.Asn1DecoderInput:1:1,topic.Asn1DecoderOutput:1:1,topic.Asn1EncoderInput:1:1,topic.Asn1EncoderOutput:1:1,topic.SDWDepositorInput:1:1,topic.OdeTIMCertExpirationTimeJson:1:1,topic.OdeRawEncodedBSMJson:1:1,topic.OdeRawEncodedSPATJson:1:1,topic.OdeRawEncodedTIMJson:1:1,topic.OdeRawEncodedMAPJson:1:1,topic.OdeMapTxPojo:1:1,topic.OdeMapJson:1:1,topic.OdeRawEncodedSSMJson:1:1,topic.OdeSsmPojo:1:1,topic.OdeSsmJson:1:1,topic.OdeRawEncodedSRMJson:1:1,topic.OdeSrmTxPojo:1:1,topic.OdeSrmJson:1:1"
KAFKA_CREATE_TOPICS: "topic.OdeBsmPojo:1:1,topic.OdeSpatTxPojo:1:1,topic.OdeSpatPojo:1:1,topic.OdeSpatJson:1:1,topic.FilteredOdeSpatJson:1:1,topic.OdeSpatRxJson:1:1,topic.OdeSpatRxPojo:1:1,topic.OdeBsmJson:1:1,topic.FilteredOdeBsmJson:1:1,topic.OdeTimJson:1:1,topic.OdeTimBroadcastJson:1:1,topic.J2735TimBroadcastJson:1:1,topic.OdeDriverAlertJson:1:1,topic.Asn1DecoderInput:1:1,topic.Asn1DecoderOutput:1:1,topic.Asn1EncoderInput:1:1,topic.Asn1EncoderOutput:1:1,topic.SDWDepositorInput:1:1,topic.OdeTIMCertExpirationTimeJson:1:1,topic.OdeRawEncodedBSMJson:1:1,topic.OdeRawEncodedSPATJson:1:1,topic.OdeRawEncodedTIMJson:1:1,topic.OdeRawEncodedMAPJson:1:1,topic.OdeMapTxPojo:1:1,topic.OdeMapJson:1:1,topic.OdeRawEncodedSSMJson:1:1,topic.OdeSsmPojo:1:1,topic.OdeSsmJson:1:1,topic.OdeRawEncodedSRMJson:1:1,topic.OdeSrmTxPojo:1:1,topic.OdeSrmJson:1:1,topic.OdeRawEncodedPSMJson:1:1,topic.OdePsmTxPojo:1:1,topic.OdePsmJson:1:1"
KAFKA_DELETE_TOPIC_ENABLED: "true"
KAFKA_CLEANUP_POLICY: "delete" # delete old logs
KAFKA_LOG_RETENTION_HOURS: 2
Expand Down Expand Up @@ -53,6 +53,7 @@ services:
- "44910:44910/udp"
- "44920:44920/udp"
- "44930:44930/udp"
- "44940:44940/udp"
- "5555:5555/udp"
- "6666:6666/udp"
environment:
Expand Down
11 changes: 10 additions & 1 deletion docs/data-flow-diagrams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,13 @@ The purpose of these diagrams is to show:
1. The [ACM](https://github.com/usdot-jpo-ode/asn1_codec) pulls from the Asn1DecoderInput topic, decodes the SSM, and pushes it to the Asn1DecoderOutput topic.
1. The AsnCodecRouterServiceController class pulls from the Asn1DecoderOutput topic and passes the SSM to the Asn1DecodedDataRouter class.
1. The Asn1DecodedDataRouter class pushes the SSM to the OdeSsmTxPojo and OdeSsmJson topics.
1. The FileUploadController pulls from the OdeSsmJson topic and offloads the SSM.
1. The FileUploadController pulls from the OdeSsmJson topic and offloads the SSM.

### PSM Data Flow
1. The PSM comes in through the PsmReceiver class and is pushed to the OdeRawEncodedPSMJson topic.
1. The AsnCodecMessageServiceController class pulls from the OdeRawEncodedPSMJson topic and passes the PSM to the Asn1DecodePSMJSON class.
1. The Asn1DecodePSMJSON class pushes the PSM to the Asn1DecoderInput topic.
1. The [ACM](https://github.com/usdot-jpo-ode/asn1_codec) pulls from the Asn1DecoderInput topic, decodes the PSM, and pushes it to the Asn1DecoderOutput topic.
1. The AsnCodecRouterServiceController class pulls from the Asn1DecoderOutput topic and passes the PSM to the Asn1DecodedDataRouter class.
1. The Asn1DecodedDataRouter class pushes the PSM to the OdePsmTxPojo and OdePsmJson topics.
1. The FileUploadController pulls from the OdePsmJson topic and offloads the PSM.
121 changes: 121 additions & 0 deletions docs/data-flow-diagrams/psm/PSM Data Flow.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<mxfile host="app.diagrams.net" modified="2023-09-27T18:11:45.070Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.43" etag="zyST0KjHg-Jb4oEt0_Pi" version="21.8.2" type="device">
<diagram id="C5RBs43oDa-KdzZeNtuy" name="Page-1">
<mxGraphModel dx="2394" dy="2100" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="WIyWlLk6GJQsqaUBKTNV-1" parent="WIyWlLk6GJQsqaUBKTNV-0" />
<mxCell id="VzqX0gNSxUYhQbhme7EZ-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=1;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8ujiRsxlkH-QBAE6qNTh-2" target="VzqX0gNSxUYhQbhme7EZ-0" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="VzqX0gNSxUYhQbhme7EZ-3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=1;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="8ujiRsxlkH-QBAE6qNTh-2" target="VzqX0gNSxUYhQbhme7EZ-1" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="8ujiRsxlkH-QBAE6qNTh-2" value="Asn1DecodedDataRouter.java" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-35" y="-140" width="170" height="60" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="gxxZRGfVhdAJ79STQYsQ-5" target="gxxZRGfVhdAJ79STQYsQ-19" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-5" value="ACM (ADM)" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-240" y="-430" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="_VHhroGQ1N4wH_tI7Nl9-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="gxxZRGfVhdAJ79STQYsQ-9" target="gxxZRGfVhdAJ79STQYsQ-62" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-9" value="AsnCodecMessageServiceController.java" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-485" y="-644" width="230" height="60" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="gxxZRGfVhdAJ79STQYsQ-13" target="gxxZRGfVhdAJ79STQYsQ-5" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-13" value="Asn1DecoderInput" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-430" y="-440" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-116" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="gxxZRGfVhdAJ79STQYsQ-19" target="gxxZRGfVhdAJ79STQYsQ-105" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-19" value="Asn1DecoderOutput" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-55" y="-440" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-57" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="gxxZRGfVhdAJ79STQYsQ-58" target="gxxZRGfVhdAJ79STQYsQ-60" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-58" value="PsmReceiver.java" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-430" y="-860" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="_VHhroGQ1N4wH_tI7Nl9-1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="gxxZRGfVhdAJ79STQYsQ-60" target="gxxZRGfVhdAJ79STQYsQ-9" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-60" value="OdeRawEncodedPSMJson" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-455" y="-760" width="170" height="80" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-65" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="gxxZRGfVhdAJ79STQYsQ-62" target="gxxZRGfVhdAJ79STQYsQ-13" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-62" value="Asn1DecodePSMJSON.java" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-450" y="-540" width="160" height="60" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-108" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="gxxZRGfVhdAJ79STQYsQ-105" target="8ujiRsxlkH-QBAE6qNTh-2" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="gxxZRGfVhdAJ79STQYsQ-105" value="AsnCodecRouterServiceController.java" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-100" y="-300" width="210" height="60" as="geometry" />
</mxCell>
<mxCell id="_VHhroGQ1N4wH_tI7Nl9-0" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="jXXAGItoZEFWX7bIlFFn-11" target="gxxZRGfVhdAJ79STQYsQ-58" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="jXXAGItoZEFWX7bIlFFn-11" value="" style="ellipse;shape=cloud;whiteSpace=wrap;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-430" y="-990" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="_VHhroGQ1N4wH_tI7Nl9-4" value="" style="group" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1" connectable="0">
<mxGeometry x="180" y="-884" width="300" height="600" as="geometry" />
</mxCell>
<mxCell id="_VHhroGQ1N4wH_tI7Nl9-5" value="&lt;font style=&quot;font-size: 24px&quot;&gt;Submodule&lt;/font&gt;" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fillColor=#d5e8d4;strokeColor=#82b366;labelBackgroundColor=none;" parent="_VHhroGQ1N4wH_tI7Nl9-4" vertex="1">
<mxGeometry x="56.25" y="336.5853658536585" width="180" height="87.80487804878048" as="geometry" />
</mxCell>
<mxCell id="_VHhroGQ1N4wH_tI7Nl9-6" value="Key" style="swimlane;labelBackgroundColor=none;fontSize=18;" parent="_VHhroGQ1N4wH_tI7Nl9-4" vertex="1">
<mxGeometry width="299.99999999999994" height="600" as="geometry" />
</mxCell>
<mxCell id="_VHhroGQ1N4wH_tI7Nl9-8" value="" style="endArrow=classic;html=1;rounded=0;labelBackgroundColor=none;" parent="_VHhroGQ1N4wH_tI7Nl9-6" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="108.75" y="541.4634146341463" as="sourcePoint" />
<mxPoint x="183.74999999999997" y="468.29268292682923" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="_VHhroGQ1N4wH_tI7Nl9-9" value="&lt;font style=&quot;font-size: 24px&quot;&gt;Kafka Topic&lt;/font&gt;" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;labelBackgroundColor=none;" parent="_VHhroGQ1N4wH_tI7Nl9-6" vertex="1">
<mxGeometry x="56.25" y="175.60975609756096" width="180" height="117.07317073170731" as="geometry" />
</mxCell>
<mxCell id="_VHhroGQ1N4wH_tI7Nl9-10" value="&lt;font style=&quot;font-size: 24px&quot;&gt;ODE Java Class&lt;/font&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;labelBackgroundColor=none;" parent="_VHhroGQ1N4wH_tI7Nl9-6" vertex="1">
<mxGeometry x="48.13" y="58.54" width="196.25" height="87.8" as="geometry" />
</mxCell>
<mxCell id="OYyFW5qYjDA_U_2kRjRC-9" value="FileUploadController.java" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="75" y="130" width="150" height="60" as="geometry" />
</mxCell>
<mxCell id="VzqX0gNSxUYhQbhme7EZ-0" value="OdePsmTxPojo" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-120" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="VzqX0gNSxUYhQbhme7EZ-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="WIyWlLk6GJQsqaUBKTNV-1" source="VzqX0gNSxUYhQbhme7EZ-1" target="OYyFW5qYjDA_U_2kRjRC-9" edge="1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="VzqX0gNSxUYhQbhme7EZ-1" value="OdePsmJson" style="ellipse;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="90" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="Ak_uoQ98FiocAXNaD4mG-0" value="message arrives encoded with Asn1.c" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-285" y="-730" width="220" height="20" as="geometry" />
</mxCell>
<mxCell id="Ak_uoQ98FiocAXNaD4mG-1" value="message is decoded from Asn1.c" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-235" y="-370" width="110" height="50" as="geometry" />
</mxCell>
<mxCell id="Ak_uoQ98FiocAXNaD4mG-2" value="&lt;font style=&quot;font-size: 24px&quot;&gt;Data Flow&lt;/font&gt;" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;labelBackgroundColor=none;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="270" y="-342.53999999999996" width="120" height="43.9" as="geometry" />
</mxCell>
<mxCell id="Ak_uoQ98FiocAXNaD4mG-3" value="messages are in JSON format" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="210" y="15" width="105" height="50" as="geometry" />
</mxCell>
<mxCell id="Ak_uoQ98FiocAXNaD4mG-4" value="messages are in POJO format" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" parent="WIyWlLk6GJQsqaUBKTNV-1" vertex="1">
<mxGeometry x="-112.5" y="80" width="105" height="50" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/userguide/figure1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/schemas/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The jpo-ode supports receiving and decoding ASN1 messages from RSUs. The support
- [topic.OdeSpatJson](../../jpo-ode-core/src/main/resources/schemas/schema-spat.json)
- [topic.OdeSrmJson](../../jpo-ode-core/src/main/resources/schemas/schema-srm.json)
- [topic.OdeSsmJson](../../jpo-ode-core/src/main/resources/schemas/schema-ssm.json)
- [topic.OdePsmJson](../../jpo-ode-core/src/main/resources/schemas/schema-psm.json)

The output JSON of the ODE is complex but it is similar to the official standard of J2735 with some minor differences due to the form of their deserialized POJOs. To help implement proper data validation for the JSON output of the ODE into any data pipeline infrastructure, you may use the provided validation schemas within this directory.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class OdeLogMetadata extends OdeMsgMetadata {
private static final long serialVersionUID = -8601265839394150140L;

public enum RecordType {
bsmLogDuringEvent, rxMsg, dnMsg, bsmTx, driverAlert, mapTx, spatTx, ssmTx, srmTx, timMsg, unsupported
bsmLogDuringEvent, rxMsg, dnMsg, bsmTx, driverAlert, mapTx, spatTx, ssmTx, srmTx, timMsg, psmTx, unsupported
}

public enum SecurityResultCode {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package us.dot.its.jpo.ode.model;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import static com.fasterxml.jackson.annotation.JsonTypeInfo.*;

public class OdePsmData extends OdeData {

private static final long serialVersionUID = 4944935387116447760L;

public OdePsmData() {
super();
}

public OdePsmData(OdeMsgMetadata metadata, OdeMsgPayload payload) {
super(metadata, payload);
}

@Override
@JsonTypeInfo(use = Id.CLASS, include = As.EXISTING_PROPERTY, defaultImpl = OdePsmMetadata.class)
public void setMetadata(OdeMsgMetadata metadata) {
super.setMetadata(metadata);
}

@Override
@JsonTypeInfo(use = Id.CLASS, include = As.EXISTING_PROPERTY, defaultImpl = OdePsmPayload.class)
public void setPayload(OdeMsgPayload payload) {
super.setPayload(payload);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package us.dot.its.jpo.ode.model;


public class OdePsmMetadata extends OdeLogMetadata {

private static final long serialVersionUID = 1L;

public enum PsmSource {
RSU, V2X, MMITSS, unknown
}

private PsmSource psmSource;
private String originIp;

public PsmSource getPsmSource() {
return psmSource;
}
public OdePsmMetadata() {
super();
}

public OdePsmMetadata(OdeMsgPayload payload) {
super(payload);
}

public void setPsmSource(PsmSource psmSource) {
this.psmSource = psmSource;
}

public String getOriginIp() {
return originIp;
}

public void setOriginIp(String originIp) {
this.originIp = originIp;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package us.dot.its.jpo.ode.model;

import com.fasterxml.jackson.annotation.*;

import us.dot.its.jpo.ode.plugin.j2735.J2735PSM;

public class OdePsmPayload extends OdeMsgPayload {

private static final long serialVersionUID = 1L;

public OdePsmPayload() {
this(new J2735PSM());
}

@JsonCreator
public OdePsmPayload( @JsonProperty("data") J2735PSM psm) {
super(psm);
this.setData(psm);
}

@JsonProperty("data")
public J2735PSM getPsm() {
return (J2735PSM) getData();
}

public void setPsm(J2735PSM psm) {
setData(psm);
}
}
Loading

0 comments on commit d424a67

Please sign in to comment.