- 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>
60 lines
1.3 KiB
C++
Executable File
60 lines
1.3 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Routing Test - main connection handling
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
#include <DDS/DDSConnector/dds_connector.h>
|
|
#include <future>
|
|
|
|
#include "logger.h"
|
|
|
|
namespace RoutingService
|
|
{
|
|
class DataWriterTask;
|
|
class TopicDispatcherInterface;
|
|
|
|
class Connection
|
|
{
|
|
public:
|
|
Connection(const dds::domain::DomainParticipant &domainParticipant,
|
|
const std::string &partition,
|
|
const std::vector<TopicDispatcherInterface *> &topicsToRoute,
|
|
const std::string &desc);
|
|
~Connection();
|
|
|
|
// only valid before initialize() !
|
|
void setOutput(Connection *output);
|
|
bool initialize();
|
|
void shutdown();
|
|
|
|
dds::domain::DomainParticipant domainParticipant() const;
|
|
dds::pub::Publisher publisher() const;
|
|
dds::sub::Subscriber subscriber() const;
|
|
|
|
private:
|
|
bool initTopics();
|
|
|
|
private:
|
|
Connection *m_output;
|
|
dds::domain::DomainParticipant m_domainParticipant;
|
|
std::unique_ptr<DDSConnector::Publisher> m_publisher;
|
|
std::unique_ptr<DDSConnector::Subscriber> m_subscriber;
|
|
|
|
std::future<void> m_writerThread;
|
|
std::unique_ptr<DataWriterTask> m_dataWriterTask;
|
|
|
|
std::vector<TopicDispatcherInterface *> m_topicsToRoute;
|
|
|
|
std::string m_partition;
|
|
std::string m_description;
|
|
NGL::INGLLogger &m_logger;
|
|
};
|
|
|
|
} // namespace RoutingService
|