Adds succesfull lts/proxies migration & testsuite

This commit is contained in:
torsten committed 2026-09-19 09:18:18 +00:00
1 parent 9e38583785
commit a1914cb7d9
59 files changed
+754 -273

No files matched your search

@@ -13,6 +13,7 @@
{% if custom_dtc_procs %}
#include <{{ include_prefix }}/{{ namespace_abbr }}_dtc_impl_custom.h>
{% endif %}
#include <NGLLogger/INGLLogger.h>
#include <DDS/DTC/generic_dtc_impl.h>
#include <dds/core/cond/StatusCondition.hpp>
#include <dds/core/cond/WaitSet.hpp>
@@ -20,6 +21,8 @@
#include <QCoreApplication>
#include <QThread>
using namespace NGL;
namespace {{ namespace }}
{
namespace Interface
@@ -58,7 +61,7 @@ std::shared_ptr<Dtc> Dtc::create(const std::shared_ptr<DDSConnector::DdsConnecto
DtcImpl::DtcImpl(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
: Dtc()
, m_ddsConnector(ddsConnector)
, m_logger(getLogger("Dtc"))
, m_logger(&ProjectDataManagement::getLogger("Dtc"))
{}
DtcImpl::~DtcImpl()
@@ -70,7 +73,7 @@ bool DtcImpl::enableAll(bool enable)
{ {% for dt in dataTopics.member %} {% if dt.dtcImpl %} {% if dt.autosubscribe %}
if (!enable{{ dt.name }}(enable))
{
ERROR_LOG(m_logger) << "Error initializing data topic {{ dt.name }}";
ERROR_LOG(*m_logger) << "Error initializing data topic {{ dt.name }}";
return false;
}
{% endif %} {% endif %} {% endfor %}
@@ -92,7 +95,7 @@ bool DtcImpl::checkEnabled(const DTC &dtc) const
if (!dtc)
{
using TOPIC = typename DtcConstraints<DTC>::TOPIC ;
WARNING_LOG(m_logger) << "Error retrieving data topic "
WARNING_LOG(*m_logger) << "Error retrieving data topic "
<< DDS::topic_type_name<TOPIC>::value() << " - not enabled";
Q_ASSERT(false);
return false;
@@ -171,7 +174,7 @@ bool DtcImpl::enable{{ dt.name }}(bool enable)
{
if (m_dtc{{ dt.name }})
{
INFO_LOG(m_logger) << "{{ dt.name }} already enabled!";
INFO_LOG(*m_logger) << "{{ dt.name }} already enabled!";
return true;
}
m_dtc{{ dt.name }}.reset(m_ddsConnector->createDTC<DTC::{{ dt.name }}Impl>());
@@ -195,7 +198,7 @@ bool DtcImpl::waitForHistoricalData{{ dt.name }}(int timeoutMSec)
if (!is{{ dt.name }}Enabled())
{
enable{{ dt.name }}();
DEBUG_LOG(m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
DEBUG_LOG(*m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
}
if (!waitForHistoricalData(m_dtc{{ dt.name }}, timeoutMSec))
@@ -215,7 +218,7 @@ bool DtcImpl::waitForHistoricalData{{ dt.name }}(int timeoutMSec)
template <>
{{ dt.key.cppType }} getKey(const {{ dt.type }} &val)
{
return val.{{ dt.key.name }}();
return val.{{ dt.key.name }};
}
QMap<{{ dt.key.cppType }},::{{ namespace }}::{{ dt.type }}> DtcImpl::{{ dt.nameFlc }}s()
@@ -223,7 +226,7 @@ QMap<{{ dt.key.cppType }},::{{ namespace }}::{{ dt.type }}> DtcImpl::{{ dt.nameF
if (!is{{ dt.name }}Enabled())
{
enable{{ dt.name }}();
DEBUG_LOG(m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
DEBUG_LOG(*m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
waitForHistoricalData{{ dt.name }}(10);
}
return m_{{ dt.nameFlc }}Cont;
@@ -234,7 +237,7 @@ bool DtcImpl::{{ dt.nameFlc }}s(const std::function<void(const ::{{ namespace }}
if (!is{{ dt.name }}Enabled())
{
enable{{ dt.name }}();
DEBUG_LOG(m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
DEBUG_LOG(*m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
waitForHistoricalData{{ dt.name }}(10);
}
return iterateAll(m_dtc{{ dt.name }}, m_{{ dt.nameFlc }}Cont, cb);
@@ -245,7 +248,7 @@ bool DtcImpl::{{ dt.nameFlc }}s(const std::function<bool(const ::{{ namespace }}
if (!is{{ dt.name }}Enabled())
{
enable{{ dt.name }}();
DEBUG_LOG(m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
DEBUG_LOG(*m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
waitForHistoricalData{{ dt.name }}(10);
}
return iterateUntil(m_dtc{{ dt.name }}, m_{{ dt.nameFlc }}Cont, cb);
@@ -256,7 +259,7 @@ bool DtcImpl::{{ dt.nameFlc }}s(const std::function<bool(const ::{{ namespace }}
if (!is{{ dt.name }}Enabled())
{
enable{{ dt.name }}();
DEBUG_LOG(m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
DEBUG_LOG(*m_logger) << "NEED TO ENABLE ! {{ dt.name }}" ;
waitForHistoricalData{{ dt.name }}(10);
}
return getOne(m_dtc{{ dt.name }}, m_{{ dt.nameFlc }}Cont, {{ dt.key.nameFlc }});