Skip to content

Commit

Permalink
Merge pull request #24 from usdot-fhwa-stol/test/sim-carma-messenger
Browse files Browse the repository at this point in the history
CARMA Messenger Integration Test
  • Loading branch information
kjrush authored Dec 23, 2024
2 parents 3dc76f0 + c43960e commit b25d246
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ns3_adapter/src/ns3_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,11 @@ std::string NS3Adapter::compose_handshake_msg(const std::string& veh_id, const s

rapidjson::Value idtextPart;
idtextPart.SetString(veh_id.c_str(), allocator);
document.AddMember("carmaVehicleId", idtextPart, allocator);
document.AddMember("vehicleId", idtextPart, allocator);

rapidjson::Value roletextPart;
roletextPart.SetString(role_id.c_str(), allocator);
document.AddMember("carlaVehicleRole", roletextPart, allocator);
document.AddMember("vehicleRole", roletextPart, allocator);

rapidjson::Value iptextPart;
iptextPart.SetString(ip.c_str(), allocator);
Expand Down
2 changes: 1 addition & 1 deletion ns3_adapter/test/test_ns3_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ TEST(NS3AdapterTest, testcompose_handshake_msg)
char* argv[] {c[0], c[1]};
NS3Adapter worker(argc,argv);
std::string result = worker.compose_handshake_msg("default_id", "ego1", 2000, 2001, "127.0.0.1");
EXPECT_EQ(result, "{\"carmaVehicleId\":\"default_id\",\"carlaVehicleRole\":\"ego1\",\"rxMessageIpAddress\":\"127.0.0.1\",\"rxMessagePort\":2000,\"rxTimeSyncPort\":2001}");
EXPECT_EQ(result, "{\"vehicleId\":\"default_id\",\"vehicleRole\":\"ego1\",\"rxMessageIpAddress\":\"127.0.0.1\",\"rxMessagePort\":2000,\"rxTimeSyncPort\":2001}");
}

TEST(NS3Adapter, testNS3ClientSSM)
Expand Down

0 comments on commit b25d246

Please sign in to comment.