diff --git a/qt6-after/qt6-migrated-legatus/Lts/Common/CodeGen/svc_dtc_impl.cpp.grantlee b/qt6-after/qt6-migrated-legatus/Lts/Common/CodeGen/svc_dtc_impl.cpp.grantlee index 7013a2436..b18916757 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Common/CodeGen/svc_dtc_impl.cpp.grantlee +++ b/qt6-after/qt6-migrated-legatus/Lts/Common/CodeGen/svc_dtc_impl.cpp.grantlee @@ -15,6 +15,7 @@ {% endif %} #include #include +#include #include #include #include @@ -22,6 +23,7 @@ #include using namespace NGL; +using namespace Core; namespace {{ namespace }} { @@ -61,7 +63,7 @@ std::shared_ptr Dtc::create(const std::shared_ptr &ddsConnector) : Dtc() , m_ddsConnector(ddsConnector) - , m_logger(&ProjectDataManagement::getLogger("Dtc")) + , m_logger(&getLogger("Dtc")) {} DtcImpl::~DtcImpl() diff --git a/qt6-after/qt6-migrated-legatus/Lts/DDS/DTC/generic_dtc.h b/qt6-after/qt6-migrated-legatus/Lts/DDS/DTC/generic_dtc.h index 29c9f0ed8..f60953324 100644 --- a/qt6-after/qt6-migrated-legatus/Lts/DDS/DTC/generic_dtc.h +++ b/qt6-after/qt6-migrated-legatus/Lts/DDS/DTC/generic_dtc.h @@ -30,8 +30,11 @@ template class GenericDtcSC virtual bool setSubscriberCallback(const SubscriberCallback& subscriberCallback) = 0; virtual dds::sub::LoanedSamples readAlive() const = 0; + virtual bool readAlive(TopicType& data) = 0; virtual dds::sub::LoanedSamples takeAlive() const = 0; + virtual bool takeAlive(TopicType& data) = 0; virtual dds::sub::LoanedSamples takeDisposed() const = 0; + virtual bool takeDisposed(TopicType& data) = 0; virtual bool hasSamples() const = 0; virtual DataReaderObject* dataReader() const = 0; virtual bool waitForHistoricalData(int timeoutMSec) = 0; @@ -46,7 +49,11 @@ class GenericDtc using TopicType = typename BaseClass::TopicType; // Explicitly expose base class methods for accessibility through smart pointers - void setSubscriberCallback(std::function callback) { BaseClass::setSubscriberCallback(callback); } + using BaseClass::readAlive; + using BaseClass::takeAlive; + using BaseClass::takeDisposed; + using BaseClass::SubscriberCallback; + bool setSubscriberCallback(const typename BaseClass::SubscriberCallback& callback) override { return BaseClass::setSubscriberCallback(callback); } bool readAlive(TopicType& data) { return BaseClass::readAlive(data); } bool takeAlive(TopicType& data) { return BaseClass::takeAlive(data); } bool takeDisposed(TopicType& data) { return BaseClass::takeDisposed(data); } @@ -65,7 +72,11 @@ class GenericDtcSampleInfo using TopicType = typename BaseClass::TopicType; // Explicitly expose base class methods for accessibility through smart pointers - void setSubscriberCallback(std::function callback) { BaseClass::setSubscriberCallback(callback); } + using BaseClass::readAlive; + using BaseClass::takeAlive; + using BaseClass::takeDisposed; + using BaseClass::SubscriberCallback; + bool setSubscriberCallback(const typename BaseClass::SubscriberCallback& callback) override { return BaseClass::setSubscriberCallback(callback); } bool readAlive(TopicType& data) { return BaseClass::readAlive(data); } bool takeAlive(TopicType& data) { return BaseClass::takeAlive(data); } bool takeDisposed(TopicType& data) { return BaseClass::takeDisposed(data); } @@ -84,7 +95,11 @@ class Ddtc using TopicType = typename BaseClass::TopicType; // Explicitly expose base class methods for accessibility through smart pointers - void setSubscriberCallback(std::function callback) { BaseClass::setSubscriberCallback(callback); } + using BaseClass::readAlive; + using BaseClass::takeAlive; + using BaseClass::takeDisposed; + using BaseClass::SubscriberCallback; + bool setSubscriberCallback(const typename BaseClass::SubscriberCallback& callback) override { return BaseClass::setSubscriberCallback(callback); } bool readAlive(TopicType& data) { return BaseClass::readAlive(data); } bool takeAlive(TopicType& data) { return BaseClass::takeAlive(data); } bool takeDisposed(TopicType& data) { return BaseClass::takeDisposed(data); } @@ -103,7 +118,11 @@ class DdtcSampleInfo using TopicType = typename BaseClass::TopicType; // Explicitly expose base class methods for accessibility through smart pointers - void setSubscriberCallback(std::function callback) { BaseClass::setSubscriberCallback(callback); } + using BaseClass::readAlive; + using BaseClass::takeAlive; + using BaseClass::takeDisposed; + using BaseClass::SubscriberCallback; + bool setSubscriberCallback(const typename BaseClass::SubscriberCallback& callback) override { return BaseClass::setSubscriberCallback(callback); } bool readAlive(TopicType& data) { return BaseClass::readAlive(data); } bool takeAlive(TopicType& data) { return BaseClass::takeAlive(data); } bool takeDisposed(TopicType& data) { return BaseClass::takeDisposed(data); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/DDS/FTS/connext.h b/qt6-after/qt6-migrated-legatus/Lts/DDS/FTS/connext.h index f0e2372a0..1b46b1ccc 100644 --- a/qt6-after/qt6-migrated-legatus/Lts/DDS/FTS/connext.h +++ b/qt6-after/qt6-migrated-legatus/Lts/DDS/FTS/connext.h @@ -12,7 +12,7 @@ #include #include -#include "TrainingAreaBase/logger.h" +#include "DDS/Core/logger.h" #include #include #include @@ -320,7 +320,7 @@ template class Requester final : public Reply m_contentFilteredTopic->filter(dds::topic::Filter(filterContent.data())); } - DEBUG_LOG(::TrainingAreaBase::getLogger("connext")) << "content filter for topic " << ReplyRequestBase::m_requestTopic.name() + DEBUG_LOG(Core::getLogger("connext")) << "content filter for topic " << ReplyRequestBase::m_requestTopic.name() << " - related_sample_identity should be: " << writerGuid; } @@ -353,7 +353,7 @@ template class Requester final : public Reply m_dataWriter->write(request.data(), request.info()); const rti::core::SampleIdentity currentSampleIdentity = request.info().identity(); - DEBUG_LOG(::TrainingAreaBase::getLogger("connext")) << "send_request for topic " << ReplyRequestBase::m_requestTopic.name() + DEBUG_LOG(Core::getLogger("connext")) << "send_request for topic " << ReplyRequestBase::m_requestTopic.name() << ", m_currentSampleIdentity: " << DebugInfo::toReadable(currentSampleIdentity); } @@ -370,13 +370,13 @@ template class Requester final : public Reply if (m_dataReader->take(reply.data(), reply.info()) && reply.info().valid()) { - DEBUG_LOG(::TrainingAreaBase::getLogger("connext")) << "receive_reply for topic " + DEBUG_LOG(Core::getLogger("connext")) << "receive_reply for topic " << ReplyRequestBase::m_requestTopic.name() << ", SampleIdentity - original publication virtual: " << DebugInfo::toReadable( reply.info()->original_publication_virtual_sample_identity()); - DEBUG_LOG(::TrainingAreaBase::getLogger("connext")) << "receive_reply for topic " + DEBUG_LOG(Core::getLogger("connext")) << "receive_reply for topic " << ReplyRequestBase::m_requestTopic.name() << ", SampleIdentity - related original: " << DebugInfo::toReadable( @@ -389,7 +389,7 @@ template class Requester final : public Reply dds::core::cond::WaitSet::ConditionSeq activeConditionsSeq = waitset.wait(duration); if (activeConditionsSeq.empty()) { - ERROR_LOG(::TrainingAreaBase::getLogger("connext")) << "Bailing out!"; + ERROR_LOG(Core::getLogger("connext")) << "Bailing out!"; break; } } @@ -400,7 +400,7 @@ template class Requester final : public Reply if (!m_curInstanceHandle.is_nil()) { - DEBUG_LOG(::TrainingAreaBase::getLogger("connext")) << "Keyed topic - disposing instance: " + DEBUG_LOG(Core::getLogger("connext")) << "Keyed topic - disposing instance: " << ReplyRequestBase::m_requestTopic.name(); m_dataWriter.dispose_instance(m_curInstanceHandle); } @@ -456,7 +456,7 @@ template class Replier final : public ReplyRe void send_reply(connext::WriteSampleRef& reply, const rti::core::SampleIdentity& identity, bool bLastSample = true) { - DEBUG_LOG(::TrainingAreaBase::getLogger("connext")) << "send_reply for topic " << ReplyRequestBase::m_requestTopic.name() + DEBUG_LOG(Core::getLogger("connext")) << "send_reply for topic " << ReplyRequestBase::m_requestTopic.name() << ", sampleIdentity: " << DebugInfo::toReadable(identity); rti::core::SampleFlag sf = reply.info().flag(); @@ -466,7 +466,7 @@ template class Replier final : public ReplyRe sf |= rti::core::SampleFlag::intermediate_reply_sequence(); reply.info().flag(sf); reply.info().related_sample_identity(identity); - DEBUG_LOG(::TrainingAreaBase::getLogger("connext")) << "send_reply for topic " << ReplyRequestBase::m_requestTopic.name() + DEBUG_LOG(Core::getLogger("connext")) << "send_reply for topic " << ReplyRequestBase::m_requestTopic.name() << ", related sampleIdentity: " << DebugInfo::toReadable(reply.info().related_sample_identity()); @@ -480,7 +480,7 @@ template class Replier final : public ReplyRe if (request.info().valid()) { - DEBUG_LOG(::TrainingAreaBase::getLogger("connext")) << "receive_request for topic " << ReplyRequestBase::m_requestTopic.name() + DEBUG_LOG(Core::getLogger("connext")) << "receive_request for topic " << ReplyRequestBase::m_requestTopic.name() << ", sampleIdentity publication_virtual_sample_identity: " << DebugInfo::toReadable(request.info()->publication_virtual_sample_identity()) << ", original_publication_virtual_sample_identity: " diff --git a/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc.h b/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc.h index 29c9f0ed8..63eeb6ff3 100644 --- a/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc.h +++ b/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc.h @@ -30,8 +30,11 @@ template class GenericDtcSC virtual bool setSubscriberCallback(const SubscriberCallback& subscriberCallback) = 0; virtual dds::sub::LoanedSamples readAlive() const = 0; + virtual bool readAlive(TopicType& data) = 0; virtual dds::sub::LoanedSamples takeAlive() const = 0; + virtual bool takeAlive(TopicType& data) = 0; virtual dds::sub::LoanedSamples takeDisposed() const = 0; + virtual bool takeDisposed(TopicType& data) = 0; virtual bool hasSamples() const = 0; virtual DataReaderObject* dataReader() const = 0; virtual bool waitForHistoricalData(int timeoutMSec) = 0; @@ -46,7 +49,11 @@ class GenericDtc using TopicType = typename BaseClass::TopicType; // Explicitly expose base class methods for accessibility through smart pointers - void setSubscriberCallback(std::function callback) { BaseClass::setSubscriberCallback(callback); } + using BaseClass::readAlive; + using BaseClass::takeAlive; + using BaseClass::takeDisposed; + using BaseClass::SubscriberCallback; + bool setSubscriberCallback(const typename BaseClass::SubscriberCallback& callback) override { return BaseClass::setSubscriberCallback(callback); } bool readAlive(TopicType& data) { return BaseClass::readAlive(data); } bool takeAlive(TopicType& data) { return BaseClass::takeAlive(data); } bool takeDisposed(TopicType& data) { return BaseClass::takeDisposed(data); } @@ -65,6 +72,9 @@ class GenericDtcSampleInfo using TopicType = typename BaseClass::TopicType; // Explicitly expose base class methods for accessibility through smart pointers + using BaseClass::readAlive; + using BaseClass::takeAlive; + using BaseClass::takeDisposed; void setSubscriberCallback(std::function callback) { BaseClass::setSubscriberCallback(callback); } bool readAlive(TopicType& data) { return BaseClass::readAlive(data); } bool takeAlive(TopicType& data) { return BaseClass::takeAlive(data); } @@ -84,6 +94,9 @@ class Ddtc using TopicType = typename BaseClass::TopicType; // Explicitly expose base class methods for accessibility through smart pointers + using BaseClass::readAlive; + using BaseClass::takeAlive; + using BaseClass::takeDisposed; void setSubscriberCallback(std::function callback) { BaseClass::setSubscriberCallback(callback); } bool readAlive(TopicType& data) { return BaseClass::readAlive(data); } bool takeAlive(TopicType& data) { return BaseClass::takeAlive(data); } @@ -103,6 +116,9 @@ class DdtcSampleInfo using TopicType = typename BaseClass::TopicType; // Explicitly expose base class methods for accessibility through smart pointers + using BaseClass::readAlive; + using BaseClass::takeAlive; + using BaseClass::takeDisposed; void setSubscriberCallback(std::function callback) { BaseClass::setSubscriberCallback(callback); } bool readAlive(TopicType& data) { return BaseClass::readAlive(data); } bool takeAlive(TopicType& data) { return BaseClass::takeAlive(data); } diff --git a/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc_impl.h b/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc_impl.h index a7d5aaf4b..60b14a683 100755 --- a/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc_impl.h +++ b/qt6-after/qt6-migrated-legatus/include/DDS/DTC/generic_dtc_impl.h @@ -127,6 +127,17 @@ public: return ret; } + bool readAlive(TopicTypeRead& data) override final + { + auto samples = readAlive(); + if (samples.length() > 0) + { + data = samples[0].data(); + return true; + } + return false; + } + dds::sub::LoanedSamples takeAlive() const override final { if (!m_dataReaderObject) @@ -140,6 +151,17 @@ public: return ret; } + bool takeAlive(TopicTypeRead& data) override final + { + auto samples = takeAlive(); + if (samples.length() > 0) + { + data = samples[0].data(); + return true; + } + return false; + } + dds::sub::LoanedSamples takeDisposed() const override final { if (!m_dataReaderObject) @@ -148,6 +170,17 @@ public: return m_dataReaderObject->takeDisposed(); } + bool takeDisposed(TopicTypeRead& data) override final + { + auto samples = takeDisposed(); + if (samples.length() > 0) + { + data = samples[0].data(); + return true; + } + return false; + } + bool hasSamples() const override final { if (!m_dataReaderObject) diff --git a/qt6-after/qt6-migrated-legatus/new_docker_build.sh b/qt6-after/qt6-migrated-legatus/new_docker_build.sh index 357ddc4b5..8e2787619 100755 --- a/qt6-after/qt6-migrated-legatus/new_docker_build.sh +++ b/qt6-after/qt6-migrated-legatus/new_docker_build.sh @@ -208,6 +208,7 @@ APT_PACKAGES=( libvlc-dev vlc-plugin-base git + python3-pip ) # INTERFACE libraries (header-only) are built automatically as dependencies @@ -356,7 +357,7 @@ install_qt6_packages() { # Install aqtinstall if not available if ! command -v aqt &> /dev/null; then log_info "Installing aqtinstall via pip3" - pip3 install --quiet aqtinstall + pip3 install --break-system-packages --quiet aqtinstall fi # Install Qt6 modules (same as app/Dockerfile) @@ -592,6 +593,27 @@ log_info() { printf 'INFO: %s\n' "$*" } +install_qt6_packages() { + log_info "Installing Qt6 packages via aqtinstall" + + # Install aqtinstall if not available + if ! command -v aqt &> /dev/null; then + log_info "Installing aqtinstall via pip3" + pip3 install --break-system-packages --quiet aqtinstall + fi + + # Install Qt6 modules (same as app/Dockerfile) + # Modules: qtmultimedia, qtserialport, qtimageformats, qtwebsockets, qtwebengine, + # qtpdf, qtwebview, qt5compat, qtwebchannel, qtpositioning, qtlocation, qtsensors + # Note: qtsvg is NOT available via aqtinstall - it's provided by libqt6svg6-dev apt package + aqt install-qt linux desktop "${QT_VERSION:-6.10.2}" "${QT_ARCH:-linux_gcc_64}" \ + -m qtmultimedia qtserialport qtimageformats qtwebsockets qtwebengine \ + qtpdf qtwebview qt5compat qtwebchannel qtpositioning qtlocation qtsensors \ + --outputdir "${QT_BASE_DIR:-/opt/Qt}" + + log_info "Qt6 packages installed successfully" +} + run_build_group() { local group_id="$1" local enabled="$2"