Skip to content

Commit

Permalink
Merge branch 'master' into test_app_updates
Browse files Browse the repository at this point in the history
  • Loading branch information
iguessthislldo committed Feb 8, 2024
2 parents 8613a60 + 565e6c3 commit db5bf70
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 83 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Set update schedule for GitHub Actions
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,30 @@ jobs:
steps:
# Clone git repositories
- name: 'Checkout opendds-monitor'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true
- name: 'Checkout MPC'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: DOCGroup/MPC
path: MPC
fetch-depth: 1
- name: 'Checkout ACE_TAO'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: DOCGroup/ACE_TAO
ref: ace6tao2
path: ACE_TAO
fetch-depth: 1
- name: 'Checkout OpenDDS'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: OpenDDS/OpenDDS
ref: ${{ matrix.opendds_branch }}
path: OpenDDS
fetch-depth: 1
submodules: true

# Get 3rd-party Dependencies
- name: 'Install openssl, xerces, qt5, and qwt (Linux)'
Expand All @@ -82,7 +83,7 @@ jobs:
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: 688ece714204fb5e9ad790ad9ad6d9f571d2b032
vcpkgGitCommitId: 53bef8994c541b6561884a8395ea35715ece75db
runVcpkgInstall: true

# Set Up Build Environments
Expand Down Expand Up @@ -150,7 +151,7 @@ jobs:
# Configure and build OpenDDS (using cache)
- name: 'Check Build Cache'
id: cache-build
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.MATRIX_MD5 }}.tar.xz
key: c01_${{ env.MATRIX_MD5 }}_${{ env.COMPILER_MD5 }}_${{ env.ACE_COMMIT }}_${{ env.DDS_COMMIT }}_${{ env.CONFIG_MD5 }}
Expand Down Expand Up @@ -218,10 +219,10 @@ jobs:
# Build opendds-monitor
- name: 'Set Up Problem Matcher (Windows)'
if: runner.os == 'Windows'
uses: ammaraskar/msvc-problem-matcher@0.2.0
uses: ammaraskar/msvc-problem-matcher@0.3.0
- name: 'Set Up Problem Matcher (Linux / macOS)'
if: runner.os == 'Linux' || runner.os == 'macOS'
uses: ammaraskar/gcc-problem-matcher@0.2.0
uses: ammaraskar/gcc-problem-matcher@0.3.0
- name: 'Build opendds-monitor (Linux / macOS)'
if: runner.os == 'Linux' || runner.os == 'macOS'
shell: bash
Expand Down
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ endif()

find_package(Qt5 REQUIRED COMPONENTS Core Widgets Gui PrintSupport Svg OpenGL OPTIONAL_COMPONENTS ${qt_optional_components})

if(${QWT_IS_LOCAL})
set(QWT_LIBRARY ${CMAKE_SOURCE_DIR}/qwt/lib/qwt$<$<CONFIG:DEBUG>:d>.lib)
set(QWT_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/qwt/src)
if(QWT_IS_LOCAL)
set(QWT_LIBRARY ${PROJECT_SOURCE_DIR}/qwt/lib/qwt$<$<CONFIG:DEBUG>:d>.lib)
set(QWT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/qwt/src)
else()
# FindQwt.cmake is in this directory
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
find_package(Qwt MODULE REQUIRED)
endif()

Expand Down Expand Up @@ -121,8 +121,6 @@ endif()

target_compile_options(monitor PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>: -Wall -Wextra -Wpedantic -Wno-unused -Wunused-parameter> $<$<CXX_COMPILER_ID:MSVC>: /W4>)

add_dependencies(monitor OpenDDW)

