From bd8eccee75cc2d685374478148f8167ac288a78e Mon Sep 17 00:00:00 2001 From: Adam Mitz Date: Fri, 2 Feb 2024 10:17:24 -0600 Subject: [PATCH] Updated for recent changes in OpenDDS transport/discovery APIs --- src/main_window.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main_window.cpp b/src/main_window.cpp index db5f7cb..2123339 100644 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -352,18 +352,18 @@ void DDSMonitorMainWindow::reportConfig() const if (discoveryMap.find(discoveryKey) != discoveryMap.end()) { const OpenDDS::DCPS::Discovery_rch discoveryInfo = discoveryMap.at(discoveryKey); - const OpenDDS::RTPS::RtpsDiscovery* rtspInfo = + const OpenDDS::RTPS::RtpsDiscovery* rtpsInfo = dynamic_cast (discoveryInfo.in()); // Only care about RTPS for now - if (rtspInfo) + if (rtpsInfo) { // Ports are defined from RTPS discovery spec - const uint16_t pb = rtspInfo->pb(); // Port base [7400] - const uint16_t dg = rtspInfo->dg(); // Domain ID gain [250] + const uint16_t pb = rtpsInfo->pb(); // Port base [7400] + const uint16_t dg = rtpsInfo->dg(); // Domain ID gain [250] //const uint16_t pg = rtspInfo->pg(); // Participant ID gain [2] - const uint16_t d0 = rtspInfo->d0(); // Discovery multicast port offset [0] + const uint16_t d0 = rtpsInfo->d0(); // Discovery multicast port offset [0] //const uint16_t d1 = rtspInfo->d1(); // Discovery unicast port offset [10] //const uint16_t d2 = 1; // User data multicast port offset //const uint16_t d3 = 11; // User data unicast port offset @@ -375,7 +375,7 @@ void DDSMonitorMainWindow::reportConfig() const //const uint16_t userMulicastPort = pb + (dg * domainID) + d2; std::cout << "\nDiscovery multicast: " - << rtspInfo->default_multicast_group().get_host_addr() + << rtpsInfo->default_multicast_group(domainID).to_addr().get_host_addr() << ":" << discoveryMulicastPort //<< "\nDiscovery unicast: " @@ -399,11 +399,11 @@ void DDSMonitorMainWindow::reportConfig() const //<< "\nGUID interface: " //<< rtspInfo->guid_interface() << "\nSupports liveliness: " - << rtspInfo->supports_liveliness() + << rtpsInfo->supports_liveliness() << "\nResend period: " - << rtspInfo->resend_period().to_dds_duration().sec + << rtpsInfo->resend_period().to_dds_duration().sec << "\nTTL: " - << static_cast(rtspInfo->ttl()) + << static_cast(rtpsInfo->ttl()) //<< "\nPB: " << pb //<< "\nDG: " << dg //<< "\nPG: " << pg @@ -438,7 +438,7 @@ void DDSMonitorMainWindow::reportConfig() const const OpenDDS::DCPS::TransportInst_rch transportInstance = transportConfig->instances_[i]; - std::cout << transportInstance->dump_to_str() << "\n"; + std::cout << transportInstance->dump_to_str(domainID) << "\n"; } } // End DDSMonitorMainWindow::reportConfig