- BUILD_RTI conditional compilation für RTI Connext DDS dependencies - Namespace fixes in core_dtc.h (Core:: → DDS::Core::) - CMakeLists.txt: BUILD_RTI option und conditional dependencies - Handler minelayer: namespace closing mit BUILD_RTI guard - Build erfolgreich mit BUILD_RTI=OFF validiert Signed-off-by: Torsten Wierschin <torsten.wierschin@life-maps.com>
53 lines
1.3 KiB
C++
Executable File
53 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"
|
|
|
|
#include <DDS/Core/pacemaker.h>
|
|
|
|
namespace GuezMinelayerProcessing
|
|
{
|
|
|
|
#if BUILD_RTI
|
|
DdsHandler::DdsHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
|
: m_ddsConnector(ddsConnector)
|
|
, m_logger(getNGLLogger("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(getNGLLogger("GuezMinelayerProcessing.DdsHandler"))
|
|
, m_topicLockMaster(std::make_shared<Core::TopicLockMaster>())
|
|
{
|
|
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
|