- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
62 lines
1.5 KiB
C++
Executable File
62 lines
1.5 KiB
C++
Executable File
/**
|
|
* DdsHandler for ServiceManagement
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hannes Baeuerle, SLSE, 2016-02-15
|
|
*/
|
|
|
|
#include "dds_handler.h"
|
|
#include "scm_dts.h"
|
|
#include "scm_fts.h"
|
|
|
|
namespace ServiceManagement
|
|
{
|
|
|
|
DdsHandler::DdsHandler(int domainId)
|
|
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Any))
|
|
, m_logger(getLogger("DdsHandler"))
|
|
{
|
|
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;
|
|
}
|
|
|
|
// default initialize Publisher and Subscriber
|
|
m_ddsConnector->initPublisherSubscriber();
|
|
m_ddsConnector->enableBatchedWriter(false);
|
|
|
|
m_ddsDts = ServiceManagement::Interface::Dts::create(m_ddsConnector);
|
|
bool bRet = m_ddsDts->enableAll();
|
|
INFO_LOG(m_logger) << "initialized Dts";
|
|
|
|
m_ddsFts = ServiceManagement::Interface::Fts::create(m_ddsConnector);
|
|
bRet &= m_ddsFts->enableAll();
|
|
INFO_LOG(m_logger) << "initialized Fts";
|
|
|
|
return bRet;
|
|
}
|
|
|
|
std::shared_ptr<ServiceManagement::Interface::Dts> ServiceManagement::DdsHandler::dts() const
|
|
{
|
|
return m_ddsDts;
|
|
}
|
|
|
|
std::shared_ptr<ServiceManagement::Interface::Fts> ServiceManagement::DdsHandler::fts() const
|
|
{
|
|
return m_ddsFts;
|
|
}
|
|
|
|
std::shared_ptr<DDSConnector::DdsConnector> DdsHandler::connector() const
|
|
{
|
|
return m_ddsConnector;
|
|
}
|
|
|
|
} // namespace ServiceManagement
|