- Lts/DDS: Add BUILD_RTI guards to pacemaker.h, dds_connector.h, generic_fts_* files, generic_base.h, routing_plugin.h - Lts/Services/RoutingServiceNG: Add BUILD_RTI guards to session.h/cpp, connection.h/cpp, data_writer_task.h/cpp - Fix C++23 reference member initialization: use getLogger() instead of getNGLLogger() in constructor initializer lists - Root CMakeLists.txt: Add Lts/DDS to include_directories - Fix export header generation order (GENERATE_EXPORT_HEADER before TARGET_INCLUDE_DIRECTORIES) - Remove auto-generated stub files (external deps collected separately)
54 lines
1.3 KiB
C++
Executable File
54 lines
1.3 KiB
C++
Executable File
/**
|
|
* DdsHandler for DDS
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hanna E. Rathje, SLSE, 2015-09-02
|
|
*/
|
|
|
|
#include "dds_handler.h"
|
|
|
|
#if BUILD_RTI
|
|
#include <DDS/Core/pacemaker.h>
|
|
#endif
|
|
|
|
namespace GuezMinelayerProcessing
|
|
{
|
|
|
|
#if BUILD_RTI
|
|
DdsHandler::DdsHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
|
: m_ddsConnector(ddsConnector)
|
|
, m_logger(getLogger("GuezMinelayerProcessing.DdsHandler"))
|
|
, m_topicLockMaster(std::make_shared<Core::TopicLockMaster>())
|
|
{
|
|
DEBUG_LOG(m_logger) << "DdsHandler(" << ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
|
}
|
|
#else
|
|
DdsHandler::DdsHandler()
|
|
: m_logger(getLogger("GuezMinelayerProcessing.DdsHandler"))
|
|
{
|
|
DEBUG_LOG(m_logger) << "DdsHandler() - RTI DDS not enabled";
|
|
}
|
|
#endif
|
|
|
|
bool DdsHandler::init(const QStringList &qosFileList)
|
|
{
|
|
#if BUILD_RTI
|
|
if (!m_ddsConnector->init(qosFileList))
|
|
{
|
|
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
|
return false;
|
|
}
|
|
|
|
// default initialize Publisher and Subscriber
|
|
m_ddsConnector->initPublisherSubscriber();
|
|
#else
|
|
Q_UNUSED(qosFileList)
|
|
DEBUG_LOG(m_logger) << "DdsHandler::init() - RTI DDS not enabled, skipping initialization";
|
|
#endif
|
|
|
|
return true;
|
|
}
|
|
|
|
} // Namespace GPM
|