- 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>
62 lines
1.8 KiB
C++
Executable File
62 lines
1.8 KiB
C++
Executable File
|
|
|
|
|
|
#include "dds_handler.h"
|
|
|
|
#include <DDS/Core/pacemaker.h>
|
|
|
|
namespace TrainingAreaBaseOC
|
|
{
|
|
|
|
DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Exercise, exerciseId)),
|
|
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
|
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
|
}
|
|
|
|
bool DdsHandler::init(const QStringList &qosFileList)
|
|
{
|
|
if (!m_ddsConnector->init(qosFileList))
|
|
{
|
|
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
|
|
return false;
|
|
}
|
|
|
|
|
|
m_ddsConnector->initPublisherSubscriber();
|
|
|
|
m_dtcCore = Core::Interface::Dtc::create(m_ddsConnector);
|
|
bool bRet = m_dtcCore->enablePartitionTime();
|
|
|
|
|
|
m_pacemaker = std::make_shared<Core::Pacemaker>(m_ddsConnector);
|
|
|
|
m_dtsTaboc = Interface::Dts::create(m_ddsConnector);
|
|
bRet &= m_dtsTaboc->enableAll();
|
|
INFO_LOG(m_logger) << "Dts TrainingAreaBaseOc initialised";
|
|
|
|
m_dtcTaboc = Interface::Dtc::create(m_ddsConnector);
|
|
bRet &= m_dtsTaboc->enableSpecificsEquipment();
|
|
INFO_LOG(m_logger) << "Dtc TrainingAreaBaseOc initialised";
|
|
|
|
m_ftsTaboc = Interface::Fts::create(m_ddsConnector);
|
|
bRet &= m_ftsTaboc->enableAll();
|
|
INFO_LOG(m_logger) << "Fts TrainingAreaBaseOc initialised";
|
|
|
|
m_dtsTab = TrainingAreaBase::Interface::Dts::create(m_ddsConnector);
|
|
bRet &= (m_dtsTab->enableOcData() && m_dtsTab->enableFireSmokeMarkerData());
|
|
INFO_LOG(m_logger) << "Dts TrainingAreaBase initialised";
|
|
|
|
m_ftsTab = TrainingAreaBase::Interface::Fts::create(m_ddsConnector);
|
|
bRet &= (m_ftsTab->enableSendOcData() && m_ftsTab->enableSendFireSmokeMarkerData());
|
|
INFO_LOG(m_logger) << "Fts TrainingAreaBase initialised";
|
|
|
|
return bRet;
|
|
}
|
|
|
|
qint64 DdsHandler::currentPartitionTime() const
|
|
{
|
|
return m_dtcCore->partitionTime().timeStamp();
|
|
}
|
|
|
|
}
|