211 lines
6.9 KiB
Markdown
211 lines
6.9 KiB
Markdown
# DDS/RTI Migration - Continuation Prompt
|
|
|
|
## Context
|
|
|
|
This prompt continues the Qt6 migration work for the Lts/DDS module with RTI Connext DDS 7.7 integration. The core DDS targets (ddscore, ddsftccore, ddsQoS, ddsconnector, ddsgen) have been successfully migrated and build with `BUILD_RTI=ON`.
|
|
|
|
## Completed Work
|
|
|
|
See `BUILD_RTI_VALIDATION_REPORT.md` for detailed results of completed migration work.
|
|
|
|
## Remaining Tasks
|
|
|
|
### Priority 1: ddsfts Module
|
|
|
|
**Location:** `Lts/DDS/FTS/`
|
|
|
|
**Blocker:** Missing `pdm.idl` from ProjectDataManagement module
|
|
|
|
**Required Actions:**
|
|
1. Check if `pdm.idl` exists in legacy Qt5 version
|
|
2. If exists, copy to migrated version's IDL directory
|
|
3. Verify CMakeLists.txt references correct IDL path
|
|
4. If pdm.idl doesn't exist, create minimal stub for build purposes:
|
|
```idl
|
|
module ProjectDataManagement {
|
|
// Stub IDL for build purposes
|
|
struct ProjectData {
|
|
string id;
|
|
};
|
|
};
|
|
```
|
|
5. Rebuild ddsfts target
|
|
6. Verify no additional RTI header conflicts
|
|
|
|
**Files to Check:**
|
|
- `qt-migration-legatus/qt5-before/qt5-legatus-legacy/Lts/DDS/FTS/` (legacy)
|
|
- `qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/DDS/FTS/` (migrated)
|
|
- `Lts/Plugins/ProjectDataManagement/` (source of pdm.idl)
|
|
- `Lts/Services/ProjectDataManagement/` (source of pdm.idl)
|
|
|
|
### Priority 2: ProjectDataManagement Module Migration
|
|
|
|
**Locations:**
|
|
- `Lts/Plugins/ProjectDataManagement/`
|
|
- `Lts/Services/ProjectDataManagement/`
|
|
|
|
**Migration Checklist:**
|
|
- [ ] Inventory all Qt5 API usage (QByteArray::number, deprecated signals/slots, etc.)
|
|
- [ ] Update CMakeLists.txt for Qt6 (find_package(Qt6 COMPONENTS ...))
|
|
- [ ] Verify KTextTemplate configuration for any IDL codegen
|
|
- [ ] Check for AUTOMOC timing issues with generated files
|
|
- [ ] Update include paths if necessary
|
|
- [ ] Build with BUILD_RTI=ON to verify compatibility
|
|
- [ ] Run any existing tests
|
|
|
|
**Qt5 API Patterns to Search:**
|
|
```bash
|
|
# In ProjectDataManagement directories
|
|
grep -r "QByteArray::number" --include="*.h" --include="*.cpp"
|
|
grep -r "QRegExp" --include="*.h" --include="*.cpp"
|
|
grep -r "QDesktopWidget" --include="*.h" --include="*.cpp"
|
|
grep -r "QApplication::desktop" --include="*.h" --include="*.cpp"
|
|
```
|
|
|
|
**CMake Updates Needed:**
|
|
```cmake
|
|
# Qt5 pattern (legacy)
|
|
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
|
|
|
|
# Qt6 pattern (migrated)
|
|
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
|
|
qt_standardize_properties()
|
|
```
|
|
|
|
### Priority 3: Project Plugin Qt6 Migration
|
|
|
|
**Affected Plugins:**
|
|
- `Lts/Plugins/ProjectEtsPlugin/`
|
|
- `Lts/Plugins/ProjectAhtcPlugin/`
|
|
- `Lts/Plugins/ProjectPluginBase/`
|
|
- `Lts/Plugins/Project*Plugin/`
|
|
|
|
**Known Error:** `moc "Undefined interface"`
|
|
|
|
**Investigation Steps:**
|
|
1. Check Q_PLUGIN_METADATA declarations
|
|
2. Verify interface classes have Q_DECLARE_INTERFACE
|
|
3. Check for missing Q_OBJECT macros
|
|
4. Verify AUTOMOC is enabled in CMakeLists.txt
|
|
5. Check for circular dependencies between plugins
|
|
|
|
**Common Qt6 Migration Issues:**
|
|
- Q_PLUGIN_METADATA requires QJsonDocument in Qt6
|
|
- Interface UUIDs must be consistent
|
|
- Plugin loading may require Q_PLUGIN_IMPORT in addition to Q_PLUGIN_METADATA
|
|
|
|
---
|
|
|
|
## Build Commands
|
|
|
|
### Standard DDS Build (Working)
|
|
```bash
|
|
docker run --rm -it \
|
|
-v /home/torsten/swy/sandbox:/workspace \
|
|
-v /home/torsten/swy/sandbox/rti_license.dat:/workspace/rti_license.dat:ro \
|
|
legatus-qt6-build:latest \
|
|
bash -c "cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus && \
|
|
mkdir -p build && cd build && \
|
|
cmake -DBUILD_RTI=ON -DCMAKE_CXX_STANDARD=17 .. && \
|
|
make -j8 ddscore ddsftccore ddsQoS ddsconnector ddsgen"
|
|
```
|
|
|
|
### Full DDS Build (Including ddsfts)
|
|
```bash
|
|
docker run --rm -it \
|
|
-v /home/torsten/swy/sandbox:/workspace \
|
|
-v /home/torsten/swy/sandbox/rti_license.dat:/workspace/rti_license.dat:ro \
|
|
legatus-qt6-build:latest \
|
|
bash -c "cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus && \
|
|
mkdir -p build && cd build && \
|
|
cmake -DBUILD_RTI=ON -DCMAKE_CXX_STANDARD=17 .. && \
|
|
make -j8 ddscore ddsftccore ddsQoS ddsconnector ddsgen ddsfts"
|
|
```
|
|
|
|
### ProjectDataManagement Build (After Migration)
|
|
```bash
|
|
docker run --rm -it \
|
|
-v /home/torsten/swy/sandbox:/workspace \
|
|
-v /home/torsten/swy/sandbox/rti_license.dat:/workspace/rti_license.dat:ro \
|
|
legatus-qt6-build:latest \
|
|
bash -c "cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus && \
|
|
mkdir -p build && cd build && \
|
|
cmake -DBUILD_RTI=ON -DCMAKE_CXX_STANDARD=17 .. && \
|
|
make -j8 ProjectDataManagement"
|
|
```
|
|
|
|
---
|
|
|
|
## Known Issues Reference
|
|
|
|
### Issue: ddsfts Build Failure
|
|
- **Severity:** High (blocks complete DDS module build)
|
|
- **Root Cause:** Missing pdm.idl dependency
|
|
- **Workaround:** Create stub pdm.idl or migrate ProjectDataManagement first
|
|
- **Files Involved:** `Lts/DDS/FTS/CMakeLists.txt`, `Lts/Plugins/ProjectDataManagement/`
|
|
|
|
### Issue: ProjectDataManagement Not Migrated
|
|
- **Severity:** Medium (blocks ddsfts, affects Project plugins)
|
|
- **Root Cause:** Not yet started in current migration wave
|
|
- **Workaround:** None - requires full migration
|
|
- **Files Involved:** `Lts/Plugins/ProjectDataManagement/`, `Lts/Services/ProjectDataManagement/`
|
|
|
|
### Issue: Project Plugin moc Errors
|
|
- **Severity:** Medium (affects plugin loading, not DDS core)
|
|
- **Root Cause:** Qt6 plugin interface changes
|
|
- **Workaround:** Build without plugins or fix Q_PLUGIN_METADATA declarations
|
|
- **Files Involved:** `Lts/Plugins/Project*Plugin/`
|
|
|
|
---
|
|
|
|
## Testing Guidelines
|
|
|
|
### After ddsfts Build
|
|
1. Verify libddsfts.so is created
|
|
2. Check for undefined symbols: `nm -D libddsfts.so | grep U`
|
|
3. Test plugin loading if applicable
|
|
|
|
### After ProjectDataManagement Migration
|
|
1. Build ddsfts and verify success
|
|
2. Run any ProjectDataManagement unit tests
|
|
3. Verify pdm.idl codegen produces expected headers
|
|
4. Test integration with DDS module
|
|
|
|
### After Project Plugin Migration
|
|
1. Build all Project*Plugin targets
|
|
2. Verify plugins load at runtime
|
|
3. Test plugin interfaces with host application
|
|
4. Check for moc warnings in build output
|
|
|
|
---
|
|
|
|
## Success Criteria
|
|
|
|
### ddsfts Module
|
|
- [ ] ddsfts target builds without errors
|
|
- [ ] libddsfts.so is created
|
|
- [ ] No undefined symbol errors
|
|
- [ ] pdm.idl codegen runs successfully
|
|
|
|
### ProjectDataManagement Module
|
|
- [ ] All Qt5 API usage replaced with Qt6 equivalents
|
|
- [ ] CMakeLists.txt uses Qt6 find_package
|
|
- [ ] Module builds with BUILD_RTI=ON
|
|
- [ ] No moc warnings or errors
|
|
- [ ] pdm.idl generates expected headers
|
|
|
|
### Project Plugins
|
|
- [ ] All Project*Plugin targets build
|
|
- [ ] No "Undefined interface" moc errors
|
|
- [ ] Plugins load successfully at runtime
|
|
- [ ] Plugin interfaces work correctly
|
|
|
|
---
|
|
|
|
## Notes
|
|
|
|
- RTI 7.7 requires C++17 (not C++23)
|
|
- Empty rti_license.dat is valid for development
|
|
- Code generation must happen during build (no pre-generated files)
|
|
- AUTOMOC timing issues require SKIP_AUTOMOC + manual QT6_WRAP_CPP for generated files
|
|
- RTI headers conflict with stub definitions - use #ifdef BUILD_RTI guards |