Skip to content

Commit

Permalink
update name
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Jul 25, 2023
1 parent a10a294 commit d1b6086
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/v2i-hub/CARMAStreetsPlugin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@
"description": "Apache Kafka consumer group ID for spat consumer."
},
{
"key": "SimExternalObjTopic",
"default": "v2xhub_sim_external_object",
"description": "Apache Kafka topic plugin will transmit simulated external object to."
"key": "SimSensorDetectedObjTopic",
"default": "v2xhub_sim_sensor_detected_object",
"description": "Apache Kafka topic plugin will transmit simulated sensor detected object to."
}

]
Expand Down
10 changes: 5 additions & 5 deletions src/v2i-hub/CARMAStreetsPlugin/src/CARMAStreetsPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CARMAStreetsPlugin::CARMAStreetsPlugin(string name) :
AddMessageFilter < tsm2Message > (this, &CARMAStreetsPlugin::HandleMobilityPathMessage);
AddMessageFilter < MapDataMessage > (this, &CARMAStreetsPlugin::HandleMapMessage);
AddMessageFilter < SrmMessage > (this, &CARMAStreetsPlugin::HandleSRMMessage);
AddMessageFilter < simulation::SensorDetectedObject > (this, &CARMAStreetsPlugin::HandleSimulatedExternalMessage );
AddMessageFilter < simulation::SensorDetectedObject > (this, &CARMAStreetsPlugin::HandleSimulatedSensorDetectedMessage );

SubscribeToMessages();
}
Expand All @@ -51,7 +51,7 @@ void CARMAStreetsPlugin::UpdateConfigSettings() {
GetConfigValue<string>("MobilityPathTopic", _transmitMobilityPathTopic);
GetConfigValue<string>("MapTopic", _transmitMAPTopic);
GetConfigValue<string>("SRMTopic", _transmitSRMTopic);
GetConfigValue<string>("SimExternalObjTopic", _transmitSimExternalObjTopic);
GetConfigValue<string>("SimSensorDetectedObjTopic", _transmitSimSensorDetectedObjTopic);
// Populate strategies config
string config;
GetConfigValue<string>("MobilityOperationStrategies", config);
Expand Down Expand Up @@ -630,10 +630,10 @@ void CARMAStreetsPlugin::SubscribeSSMKafkaTopic(){

}

void CARMAStreetsPlugin::HandleSimulatedExternalMessage(simulation::SensorDetectedObject &msg, routeable_message &routeableMsg)
void CARMAStreetsPlugin::HandleSimulatedSensorDetectedMessage(simulation::SensorDetectedObject &msg, routeable_message &routeableMsg)
{
PLOG(logINFO) << "Produce External Object Message in JSON format: " << msg.to_string() <<std::endl;
produce_kafka_msg( msg.to_string(), _transmitSimExternalObjTopic);
PLOG(logINFO) << "Produce sensor detected message in JSON format: " << msg.to_string() <<std::endl;
produce_kafka_msg( msg.to_string(), _transmitSimSensorDetectedObjTopic);
}

bool CARMAStreetsPlugin::getEncodedtsm3( tsm3EncodedMessage *tsm3EncodedMsg, Json::Value metadata, Json::Value payload_json )
Expand Down
4 changes: 2 additions & 2 deletions src/v2i-hub/CARMAStreetsPlugin/src/CARMAStreetsPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CARMAStreetsPlugin: public PluginClientClockAware {
void HandleMobilityOperationMessage(tsm3Message &msg, routeable_message &routeableMsg);
void HandleMobilityPathMessage(tsm2Message &msg, routeable_message &routeableMsg);
void HandleBasicSafetyMessage(BsmMessage &msg, routeable_message &routeableMsg);
void HandleSimulatedExternalMessage(simulation::SensorDetectedObject &msg, routeable_message &routeableMsg);
void HandleSimulatedSensorDetectedMessage(simulation::SensorDetectedObject &msg, routeable_message &routeableMsg);
/**
* @brief Overide PluginClientClockAware HandleTimeSyncMessage to producer TimeSyncMessage to kafka for CARMA Streets Time Synchronization.
* @param msg TimeSyncMessage received by plugin when in simulation mode. Message provides current simulation time to all processes.
Expand Down Expand Up @@ -106,7 +106,7 @@ class CARMAStreetsPlugin: public PluginClientClockAware {
std::string _transmitBSMTopic;
std::string _transmitMAPTopic;
std::string _transmitSRMTopic;
std::string _transmitSimExternalObjTopic;
std::string _transmitSimSensorDetectedObjTopic;
std::string _kafkaBrokerIp;
std::string _kafkaBrokerPort;
std::shared_ptr<kafka_producer_worker> _kafka_producer_ptr;
Expand Down

0 comments on commit d1b6086

Please sign in to comment.