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