Skip to content

Commit

Permalink
CDAR-756: Remove detection regex manipulation
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbourelly999 committed Feb 2, 2024
1 parent 136439a commit 3c35b00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/v2i-hub/CARMAStreetsPlugin/src/CARMAStreetsPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -712,10 +712,10 @@ void CARMAStreetsPlugin::HandleSimulatedSensorDetectedMessage(simulation::Sensor
// and from json. This temporary fix simply using regex to look for numeric,
// null, and bool values and removes the quotations around them.
PLOG(logDEBUG) << "Produce sensor detected message in JSON format: " << msg.to_string() <<std::endl;
boost::regex exp("\"(null|true|false|-?[0-9]+(\\.[0-9]+)?)\"");
std::stringstream ss;
std::string rv = boost::regex_replace(msg.to_string(), exp, "$1");
produce_kafka_msg( rv, _transmitSimSensorDetectedObjTopic);
// boost::regex exp("\"(null|true|false|-?[0-9]+(\\.[0-9]+)?)\"");
// std::stringstream ss;
// std::string rv = boost::regex_replace(msg.to_string(), exp, "$1");
produce_kafka_msg( msg.to_string() , _transmitSimSensorDetectedObjTopic);
}

bool CARMAStreetsPlugin::getEncodedtsm3( tsm3EncodedMessage *tsm3EncodedMsg, Json::Value metadata, Json::Value payload_json )
Expand Down

0 comments on commit 3c35b00

Please sign in to comment.