target_link_libraries(monitor
OpenDDW
${QWT_LIBRARY}
Expand Down
25 changes: 14 additions & 11 deletions FindQwt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,21 @@ FIND_PATH(QWT_INCLUDE_DIR NAMES qwt.h PATHS
PATH_SUFFIXES qwt-qt5 qwt qwt6 qt5/qwt
)

IF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
SET(QWT_FOUND TRUE)
ENDIF (QWT_INCLUDE_DIR AND QWT_LIBRARY)
if(QWT_INCLUDE_DIR AND QWT_LIBRARY)
set(Qwt_FOUND TRUE)

IF (QWT_FOUND)
FILE(READ ${QWT_INCLUDE_DIR}/qwt_global.h qwt_header)
STRING(REGEX REPLACE "^.*QWT_VERSION_STR +\"([^\"]+)\".*$" "\\1" QWT_VERSION_STR "${qwt_header}")
IF (NOT QWT_FIND_QUIETLY)

if(NOT Qwt_FIND_QUIETLY)
MESSAGE(STATUS "Found Qwt: ${QWT_LIBRARY} (${QWT_VERSION_STR})")
ENDIF (NOT QWT_FIND_QUIETLY)
ELSE (QWT_FOUND)
IF (QWT_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Qwt")
ENDIF (QWT_FIND_REQUIRED)
ENDIF (QWT_FOUND)
endif()
else()
set(Qwt_FOUND FALSE)

if(Qwt_FIND_REQUIRED)
message(FATAL_ERROR "Could not find required Qwt")
elseif(NOT Qwt_FIND_QUIETLY)
message(STATUS "Could not find optional Qwt")
endif()
endif()
33 changes: 21 additions & 12 deletions src/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ DDSMonitorMainWindow::DDSMonitorMainWindow() :
{
// Prompt the user for the domain selection
domainID = settings.value("domainID").toInt();

domainID = QInputDialog::getInt(
this, "Join Domain", "Join DDS Domain:", domainID, -1, 232, 1, &ok);
}
Expand All @@ -67,7 +67,8 @@ DDSMonitorMainWindow::DDSMonitorMainWindow() :
// Join the DDS domain
CommonData::m_ddsManager = std::make_unique<DDSManager>();
m_participantPage = new ParticipantPage(mainTabWidget);
CommonData::m_ddsManager->joinDomain(domainID, "", [page = m_participantPage](const ParticipantInfo& info) {page->addParticipant(info); },
CommonData::m_ddsManager->joinDomain(domainID, "",
[page = m_participantPage](const ParticipantInfo& info) {page->addParticipant(info); },
[page = m_participantPage](const ParticipantInfo& info) {page->removeParticipant(info); });
m_publicationMonitor = std::make_unique<PublicationMonitor>();
m_subscriptionMonitor = std::make_unique<SubscriptionMonitor>();
Expand Down Expand Up @@ -352,18 +353,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<const OpenDDS::RTPS::RtpsDiscovery*>
(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
Expand All @@ -375,7 +376,11 @@ 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(
#if OPENDDS_VERSION_AT_LEAST(3, 27, 0)
domainID).to_addr(
#endif
).get_host_addr()
<< ":"
<< discoveryMulicastPort
//<< "\nDiscovery unicast: "
Expand All @@ -399,11 +404,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<int>(rtspInfo->ttl())
<< static_cast<int>(rtpsInfo->ttl())
//<< "\nPB: " << pb
//<< "\nDG: " << dg
//<< "\nPG: " << pg
Expand Down Expand Up @@ -438,7 +443,11 @@ 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(
#if OPENDDS_VERSION_AT_LEAST(3, 27, 0)
domainID
#endif
) << "\n";
}

} // End DDSMonitorMainWindow::reportConfig
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.20)

project(opendds-monitor-tests VERSION 0.0.1 LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion thirdparty/OpenDDW
30 changes: 15 additions & 15 deletions ui/graph_page.ui
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<string>Variable Graph</string>
</property>
<property name="windowIcon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/monitor.png</normaloff>:/images/monitor.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
Expand Down Expand Up @@ -91,7 +91,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/player-pause.png</normaloff>:/images/player-pause.png</iconset>
</property>
</widget>
Expand All @@ -108,7 +108,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/player-rew.png</normaloff>:/images/player-rew.png</iconset>
</property>
</widget>
Expand All @@ -125,7 +125,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/player-ff.png</normaloff>:/images/player-ff.png</iconset>
</property>
</widget>
Expand All @@ -142,7 +142,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/player-next.png</normaloff>:/images/player-next.png</iconset>
</property>
</widget>
Expand All @@ -159,7 +159,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/flush.png</normaloff>:/images/flush.png</iconset>
</property>
</widget>
Expand All @@ -176,7 +176,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/scale.png</normaloff>:/images/scale.png</iconset>
</property>
</widget>
Expand All @@ -193,7 +193,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/plus.png</normaloff>:/images/plus.png</iconset>
</property>
</widget>
Expand All @@ -210,7 +210,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/trashcan.png</normaloff>:/images/trashcan.png</iconset>
</property>
</widget>
Expand All @@ -227,7 +227,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/save.png</normaloff>:/images/save.png</iconset>
</property>
</widget>
Expand All @@ -244,7 +244,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/printer.png</normaloff>:/images/printer.png</iconset>
</property>
</widget>
Expand All @@ -258,7 +258,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/tool.png</normaloff>:/images/tool.png</iconset>
</property>
</widget>
Expand All @@ -272,7 +272,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/player-eject.png</normaloff>:/images/player-eject.png</iconset>
</property>
</widget>
Expand All @@ -286,7 +286,7 @@
<string/>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/download.png</normaloff>:/images/download.png</iconset>
</property>
</widget>
Expand Down Expand Up @@ -321,7 +321,7 @@
<tabstop>ejectButton</tabstop>
</tabstops>
<resources>
<include location="ddsmon.qrc"/>
<include location="../ddsmon.qrc"/>
</resources>
<connections/>
</ui>
6 changes: 3 additions & 3 deletions ui/graph_properties.ui
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<string>Graph Properties</string>
</property>
<property name="windowIcon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/tool.png</normaloff>:/images/tool.png</iconset>
</property>
<layout class="QGridLayout" name="gridLayout_4">
Expand All @@ -39,7 +39,7 @@
<string>Close</string>
</property>
<property name="icon">
<iconset resource="ddsmon.qrc">
<iconset resource="../ddsmon.qrc">
<normaloff>:/images/close.png</normaloff>:/images/close.png</iconset>
</property>
</widget>
Expand Down Expand Up @@ -326,7 +326,7 @@
</layout>
</widget>
<resources>
<include location="ddsmon.qrc"/>
<include location="../ddsmon.qrc"/>
</resources>
<connections>
<connection>
Expand Down
Loading

0 comments on commit db5bf70

Please sign in to comment.