-
Notifications
You must be signed in to change notification settings - Fork 44
Integration testing for decoding UPER encoded BSM JSON string
dan-du-car edited this page Dec 31, 2020
·
1 revision
Integration testing for decoding UPER encoded BSM JSON string.
1. Install, build and run ODE docker images. Refer to https://github.com/usdot-jpo-ode/jpo-ode#installation
#Run command in a running container
docker exec -it <kafka-container-name> bash
#List of all available Kafka topics
/opt/kafka/bin/kafka-topics.sh --list --bootstrap-server localhost:9092
#Send Below Two JSON BSMs to Kafka topic: topic.OdeRawEncodedMessageJson
/opt/kafka/bin/kafka-console-producer.sh --bootstrap-server localhost:9092 --topic topic.OdeRawEncodedMessageJson
{"BsmMessageContent":[{"metadata": {"utctimestamp": "2020-11-30T23:45:24.913657Z"},"payload":"001480CF4B950C400022D2666E923D1EA6D4E28957BD55FFFFF001C758FD7E67D07F7FFF8000000002020218E1C1004A40196FBC042210115C030EF1408801021D4074CE7E1848101C5C0806E8E1A50101A84056EE8A1AB4102B840A9ADA21B9010259C08DEE1C1C560FFDDBFC070C0222210018BFCE309623120FFE9BFBB10C8238A0FFDC3F987114241610009BFB7113024780FFAC3F95F13A26800FED93FDD51202C5E0FE17BF9B31202FBAFFFEC87FC011650090019C70808440C83207873800000000001095084081C903447E31C12FC0"},{"metadata":{"utctimestamp": "2020-11-30T23:45:24.913657Z"},"payload":"001425013FDFC00000009AD276E8B5A5057E880080808000A001000C807D27D281800100000B80B8"}]}
#Display decoded result
/opt/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topic.Asn1DecoderOutput
<?xml version="1.0"?><OdeAsn1Data><metadata><payloadType>us.dot.its.jpo.ode.model.OdeAsn1Payload</payloadType><serialId><streamId>f60e178f-671c-4868-9e29-083610dba0fb</streamId><bundleSize>1</bundleSize><bundleId>0</bundleId><recordId>0</recordId><serialNumber>0</serialNumber></serialId><odeReceivedAt>2020-11-30T23:45:24.913657Z</odeReceivedAt><schemaVersion>6</schemaVersion><maxDurationTime>0</maxDurationTime><odePacketID/><odeTimStartDateTime/><recordGeneratedAt/><recordGeneratedBy/><sanitized>false</sanitized><logFileName/><recordType>bsmTx</recordType><securityResultCode>success</securityResultCode><receivedMessageDetails><locationData><latitude/><longitude/><elevation/><speed/><heading/></locationData><rxSource>RV</rxSource></receivedMessageDetails><encodings><encodings><elementName>unsecuredData</elementName><elementType>MessageFrame</elementType><encodingRule>UPER</encodingRule></encodings></encodings><bsmSource>RV</bsmSource></metadata><payload><dataType>MessageFrame</dataType><data><MessageFrame><messageId>20</messageId><value><BasicSafetyMessage><coreData><msgCnt>46</msgCnt><id>54310000</id><secMark>35657</secMark><lat>389561210</lat><long>-771500090</long><elev>687</elev><accuracy><semiMajor>122</semiMajor><semiMinor>171</semiMinor><orientation>65535</orientation></accuracy><transmission><unavailable/></transmission><speed>3</speed><heading>18264</heading><angle>127</angle><accelSet><long>22</long><lat>0</lat><vert>0</vert><yaw>0</yaw></accelSet><brakes><wheelBrakes>10000</wheelBrakes><traction><unavailable/></traction><abs><unavailable/></abs><scs><unavailable/></scs><brakeBoost><unavailable/></brakeBoost><auxBrakes><unavailable/></auxBrakes></brakes><size><width>0</width><length>0</length></size></coreData><partII><PartIIcontent><partII-Id>0</partII-Id><partII-Value><VehicleSafetyExtensions><pathHistory><crumbData><PathHistoryPoint><latOffset>148</latOffset><lonOffset>203</lonOffset><elevationOffset>-34</elevationOffset><timeOffset>530</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>555</latOffset><lonOffset>391</lonOffset><elevationOffset>-118</elevationOffset><timeOffset>1089</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>1082</latOffset><lonOffset>934</lonOffset><elevationOffset>-193</elevationOffset><timeOffset>3109</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>907</latOffset><lonOffset>1027</lonOffset><elevationOffset>-185</elevationOffset><timeOffset>3369</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>848</latOffset><lonOffset>695</lonOffset><elevationOffset>-187</elevationOffset><timeOffset>3419</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>1392</latOffset><lonOffset>1357</lonOffset><elevationOffset>-303</elevationOffset><timeOffset>3529</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>1203</latOffset><lonOffset>1135</lonOffset><elevationOffset>-242</elevationOffset><timeOffset>3628</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>-69</latOffset><lonOffset>-509</lonOffset><elevationOffset>96</elevationOffset><timeOffset>4370</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>49</latOffset><lonOffset>-399</lonOffset><elevationOffset>75</elevationOffset><timeOffset>4490</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>-45</latOffset><lonOffset>-552</lonOffset><elevationOffset>100</elevationOffset><timeOffset>4550</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>-72</latOffset><lonOffset>-829</lonOffset><elevationOffset>138</elevationOffset><timeOffset>4620</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>19</latOffset><lonOffset>-584</lonOffset><elevationOffset>152</elevationOffset><timeOffset>4669</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>-168</latOffset><lonOffset>-849</lonOffset><elevationOffset>157</elevationOffset><timeOffset>4929</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>-590</latOffset><lonOffset>-278</lonOffset><elevationOffset>144</elevationOffset><timeOffset>5680</timeOffset></PathHistoryPoint><PathHistoryPoint><latOffset>-977</latOffset><lonOffset>-807</lonOffset><elevationOffset>144</elevationOffset><timeOffset>6110</timeOffset></PathHistoryPoint></crumbData></pathHistory><pathPrediction><radiusOfCurve>32767</radiusOfCurve><confidence>200</confidence></pathPrediction><lights>111111111</lights></VehicleSafetyExtensions></partII-Value></PartIIcontent><PartIIcontent><partII-Id>1</partII-Id><partII-Value><SpecialVehicleExtensions><vehicleAlerts><sspRights>0</sspRights><sirenUse><inUse/></sirenUse><lightsUse><inUse/></lightsUse><multi><unavailable/></multi></vehicleAlerts><trailers><sspRights>0</sspRights><connection><pivotOffset>-200</pivotOffset><pivotAngle>28800</pivotAngle><pivots><true/></pivots></connection><units><TrailerUnitDescription><isDolly><false/></isDolly><width>200</width><length>800</length><height>60</height><frontPivot><pivotOffset>-100</pivotOffset><pivotAngle>0</pivotAngle><pivots><false/></pivots></frontPivot><rearPivot><pivotOffset>-1024</pivotOffset><pivotAngle>0</pivotAngle><pivots><false/></pivots></rearPivot><positionOffset><x>74</x><y>66</y></positionOffset></TrailerUnitDescription></units></trailers></SpecialVehicleExtensions></partII-Value></PartIIcontent><PartIIcontent><partII-Id>2</partII-Id><partII-Value><SupplementalVehicleExtensions><classDetails><keyType>63</keyType><role><emergency/></role><hpmsType><axleCnt2/></hpmsType><fuelType>0</fuelType></classDetails><weatherProbe><airTemp>191</airTemp></weatherProbe></SupplementalVehicleExtensions></partII-Value></PartIIcontent></partII></BasicSafetyMessage></value></MessageFrame></data></payload></OdeAsn1Data>
<?xml version="1.0"?><OdeAsn1Data><metadata><payloadType>us.dot.its.jpo.ode.model.OdeAsn1Payload</payloadType><serialId><streamId>ed8bfc9f-5050-4113-88ca-0663942b8017</streamId><bundleSize>1</bundleSize><bundleId>0</bundleId><recordId>0</recordId><serialNumber>0</serialNumber></serialId><odeReceivedAt>2020-11-30T23:45:24.913657Z</odeReceivedAt><schemaVersion>6</schemaVersion><maxDurationTime>0</maxDurationTime><odePacketID/><odeTimStartDateTime/><recordGeneratedAt/><recordGeneratedBy/><sanitized>false</sanitized><logFileName/><recordType>bsmTx</recordType><securityResultCode>success</securityResultCode><receivedMessageDetails><locationData><latitude/><longitude/><elevation/><speed/><heading/></locationData><rxSource>RV</rxSource></receivedMessageDetails><encodings><encodings><elementName>unsecuredData</elementName><elementType>MessageFrame</elementType><encodingRule>UPER</encodingRule></encodings></encodings><bsmSource>RV</bsmSource></metadata><payload><dataType>MessageFrame</dataType><data><MessageFrame><messageId>20</messageId><value><BasicSafetyMessage><coreData><msgCnt>4</msgCnt><id>FF7F0000</id><secMark>2</secMark><lat>1233</lat><long>14590</long><elev>1</elev><accuracy><semiMajor>1</semiMajor><semiMinor>1</semiMinor><orientation>1</orientation></accuracy><transmission><forwardGears/></transmission><speed>2</speed><heading>12</heading><angle>2</angle><accelSet><long>2</long><lat>2</lat><vert>2</vert><yaw>2</yaw></accelSet><brakes><wheelBrakes>00000</wheelBrakes><traction><unavailable/></traction><abs><unavailable/></abs><scs><unavailable/></scs><brakeBoost><unavailable/></brakeBoost><auxBrakes><unavailable/></auxBrakes></brakes><size><width>23</width><length>23</length></size></coreData></BasicSafetyMessage></value></MessageFrame></data></payload></OdeAsn1Data>
- Decode a file with asn1c
- Deposit BSM to S3
- Docker fix for SSL issues due to corporate network
- Docker management
- ECDSA Primer
- Filter BSMs through PPM module
- Geofence Filtering for PPM
- Import BSMs from RSU log file
- Import TIMs from RSU log file
- jpo security svcs Integration
- Link host directory to Docker directory
- Migrating from SDW websocket depositor to SDW Depositor Submodule
- ODE Release Deployment
- ODE Release Preparation
- Prepare a fresh Ubuntu instance for ODE installation
- Process for Handling Bugs (Code Defects)
- Run the ODE using the ASN codec module
- Query RSU for set TIMs
- Schema Version 6 Change Notice
- Signed Message File Import
- TIM REST Endpoint Changes
- Using the .env configuration file
- Using the ODE test harness
- Delete TIM on RSU test
- Event Logger Test
- Import Decode and Deliver BSM Test
- Manage SNMP Test
- Sending PDM to RSU Test
- Sending TIM to RSU Test
- Submit_TIM_To_SDW Test
- Log File Changes (schemaVersion=4)
- Receive BSMs over UDP
- Receive ISD via UDP and deposit to SDC
- Receive VSD via UDP and deposit to SDC
- Run the crypto test vectors code with ODE team's OSS encoder
- SchemaVersion 5 Change Notice