Skip to content

Commit

Permalink
Added unit tests with integration testing data
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbourelly999 committed Dec 17, 2023
1 parent b6b17ea commit 422dcac
Show file tree
Hide file tree
Showing 2 changed files with 299 additions and 69 deletions.
7 changes: 3 additions & 4 deletions src/v2i-hub/CARMAStreetsPlugin/src/CARMAStreetsPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,23 +685,22 @@ void CARMAStreetsPlugin::SubscribeSDSMKafkaTopic(){
{
sdsm_convertor.encodeSDSM(sdsm_ptr, sdsmEncodedMsg);
}
catch (TmxException &ex)
catch (const TmxException &ex)
{
// Skip messages that fail to encode.
PLOG(logERROR) << "Failed to encoded SDSM message : \n" << payload_str << std::endl << "Exception encountered: "
<< ex.what() << std::endl;
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_SensorDataSharingMessage, sdsm_ptr.get()); // may be unnecessary
SetStatus<uint>(Key_SDSMMessageSkipped, ++_sdsmMessageSkipped);
continue;
}

ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_SensorDataSharingMessage, sdsm_ptr.get()); // same as above
PLOG(logDEBUG) << "sdsmEncodedMsg: " << sdsmEncodedMsg;

//Broadcast the encoded SDSM message
sdsmEncodedMsg.set_flags(IvpMsgFlags_RouteDSRC);
sdsmEncodedMsg.addDsrcMetadata(0x8002);
BroadcastMessage(static_cast<routeable_message &>(sdsmEncodedMsg));
BroadcastMessage(static_cast<routeable_message &>(sdsmEncodedMsg));

}
}
}
Expand Down
Loading

0 comments on commit 422dcac

Please sign in to comment.