Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/main_handler.cpp
T
torsten 950d669538 Qt6 Migration: BUILD_RTI guards und CMake fixes
- 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>
2026-08-21 18:37:18 +02:00

51 lines
1.1 KiB
C++
Executable File

/**
* MainHandler for AssetManagement
* $Id$
* $HeadURL$
* $Author$
* Created by Gerlinde Rudolphus, SLTE, 2022-06-09
*/
#include "main_handler.h"
#include "settings.h"
#include <DDS/DDSConnector/dds_connector.h>
namespace NmeaManagement
{
MainHandler::MainHandler(QObject *parent) : QObject(parent),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {}
MainHandler::~MainHandler()
{
m_ddsHandler.reset();
m_socketHandler.reset();
m_nmeaHandler.reset();
}
bool MainHandler::init(int domainId)
{
NOTICE_LOG(m_logger) << "MainHandler::init";
// initialize DDS
m_ddsHandler = std::make_shared<DdsHandler>(domainId);
if (!m_ddsHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation ddsHandler failed.";
return false;
}
DEBUG_LOG(m_logger) << "Initialisation ddsHandler succesful.";
m_nmeaHandler = std::make_shared<NmeaHandler>(m_ddsHandler, this);
m_nmeaHandler->init();
m_socketHandler = std::make_shared<SocketHandler>(m_ddsHandler, m_nmeaHandler, this);
m_socketHandler->init(Settings::getNmeaHost(), Settings::getNmeaPort());
return true;
}
} // namespace NmeaManagement