Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
Executable
+59
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* @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
|
||||
Reference in new issue
Block a user